
Create new directories: ceph config config-files filesystem kernel kernel/kernel-modules ldap logging strorage-drivers tools utilities virt Retire directories: connectivity core devtools support extended Delete two packages: tgt irqbalance Relocated packages: base/ dhcp initscripts libevent lighttpd linuxptp memcached net-snmp novnc ntp openssh pam procps sanlock shadow sudo systemd util-linux vim watchdog ceph/ python-cephclient config/ facter puppet-4.8.2 puppet-modules filesystem/ e2fsprogs nfs-utils nfscheck kernel/ kernel-std kernel-rt kernel/kernel-modules/ mlnx-ofa_kernel ldap/ nss-pam-ldapd openldap logging/ syslog-ng logrotate networking/ lldpd iproute mellanox python-ryu mlx4-config python/ python-2.7.5 python-django python-gunicorn python-setuptools python-smartpm python-voluptuous security/ shim-signed shim-unsigned tboot strorage-drivers/ python-3parclient python-lefthandclient virt/ cloud-init libvirt libvirt-python qemu tools/ storage-topology vm-topology utilities/ tis-extensions namespace-utils nova-utils update-motd Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86 Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
43 lines
1.8 KiB
Diff
43 lines
1.8 KiB
Diff
From 974b70a23b6a6c579fc4d43efd42e42f26c27310 Mon Sep 17 00:00:00 2001
|
|
From: Allain Legacy <allain.legacy@windriver.com>
|
|
Date: Thu, 17 Nov 2016 08:27:42 -0500
|
|
Subject: [PATCH] sysconfig: affirmative check for link carrier
|
|
|
|
The /sys/class/net/<iface>/carrier attribute is supposed to return 0 or 1 to
|
|
indicate whether a link carrier is present or not. This holds true for regular
|
|
ethernet devices but for special devices, such as VLAN interfaces, it appears
|
|
to be possible that it returns an error on stderr and nothing on stdout in some
|
|
scenarios. One such scenario is if the lower interface of a VLAN is
|
|
administratively down then checking the carrier status of the VLAN returns
|
|
"invalid argument".
|
|
|
|
Because of the way the check_link_down() function is currently coded a failure
|
|
to produce any output on stdout is interpreted as a sign that the link carrier
|
|
is present. That is, the empty string "" is not equal to "0" therefore the
|
|
check passes.
|
|
|
|
To avoid this scenario we are changing this to a more affirmative check so that
|
|
it won't actually pass until stdout returns "1".
|
|
|
|
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
|
|
---
|
|
sysconfig/network-scripts/network-functions | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
|
|
index 798f28a..affa8ba 100644
|
|
--- a/sysconfig/network-scripts/network-functions
|
|
+++ b/sysconfig/network-scripts/network-functions
|
|
@@ -463,7 +463,7 @@ check_link_down ()
|
|
delay=20
|
|
[ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2))
|
|
while [ $timeout -le $delay ]; do
|
|
- [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" != "0" ] && return 1
|
|
+ [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" == "1" ] && return 1
|
|
usleep 500000
|
|
timeout=$((timeout+1))
|
|
done
|
|
--
|
|
1.9.1
|
|
|