Bug 17102

Summary: drakconnect defines unused variable LINK_DETECTION_DELAY
Product: Mageia Reporter: Yves DEMUR <yves.demur>
Component: RPM PackagesAssignee: Olivier Blin <mageia>
Status: RESOLVED INVALID QA Contact:
Severity: minor    
Priority: Normal CC: anaselli, bittwister2, marja11, thierry.vignaud
Version: 5   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: drakx-net-2.22-1.mga5.src.rpm CVE:
Status comment:
Attachments: erased all _detection_ _DETECTION_ subchains

Description Yves DEMUR 2015-11-07 09:51:17 CET
Description of problem:
When configuring an interface by drakconnect, the got ifcfg-* file contains
LINK_DETECTION_DELAY=6
but this variable is used by none of the scripts in /etc/sysconfig/network-scripts (and subdirectories) nor /etc/rc.d/init.d

By searchig the string DELAY we see the variable used in scripts : LINKDELAY

I propose an update to drakconnect to make it use the name LINKDELAY in place of LINK_DETECTION_DELAY

Reproducible: 

Steps to Reproduce:
Comment 1 Marja Van Waes 2015-11-11 17:08:03 CET
Assigning to maintainer, even if this is probably useless, since he stopped working on drakx-net and works porting Mageia to ARM, now. So CC'ing our drakx-tools maintainer, as well.

Also CC'ing anaselli who works on a libyui port of our drakx tools

@ Yves

Are you interested in becoming a Mageia packager?

CC: (none) => anaselli, marja11, thierry.vignaud
Assignee: bugsquad => mageia

Comment 2 Yves DEMUR 2015-12-02 22:16:10 CET
Created attachment 7261 [details]
erased all _detection_ _DETECTION_ subchains
Comment 3 Angelo Naselli 2015-12-02 22:26:53 CET
I don't know the aim of that variable, the patch should be ok, but does it
works? I mean did you use and tested that variable?
Comment 4 Yves DEMUR 2015-12-03 13:50:19 CET
I did not test the patched drakconnect (but I think the patch is OK) but I tested the use of LINKDELAY variable. I know how to do a patch file since yesterday (and use git), I dont know how to compile and test a patched program.

In all my hand-written ifcfg files, I set the LINKDELAY variable like this :
LINKDELAY=6
and, as expected, when I use ifup, the 6 seconds delay occurs.

For bug #17105 I did a lot of tests on the if{up,down}-eth files, often with "set -x" and traces in log files. I achieved a batch of changes running fine.

In ifup-eth
line 204:
    [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
is used to wait after the upping of slaves before running dhcp client for the master

On CentOS too, there is no variable LINK_DETECTION_DELAY used in /etc/sysconfig/network-scripts, but LINKDELAY is used.

Why someone has decided once to use the name LINK_DETECTION_DELAY in drakconnect ? ... History of Mandriva ?
Comment 5 Bit Twister 2015-12-03 15:21:21 CET
(In reply to Yves DEMUR from comment #4)

> Why someone has decided once to use the name LINK_DETECTION_DELAY in
> drakconnect ? ... History of Mandriva ?

You might want to look through /usr/share/doc/initscripts/sysconfig.txt
for LINKDELAY and LINK_DETECTION_DELAY

Several months ago I attempted to speed up connection time by shortening LINK_DETECTION_DELAY but the link would fail if I made it too small.

Solution was to create /etc/systemd/network/*.network config files, disable NetworkManager.service, enable systemd-networkd-wait-online and systemd-networkd services. Result was ~20 second reduction in getting the link up.

CC: (none) => bittwister2

Comment 6 Yves DEMUR 2015-12-03 21:12:34 CET
Thanks for the informations in /usr/share/doc/initscripts/sysconfig.txt

I just discover use of LINK_DETECTION_DELAY in /etc/rc.d/init.d/network-up ! So this variable MUST be defined by drakconnect. The LINKDELAY variable has another purpose.

All this bug report is wrong.

I had searched the uses of LINK_DETECTION_DELAY only in /etc/sysconfig/network-scripts/* and in /etc/rc.d/init.d/network. I had not looked in other scripts of init.d .

My main work is reported in Bug 17105, and while reading scripts and testing drakconnect I did not explained myself the use of LINK_DETECTION_DELAY.

Your last comment made me search more.

I apologize for this mistake. Shame on me.

How can I close/erase this report ?
Comment 7 Bit Twister 2015-12-03 22:07:57 CET
(In reply to Yves DEMUR from comment #6)
> 
> How can I close/erase this report ?

Put a reason in Additional Comments: then
click Status: button select Resolved and Save Changes buttons.
Comment 8 Marja Van Waes 2015-12-03 23:07:01 CET
Don't worry, we all make mistakes ;-)

Thx a lot for the feedback :-)

(Closing as âresolved - invalidâ, erasing a bug report is impossible).

Status: NEW => RESOLVED
Resolution: (none) => INVALID