+++ This bug was initially created as a clone of Bug #1751161 +++ Description of problem: ----------------------------------------------------------------------------------- Error message would be observed if execute ovs-check-dead-ifs in Red Hat Enterprise Linux 8 ----------------------------------------------------------------------------------- Version-Release number of selected component (if applicable): ----------------------------------------------------------------------------------- # cat /etc/redhat-release Red Hat Enterprise Linux release 8.0 (Ootpa) # uname -a Linux haclustern2 4.18.0-80.11.1.el8_0.x86_64 #1 SMP Tue Sep 3 11:21:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux openvswitch2.11-2.11.0-18.el8fdp.x86_64 ----------------------------------------------------------------------------------- How reproducible: ----------------------------------------------------------------------------------- execute the file via /usr/share/openvswitch/scripts # ovs-check-dead-ifs File "/usr/share/openvswitch/scripts/ovs-check-dead-ifs", line 40 print "%s: unexpected format\n" % fn ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s: unexpected format\n" % fn)? ----------------------------------------------------------------------------------- Steps to Reproduce: ----------------------------------------------------------------------------------- 1. execute the file via /usr/share/openvswitch/scripts ----------------------------------------------------------------------------------- Actual results: ----------------------------------------------------------------------------------- File "/usr/share/openvswitch/scripts/ovs-check-dead-ifs", line 40 print "%s: unexpected format\n" % fn ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s: unexpected format\n" % fn)? ----------------------------------------------------------------------------------- Expected results: ----------------------------------------------------------------------------------- no error should be observed ----------------------------------------------------------------------------------- Additional info: ----------------------------------------------------------------------------------- ovs-check-dead-ifs is developed by python and would follow python 2.x syntax. However, by default, Red Hat Enterprise Linux 8 uses python3. The print call is different in python2.x and python3. So when ovs-check-dead-ifs executes in Red Hat Enterprise Linux 8, error message can be observed. We should modify the python code for ovs-check-dead-ifs 1. Line 40, update from 'print "%s: unexpected format\n" % fn' to 'print ("%s: unexpected format\n" % fn)'' 2. Line 100 update from ' print """ The following processes are listening for packets to arrive on network devices that no longer exist. You may want to restart them."""'' to 'print (""" The following processes are listening for packets to arrive on network devices that no longer exist. You may want to restart them.""")' ----------------------------------------------------------------------------------- --- Additional comment from Aaron Conole on 2019-09-13 19:29:28 CEST --- https://mail.openvswitch.org/pipermail/ovs-dev/2019-September/362691.html
Reproduced issue as follows: [root@impairment2 scripts]# rpm -qa | grep openvswitch openvswitch-selinux-extra-policy-1.0-19.el8fdp.noarch openvswitch2.12-2.12.0-4.el8fdp.x86_64 [root@impairment2 scripts]# uname -r 4.18.0-147.el8.x86_64 cd /usr/share/openvswitch/scripts/ [root@impairment2 scripts]# ./ovs-check-dead-ifs File "./ovs-check-dead-ifs", line 40 print "%s: unexpected format\n" % fn ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s: unexpected format\n" % fn)? ------------------------------------------------------------------ Upgraded to openvswitch2.12-2.12.0-12.el8fdp: [root@impairment2 scripts]# yum -y update http://download.eng.bos.redhat.com/brewroot/packages/openvswitch2.12/2.12.0/12.el8fdp/x86_64/openvswitch2.12-2.12.0-12.el8fdp.x86_64.rpm Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Last metadata expiration check: 0:05:51 ago on Thu 19 Dec 2019 12:50:21 PM EST. openvswitch2.12-2.12.0-12.el8fdp.x86_64.rpm 56 MB/s | 12 MB 00:00 Dependencies resolved. ========================================================================================== Package Architecture Version Repository Size ========================================================================================== Upgrading: openvswitch2.12 x86_64 2.12.0-12.el8fdp @commandline 12 M Transaction Summary ========================================================================================== Upgrade 1 Package Total size: 12 M Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: openvswitch2.12-2.12.0-12.el8fdp.x86_64 1/1 Running scriptlet: openvswitch2.12-2.12.0-12.el8fdp.x86_64 1/2 Upgrading : openvswitch2.12-2.12.0-12.el8fdp.x86_64 1/2 Running scriptlet: openvswitch2.12-2.12.0-12.el8fdp.x86_64 1/2 Running scriptlet: openvswitch2.12-2.12.0-4.el8fdp.x86_64 2/2 Cleanup : openvswitch2.12-2.12.0-4.el8fdp.x86_64 2/2 Running scriptlet: openvswitch2.12-2.12.0-4.el8fdp.x86_64 2/2 Verifying : openvswitch2.12-2.12.0-12.el8fdp.x86_64 1/2 Verifying : openvswitch2.12-2.12.0-4.el8fdp.x86_64 2/2 Installed products updated. Upgraded: openvswitch2.12-2.12.0-12.el8fdp.x86_64 Complete! Verified that issue is no longer present: [root@impairment2 scripts]# ./ovs-check-dead-ifs [root@impairment2 scripts]#
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:0172