[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#989412: marked as done (unblock: ifupdown-extra/0.32)



Your message dated Sat, 05 Jun 2021 14:21:29 +0000
with message-id <E1lpXB3-0008Tr-5S@respighi.debian.org>
and subject line unblock ifupdown-extra
has caused the Debian Bug report #989412,
regarding unblock: ifupdown-extra/0.32
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
989412: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989412
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package ifupdown-extra

[ Reason ]

There is a bug (#987310) in the package in testing which prevents the
static-routes script (/etc/network/if-up.d/20static-routes) from working
properly when the package is configured to include them.

I have also taken the opportunity to:
- fix the script so it exits gracefully if called directly (i.e.
  when the interface to act on is not set)
- fix the script so that the 'status' check works properly when the gateways
  have a defined name in the /etc/hosts
- update the documentation (README) to warn users about the behaviour of one
  script.

[ Impact ]

If the package is not unblocked users installing this package and trying to set
static routes will have their routes added to the 'blackhole' configuration
instead.

[ Tests ]
Tested locally in developer's machine with different configuration variations. 
The script runs as expected (adding, removing and checking the status
of routes added in /etc/network/routes

[ Risks ]
Changes in the package are trivial, there is very low risk

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock ifupdown-extra/0.32

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 5.10.0-1-686-pae (SMP w/4 CPU threads)
Locale: LANG=es_ES.utf8, LC_CTYPE=es_ES.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru ifupdown-extra-0.31/debian/changelog ifupdown-extra-0.32/debian/changelog
--- ifupdown-extra-0.31/debian/changelog	2020-09-19 09:09:41.000000000 +0200
+++ ifupdown-extra-0.32/debian/changelog	2021-06-03 08:13:30.000000000 +0200
@@ -1,3 +1,16 @@
+ifupdown-extra (0.32) unstable; urgency=high
+
+  * if-up-scripts/static-routes:
+     - Fix syntax error in script which causes routes added to be converted
+       into "blackhole" routes (Closes: 987310)
+     - Fail properly if the inteface (IFACE) is not defined when the script
+       is called
+     - Use route -n instead of 'route' to properly identify status of routes
+       when the gateways are in the hosts file
+  * debian/README: Describe caveats related to network link tests
+
+ -- Javier Fernández-Sanguino Peña <jfs@debian.org>  Thu, 03 Jun 2021 08:13:30 +0200
+
 ifupdown-extra (0.31) unstable; urgency=medium
 
   * Fix some network scripts to adapt to the naming scheme introduced 
diff -Nru ifupdown-extra-0.31/debian/README ifupdown-extra-0.32/debian/README
--- ifupdown-extra-0.31/debian/README	2020-09-19 09:09:37.000000000 +0200
+++ ifupdown-extra-0.32/debian/README	2021-06-03 08:13:30.000000000 +0200
@@ -16,8 +16,12 @@
 submit it as a bug report to the package.
 
 
-Known limitations
-----------------
+Known limitations:
+------------------
+
+---------------
+Interface names
+---------------
 
 Starting with v197, systemd/udev creates predictable network interface names
 for all local Ethernet, WLAN and WWAN interfaces. However, system
@@ -42,6 +46,22 @@
 systemd.net-naming scheme: https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html
 
 
+------------------
+Network link checks
+------------------
+
+The script that tests the network link is run inmediately after an interface is
+administratively configured up. However, the underlying hardware sometime it
+takes some time to establish and negotiate a link. This is heavily dependant on
+the hardware itself and the system it is connected to (e.g. if auto negotiation
+of an interface is enabled or the duplex/mode are forced in the interface). 
+
+Due to this time interval for the link to fully stablise it is possible that
+the check-network-cable might generate false negative error messages on
+systems. 
+
+If this is your case, you are encourage to disable the script by editing
+/etc/default/network-test and changing the variable DO_CABLETEST to 'no'
 
 ----------
 Javier Fernández-Sanguino
diff -Nru ifupdown-extra-0.31/if-up-scripts/static-routes ifupdown-extra-0.32/if-up-scripts/static-routes
--- ifupdown-extra-0.31/if-up-scripts/static-routes	2020-08-15 01:30:37.000000000 +0200
+++ ifupdown-extra-0.32/if-up-scripts/static-routes	2021-06-03 08:13:30.000000000 +0200
@@ -51,6 +51,11 @@
 # Default value
 VERBOSITY=${VERBOSITY:-0}
 
+[ "$IFACE" ] || {
+    $OUTPUT "ERROR: Variable IFACE not set in environment"
+    exit 1
+}
+
 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901612
 if [ ${IFACE} = "--all" ]; then IFACE="[[:alnum:]]+"; fi
 
@@ -80,7 +85,7 @@
 	cat $ROUTEFILE | egrep "^[^#].*[[:space:]]${IFACE}[[:space:]]*$" | 
 	while read network netmask gateway interface ; do
             if [ -n "$interface" ] && [ -n "$network" ] && [ -n "$netmask" ] && [ -n "$gateway" ] ; then
-                if [ "$gateway" != "reject" ] && [ "$gateway" != "blackhole" ; then
+                if [ "$gateway" != "reject" ] && [ "$gateway" != "blackhole" ] ; then
 		    [ "$VERBOSITY" -eq 1 ] && echo "DEBUG: Adding route for $network / $netmask through gateway $gateway at $interface"
         	    route add -net $network netmask $netmask gw $gateway dev $interface
                 else
@@ -99,7 +104,7 @@
 	while read network netmask gateway interface ; do
             if [ -n "$interface" ] && [ -n "$network" ] && [ -n "$netmask" ] && [ -n "$gateway" ] ; then
                 if [ "$gateway" != "reject" ] ; then
-                    if ! route | egrep -q "${network}\s+${gateway}\s+${netmask}.*${interface}"; then
+                    if ! route -n | egrep -q "${network}\s+${gateway}\s+${netmask}.*${interface}"; then
                         echo "ERROR: Route '$network $netmask $gateway $interface' defined in $ROUTEFILE is not configured"
                     fi
                 fi

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply to: