+++ This bug was initially created as a clone of Bug #1218055 +++ Description of problem: Currently "snap_scheduler disable" command has same return code for different types of failures like; snap_scheduler init not executed, snap_scheduler already disabled.. etc. When this command is executed through an external program like vdsm, its better to depend on return code than messages to recognise the failures. So, its better to have different return codes for different errors. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Mainline Patch Url: http://review.gluster.org/#/c/11005/ Release 3.7 Url: http://review.gluster.org/#/c/11057/ RHGS 3.1 Dev Branch Url: https://code.engineering.redhat.com/gerrit/#/c/49908/
FIxed on RHGS3.1 branch with https://code.engineering.redhat.com/gerrit/50090
Version : glusterfs-3.7.1-7.el6rhs.x86_64 Different failure scenarios with snap_scheduler disable : 1) Without initialising scheduler if snap_scheduler is executed snap_scheduler.py status snap_scheduler: Please run 'snap_scheduler.py' init to initialise the snap scheduler for the local node. snap_scheduler.py disable snap_scheduler: Please run 'snap_scheduler.py' init to initialise the snap scheduler for the local node. echo $? 9 2) Snap_scheduler is already disabled and trying to disable it again: snap_scheduler.py status snap_scheduler: Snapshot scheduling status: Disabled snap_scheduler.py disable snap_scheduler: Failed to disable scheduling. Error: Snapshot scheduling is already disabled. [root@inception post]# echo $? 7 3) Unmount or Delete the shared storage and disable snap_scheduler: [root@inception post]# snap_scheduler.py disable snap_scheduler: Failed: Shared storage is not mounted at /var/run/gluster/shared_storage [root@inception post]# echo $? 4 Delete the shared storage using "gluster v set all cluster.enable-shared-storage disable" and disable snap_scheduler: snap_scheduler.py disable snap_scheduler: Failed: Shared storage is not mounted at /var/run/gluster/shared_storage [root@inception post]# echo $? 4 4) Kill all the bricks in the shared storage and disable snap_scheduler snap_scheduler.py disable snap_scheduler: Failed: /var/run/gluster/shared_storage does not exist. [root@inception post]# echo $? 3 Marking the bug 'Verified'
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://rhn.redhat.com/errata/RHSA-2015-1495.html