Bug 1817369 - [RHEL 8] snap_scheduler.py init failing with "TypeError: Can't mix strings and bytes in path components"
Summary: [RHEL 8] snap_scheduler.py init failing with "TypeError: Can't mix strings an...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: snapshot
Version: rhgs-3.5
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: RHGS 3.5.z Batch Update 2
Assignee: Sunny Kumar
QA Contact: Mugdha Soni
URL:
Whiteboard:
: 1817858 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-26 08:51 UTC by Kshithij Iyer
Modified: 2020-06-19 14:18 UTC (History)
7 users (show)

Fixed In Version: glusterfs-6.0-32
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-16 06:19:39 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2572 0 None None None 2020-06-16 06:19:56 UTC

Description Kshithij Iyer 2020-03-26 08:51:20 UTC
Description of problem:
"snap_scheduler.py init" command failing with the below traceback:

[root@dhcp43-104 ~]# snap_scheduler.py init
Traceback (most recent call last):
  File "/usr/sbin/snap_scheduler.py", line 941, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/sbin/snap_scheduler.py", line 851, in main
    initLogger()
  File "/usr/sbin/snap_scheduler.py", line 153, in initLogger
    logfile = os.path.join(process.stdout.read()[:-1], SCRIPT_NAME + ".log")
  File "/usr/lib64/python3.6/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib64/python3.6/genericpath.py", line 151, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components


Version-Release number of selected component (if applicable):
glusterfs-6.0-30.1.el8rhgs.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Run "snap_scheduler.py init" command on a RHEL 8 setup

Actual results:
Command fails with traceback.


Expected results:
Command shouldn't fail with traceback.

Additional info:
List of automation testcases failing due to this bug:
1.test_snap_delete_existing_scheduler
2.test_snap_scheduler_status
3.test_snap_scheduler_behaviour

These testcases are failing for all volume types hence the total number of testcases failing due to this bug is 15.

Comment 1 Sunny Kumar 2020-03-26 10:43:56 UTC
Its python2/3 issue will update patch link.

Comment 2 Sunny Kumar 2020-03-26 10:54:43 UTC
Upstream Patch:

https://review.gluster.org/#/c/glusterfs/+/24257/

Comment 3 Upasana 2020-03-27 11:01:06 UTC
*** Bug 1817858 has been marked as a duplicate of this bug. ***

Comment 8 Mugdha Soni 2020-04-17 08:36:34 UTC
Tested with the following :-

[root@dhcp47-62 ~]# rpm -qa | grep glusterfs
glusterfs-6.0-32.el8rhgs.x86_64
glusterfs-server-6.0-32.el8rhgs.x86_64
glusterfs-api-6.0-32.el8rhgs.x86_64
glusterfs-libs-6.0-32.el8rhgs.x86_64
glusterfs-fuse-6.0-32.el8rhgs.x86_64
glusterfs-cli-6.0-32.el8rhgs.x86_64
glusterfs-client-xlators-6.0-32.el8rhgs.x86_64

Red Hat Enterprise Linux release 8.2 (Ootpa)
4.18.0-193.el8.x86_64

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

Steps performed :-
1.Created a replica3 volume and started the volume , mounted and ran IO's 
2.Enable cluster.enable-shared-storage 
3.set - setsebool -P cron_system_cronjob_use_shares on
4.Ran snap_scheduler.py enable
5.Ran snap_scheduler.py init on each node one by one.
----------------------------------------------------------------------------------------------------------------------

[root@dhcp47-62 ~]# gluster volume set all cluster.enable-shared-storage enable
volume set: success
[root@dhcp47-62 ~]# set - setsebool -P cron_system_cronjob_use_shares on
[root@dhcp46-62 ~]# snap_scheduler.py enable
snap_scheduler: Snapshot scheduling is enabled
[root@dhcp47-62 ~]# gluster volume list
gluster_shared_storage
volume_replica
[root@dhcp47-62 ~]# snap_scheduler.py init                                                    
snap_scheduler: Successfully initialised snapshot scheduler for this node


Since there was no error encountered while running snap_scheduler.py init ,hence moving this bug to verified state .

Comment 12 errata-xmlrpc 2020-06-16 06:19:39 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:2572


Note You need to log in before you can comment on or make changes to this bug.