Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1635313

Summary: starting a bridge interface via ifup with stp enabled results in input error from expr
Product: Red Hat Enterprise Linux 7 Reporter: Richard Achmatowicz <rachmato>
Component: initscriptsAssignee: David Kaferad // Dee'Kej <deekej>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: deekej, initscripts-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-08 10:05:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard Achmatowicz 2018-10-02 15:14:27 UTC
Description of problem:

When I start a bridge interface with stp enabled using ifup, if DELAY is not defined in the ifcfg-br1 file, the ifup script tries to calculate a value for LINKDELAY:

convert2sec $(forward_delay) centi

This calculation returns a decimal number. When this number is fed into the next calculation

forward_delay=$(expr $(forward_delay) \* 2 + 7)

it results in an error 

/etc/sysconfig/network-scripts/ifup-eth: line 91: [: 0: unary operator expected

Version-Release number of selected component (if applicable):


How reproducible:
create a bridge device which has stp enabled and start the device

Steps to Reproduce:
1.
2.
3.

Actual results:
an error processing the value of LINK_DELAY occurs

Expected results:
the value of LINK_DELAY should be correctly processed, despite the fact that the calculated value of forward_delay is a non-integer


Additional info:

Here is a trace of running ifup br1 on my host:

[root@clusterdev02 ~]# ifdown br1
[root@clusterdev02 ~]# ifup br1
+ . /etc/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' 13247 -ne 1 -a -z '' ']'
++ '[' -d /run/systemd/system ']'
++ case "$0" in
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
++ '[' -c /dev/stderr -a -r /dev/stderr ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -z '' ']'
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/i18n -o -f /etc/locale.conf ']'
++ . /etc/profile.d/lang.sh
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
++ '[' pty = serial ']'
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.old\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
++ '[' '' = 1 ']'
+++ cat /proc/cmdline
++ strstr 'BOOT_IMAGE=/vmlinuz-3.10.0-862.14.4.el7.x86_64 root=/dev/mapper/rhel_clusterdev02-root ro crashkernel=auto rd.lvm.lv=rhel_clusterdev02/root rd.lvm.lv=rhel_clusterdev02/swap rhgb quiet transparent_hugepage=never LANG=en_GB.UTF-8' rc.debug
++ '[' 'BOOT_IMAGE=/vmlinuz-3.10.0-862.14.4.el7.x86_64 root=/dev/mapper/rhel_clusterdev02-root ro crashkernel=auto rd.lvm.lv=rhel_clusterdev02/root rd.lvm.lv=rhel_clusterdev02/swap rhgb quiet transparent_hugepage=never LANG=en_GB.UTF-8' = 'BOOT_IMAGE=/vmlinuz-3.10.0-862.14.4.el7.x86_64 root=/dev/mapper/rhel_clusterdev02-root ro crashkernel=auto rd.lvm.lv=rhel_clusterdev02/root rd.lvm.lv=rhel_clusterdev02/swap rhgb quiet transparent_hugepage=never LANG=en_GB.UTF-8' ']'
++ return 1
++ return 0
+ cd /etc/sysconfig/network-scripts
+ . ./network-functions
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
+++ hostname
++ HOSTNAME=clusterdev02.lab.eng.brq.redhat.com
++ '[' -z '/\(~\|\.bak\|\.old\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d' ']'
+ '[' -f ../network ']'
+ . ../network
+ CONFIG=br1
+ '[' -z br1 ']'
+ need_config br1
+ local nconfig
+ CONFIG=ifcfg-br1
+ '[' -f ifcfg-br1 ']'
+ return
+ '[' -f ifcfg-br1 ']'
+ '[' 0 '!=' 0 ']'
+ source_config
+ CONFIG=ifcfg-br1
+ DEVNAME=br1
+ . /etc/sysconfig/network-scripts/ifcfg-br1
++ DEVICE=br1
++ STP=yes
++ TYPE=Bridge
++ BOOTPROTO=none
++ DEFROUTE=yes
++ IPV4_FAILURE_FATAL=no
++ IPV6INIT=yes
++ IPV6_AUTOCONF=yes
++ IPV6_DEFROUTE=yes
++ IPV6_FAILURE_FATAL=no
++ IPV6_ADDR_GEN_MODE=stable-privacy
++ NAME=br1
++ UUID=8e9f719e-ed4c-4c21-b6e6-8c6acd42699e
++ ONBOOT=yes
++ BRIDGING_OPTS=priority=32768
++ IPADDR=192.168.0.120
++ PREFIX=24
++ IPV6_PEERDNS=yes
++ IPV6_PEERROUTES=yes
+ '[' -r keys-br1 ']'
+ case "$TYPE" in
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -z br1 -a -n '' ']'
+ '[' -z '' ']'
++ echo br1
++ sed 's/[0-9]*$//'
+ DEVICETYPE=br
+ '[' -z '' -a -n '' ']'
+ '[' -z '' ']'
+ REALDEVICE=br1
+ '[' -z '' ']'
+ SYSCTLDEVICE=br1
+ '[' br1 '!=' br1 ']'
+ ISALIAS=no
+ is_nm_running
+ dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.freedesktop.NetworkManager
+ '[' foo = fooboot ']'
+ '[' -n '' ']'
+ '[' -n '' -a Bridge = Bridge ']'
+ '[' '' = true -a -n 8e9f719e-ed4c-4c21-b6e6-8c6acd42699e -a br1 '!=' lo ']'
+ '[' '' = yes ']'
+ '[' none = bootp -o none = dhcp ']'
+ '[' -x /sbin/ifup-pre-local ']'
+ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup-br
+ '[' '!' -x /etc/sysconfig/network-scripts/ifup-br ']'
+ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup-Bridge
+ '[' '!' -x /etc/sysconfig/network-scripts/ifup-Bridge ']'
+ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup-eth
+ exec /etc/sysconfig/network-scripts/ifup-eth ifcfg-br1
expr: non-integer argument
/etc/sysconfig/network-scripts/ifup-eth: line 91: [: 0: unary operator expected
rx unmodified, ignoring
no ring parameters changed, aborting
rx unmodified, ignoring
no ring parameters changed, aborting

Comment 2 David Kaferad // Dee'Kej 2018-10-08 10:05:24 UTC

*** This bug has been marked as a duplicate of bug 1609687 ***