Bug 1305776

Summary: 'snap_scheduler.py init' returns incorrect error message when cronie package is not installed in the system
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Prasanth <pprakash>
Component: snapshotAssignee: Mohammed Rafi KC <rkavunga>
Status: CLOSED WONTFIX QA Contact: storage-qa-internal <storage-qa-internal>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: pprakash, rhs-bugs, rkavunga
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-16 18:17:55 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 Prasanth 2016-02-09 08:45:48 UTC
Description of problem:

'snap_scheduler.py init' returns incorrect error message when cronie package is not installed in the system. This is seen during rhgs container testing where chronie package is not installed by default. Refer: 1305764

Version-Release number of selected component (if applicable):
# cat /etc/redhat-storage-release 
Red Hat Gluster Storage Server 3.1 Update 2 ( Container)

# rpm -qa |grep glusterfs
glusterfs-libs-3.7.5-16.el7rhgs.x86_64
glusterfs-client-xlators-3.7.5-16.el7rhgs.x86_64
glusterfs-fuse-3.7.5-16.el7rhgs.x86_64
glusterfs-geo-replication-3.7.5-16.el7rhgs.x86_64
glusterfs-3.7.5-16.el7rhgs.x86_64
glusterfs-api-3.7.5-16.el7rhgs.x86_64
glusterfs-cli-3.7.5-16.el7rhgs.x86_64
glusterfs-server-3.7.5-16.el7rhgs.x86_64

How reproducible: Always


Steps to Reproduce:
1. Try running # snap_scheduler.py init in a system where chronie package is not installed by default
2.
3.

Actual results: 'snap_scheduler.py init' returns incorrect error when cronie package is not installed in the system

#####
# snap_scheduler.py init              
snap_scheduler: Another snap_scheduler command is running. Please try again after some time.

From snap_scheduler.log:

[2016-02-09 07:32:18,739 snap_scheduler.py:710 main] INFO /var/run/gluster/shared_storage/snaps/lock_files/lock_file is being processed by another agent.
[2016-02-09 07:40:16,628 snap_scheduler.py:710 main] INFO /var/run/gluster/shared_storage/snaps/lock_files/lock_file is being processed by another agent.
[2016-02-09 07:41:46,502 snap_scheduler.py:710 main] INFO /var/run/gluster/shared_storage/snaps/lock_files/lock_file is being processed by another agent.
[2016-02-09 07:42:03,157 snap_scheduler.py:710 main] INFO /var/run/gluster/shared_storage/snaps/lock_files/lock_file is being processed by another agent.
#####

Expected results: 'snap_scheduler.py init' should return a proper and relevant error message when it's pre-requisites are not met.


Additional info:

Comment 1 Avra Sengupta 2016-02-26 06:30:03 UTC
Removing this from 3.1.3. Will be fixing it later.

Comment 2 Avra Sengupta 2016-11-17 06:53:21 UTC
This error does not have anything to do with cronie package. It occurs when the script fails to flock "/var/run/gluster/shared_storage/snaps/lock_files/lock_file". Can you please confirm if there can be issues in doing a fcntl flock on the said file in the container environment