Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 1809241

Summary: ovs-bugtool fails due to no module named 'StringIO'
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Flavio Leitner <fleitner>
Component: openvswitch2.13Assignee: Zhiqiang Fang <zfang>
Status: CLOSED ERRATA QA Contact: Zhiqiang Fang <zfang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: RHEL 8.0CC: ctrautma, jhsiao, kfida, ralongi, tli, tredaelli
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://mail.openvswitch.org/pipermail/ovs-dev/2020-March/368785.html
Whiteboard:
Fixed In Version: openvswitch2.13-2.13.0-15.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-15 12:58:16 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 Flavio Leitner 2020-03-02 16:48:35 UTC
Description of problem:

[root@localhost ~]# /usr/libexec/platform-python --version 
Python 3.6.8

[root@localhost ~]# rpm -qf $(which ovs-bugtool)
openvswitch2.13-2.13.0-6.el8fdp.x86_64

[root@localhost ~]# ovs-bugtool --help
Traceback (most recent call last):
  File "/usr/sbin/ovs-bugtool", line 36, in <module>
    import StringIO
ModuleNotFoundError: No module named 'StringIO'


It also import 'commands' which is removed from python3.
https://docs.python.org/2/library/commands.html
"""
   Deprecated since version 2.6: The commands module has been removed in Python 3. Use the subprocess module instead.
"""

Most probably there are other issues to run the tool with python3.

Comment 1 Timothy Redaelli 2020-03-18 15:24:38 UTC
Sent upstream: https://mail.openvswitch.org/pipermail/ovs-dev/2020-March/368785.html

Comment 4 Zhiqiang Fang 2020-06-08 20:39:38 UTC
Reproduced 

on openvswitch2.13-2.13.0-14.el8fdp.x86_64:

[root@wsfd-advnetlab15 ~]# /usr/libexec/platform-python --version 
Python 3.6.8
[root@wsfd-advnetlab15 ~]# rpm -qf $(which ovs-bugtool)
openvswitch2.13-2.13.0-14.el8fdp.x86_64

[root@wsfd-advnetlab15 ~]# ovs-bugtool --help
Traceback (most recent call last):
  File "/usr/sbin/ovs-bugtool", line 36, in <module>
    import StringIO
ModuleNotFoundError: No module named 'StringIO'





Verified 

on openvswitch2.13-2.13.0-15.el8fdp.x86_64 and openvswitch2.13-2.13.0-18.el8fdp.x86_64:

---------------------------------------------------------------------
[root@wsfd-advnetlab15 ~]# /usr/libexec/platform-python --version 
Python 3.6.8
[root@wsfd-advnetlab15 ~]# rpm -qa | grep openvs
openvswitch2.13-2.13.0-15.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch
[root@wsfd-advnetlab15 ~]# 
[root@wsfd-advnetlab15 ~]# 
[root@wsfd-advnetlab15 ~]# rpm -qf $(which ovs-bugtool)
openvswitch2.13-2.13.0-15.el8fdp.x86_64
[root@wsfd-advnetlab15 ~]# ovs-bugtool --help

/usr/sbin/ovs-bugtool: create status report bundles to assist in problem diagnosis
usage: /usr/sbin/ovs-bugtool OPTIONS

By default, /usr/sbin/ovs-bugtool prompts for permission to collect each form of status
information and produces a .tar.gz file as output.

The following options are available.
  --help                     display this help message, then exit
  -s, --silent               suppress most output to stdout

Options for categories of data to collect:
  --entries=CAP_A,CAP_B,...  set categories of data to collect
  --all                      collect all categories
  --ovs                      collect only directly OVS-related info
  --log-days=DAYS            collect DAYS worth of old logs
  --delay=DELAY              set delay between repeated command
  -y, --yestoall             suppress prompts to confirm collection
  --capabilities             print categories as XML on stdout, then exit

Output options:
  --output=FORMAT            set output format to one of tar tar.bz2 tar.gz zip
  --outfile=FILE             write output to FILE
  --outfd=FD                 write output to FD (requires --output=tar)
  --unlimited                ignore default limits on sizes of data collected
  --debug                    print ovs-bugtool debug info on stdout
[root@wsfd-advnetlab15 ~]# 
[root@wsfd-advnetlab15 ~]# 

---------------------------------------------------------------------

[root@wsfd-advnetlab15 ~]# /usr/libexec/platform-python --version 
Python 3.6.8
[root@wsfd-advnetlab15 ~]# rpm -qf $(which ovs-bugtool)
openvswitch2.13-2.13.0-18.el8fdp.x86_64
[root@wsfd-advnetlab15 ~]# 
[root@wsfd-advnetlab15 ~]# ovs-bugtool --help

/usr/sbin/ovs-bugtool: create status report bundles to assist in problem diagnosis
usage: /usr/sbin/ovs-bugtool OPTIONS

By default, /usr/sbin/ovs-bugtool prompts for permission to collect each form of status
information and produces a .tar.gz file as output.

The following options are available.
  --help                     display this help message, then exit
  -s, --silent               suppress most output to stdout

Options for categories of data to collect:
  --entries=CAP_A,CAP_B,...  set categories of data to collect
  --all                      collect all categories
  --ovs                      collect only directly OVS-related info
  --log-days=DAYS            collect DAYS worth of old logs
  --delay=DELAY              set delay between repeated command
  -y, --yestoall             suppress prompts to confirm collection
  --capabilities             print categories as XML on stdout, then exit

Output options:
  --output=FORMAT            set output format to one of tar tar.bz2 tar.gz zip
  --outfile=FILE             write output to FILE
  --outfd=FD                 write output to FD (requires --output=tar)
  --unlimited                ignore default limits on sizes of data collected
  --debug                    print ovs-bugtool debug info on stdout
[root@wsfd-advnetlab15 ~]#

Comment 6 errata-xmlrpc 2020-07-15 12:58:16 UTC
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/RHBA-2020:2948