1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-06 00:49:30 +01:00
Files
Sunny Kumar 97ca0a5992 snap_scheduler: python3 compatibility and new test case
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

Solution:

Added the 'universal_newlines' flag to Popen to support backward compatibility.

Added a basic test for snapshot scheduler.

Backport of:

   >Upstream Patch: https://review.gluster.org/#/c/glusterfs/+/24257/
   >Change-Id: I78e8fabd866fd96638747ecd21d292f5ca074a4e
   >Fixes: #1134
   >Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
   >(cherry picked from commit a7d7ec066e)

Change-Id: I78e8fabd866fd96638747ecd21d292f5ca074a4e
Fixes: #1134
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
2020-04-20 07:50:18 +00:00
..
2018-09-03 09:14:44 +00:00
2010-09-07 07:45:58 -07:00
2018-09-03 09:14:44 +00:00
2018-09-11 04:25:17 +00:00
2011-08-10 10:57:19 -07:00
2019-03-13 01:48:26 +00:00
2018-09-12 17:52:45 +05:30
2018-09-03 09:14:44 +00:00
2012-09-13 13:19:37 -07:00
2019-03-13 01:48:26 +00:00
2011-08-10 10:57:19 -07:00