Bug 11940 - drakwizards dhcpd and dns only provide eth0 interface
Summary: drakwizards dhcpd and dns only provide eth0 interface
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard: MGA7TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 07:38 CET by William Murphy
Modified: 2021-04-28 15:23 CEST (History)
6 users (show)

See Also:
Source RPM: drakwizard-4.0-1.mga4.src.rpm
CVE:
Status comment:


Attachments
Dhcp.pm patch (526 bytes, patch)
2020-12-13 09:04 CET, Nicolas Nicolas
Details | Diff
IFCFG.pm patch (2.42 KB, patch)
2020-12-13 09:05 CET, Nicolas Nicolas
Details | Diff

Description William Murphy 2013-12-10 07:38:21 CET
Description of problem:
The drakwizards for dhcpd and dns only provide one choice for network interfaces, eth0, which is no longer available after interface renaming.


How reproducible: Every time


Steps to Reproduce:
1. Install drakwizard.
2. Start mcc and goto Network-services
3a. Select 'Configure DHCP', then click 'Next'. Choices for 'Interface the dhcp server must listen too' are 'NONE' and 'eth0'.
3b. Select 'Configure NDS', leave choice set to 'Master DNS server' and click 'Next'. Choices for 'DNS server interface' are 'NONE' and 'eth0'.

It appears that /usr/lib/perl5/vendor_perl/5.18.1/MDK/Wizard/IFCFG.pm is only searching for interface names beginning with 'eth'.

Reproducible: 

Steps to Reproduce:
Thierry Vignaud 2013-12-10 11:30:34 CET

CC: (none) => mageia, thierry.vignaud

Thierry Vignaud 2013-12-10 11:30:53 CET

CC: (none) => derekjenn

Comment 1 Marja Van Waes 2013-12-10 12:41:23 CET
thx for filing the report, William :-)

CC: (none) => doc-bugs, marja11

Comment 2 papoteur 2014-05-25 18:36:59 CEST
Confirmed

CC: (none) => yves.brungard_mageia

Comment 3 Marja Van Waes 2014-05-26 15:38:03 CEST
@ Colin

Assigning to you because it isn't assigned to anyone and because tv cc'ed you just after this bug was filed (instead of assigning to himself), which makes me suspect you could solve it :-P

Feel free to re-assign, though :-D

Assignee: bugsquad => mageia

Comment 4 papoteur 2015-08-14 12:40:44 CEST
This bug affect also drakwizard ftp.
The concerned line is line 38 in the above cited script:

foreach (split('\n', $ifconfig)) {
	my ($temp) = /(^eth[0-9]*:?[0-9]*)/;
papoteur 2020-12-12 15:08:04 CET

Assignee: mageia => mageiatools
Whiteboard: (none) => MGA7TOO

Comment 5 Nicolas Nicolas 2020-12-13 09:03:54 CET
Hello,

For the DHCP wizard, the reference to eth0 are in the /usr/share/perl5/vendor_perl/MDK/Wizard directory)in files Dhcp.pm and in IFCFG.pm.

As default wired interface is changing from a machine to another, we can probably take the default interface from the route command.
Comment 6 Nicolas Nicolas 2020-12-13 09:04:56 CET
Created attachment 12071 [details]
Dhcp.pm patch
Comment 7 Nicolas Nicolas 2020-12-13 09:05:51 CET
Created attachment 12072 [details]
IFCFG.pm patch
Comment 8 Nicolas Lécureuil 2020-12-22 10:38:41 CET
can you clone the git repo and provide a git patch ? ( easier to read all at once :-) )

CC: (none) => mageia

Comment 9 Thierry Vignaud 2020-12-22 14:29:43 CET
I'd originally cc-ed Colin as he was the one that made us switch from ethX to bios names.
I think drakwizard should rely on the same code as drakx-net, by reusing detect_devices::is_lan_interface().
See eg: http://gitweb.mageia.org/software/drakx-net/tree/lib/network/connection/ethernet.pm#n16

See "drakdoc detect_devices" for doc and http://gitweb.mageia.org/software/drakx/tree/perl-install/detect_devices.pm#n783 for the boring details

It looks like I introduced the blacklist approach 16 years ago, too bad drakwizard maintainers never went the same way…
Comment 10 Nicolas Lécureuil 2020-12-22 22:37:13 CET
adding colin as CC:

I think a project could be to clean our tools. I agree with you that we should reuse what exists and not reinvent the wheel.
Comment 11 Nicolas Nicolas 2020-12-23 10:51:50 CET
Hello,

I never made a git clone and Perl is a language i don't known... I just try to understand what the function is doing ;-)

To correct the tool, there is also a change to make to the Wizcommon.pm file.

In fact in Mageia 7 there is a test about the existence of the mountpoint /sys/fs/cgroup/systemd .

But in Mageia 8/Cauldron, this mountpoint doesn't exist anymore, probably due to the switch from cgroup v1 to cgroup v2, forcing the wizard to try to launch a sysV service ( which doesn't exists (at least for dhcpd)) !

https://www.mageialinux-online.org/forum/topic-28180-2+assistant-dhcp.php

CC: (none) => joe_c_moi

Nicolas Nicolas 2020-12-23 11:05:14 CET

CC: joe_c_moi => (none)

papoteur 2021-04-28 15:23:29 CEST

CC: yves.brungard_mageia => (none)


Note You need to log in before you can comment on or make changes to this bug.