Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1215600

Summary: Gluster: UX: [New] - Snapshot scheduling from UI and CLI should not co-exist.
Product: [oVirt] ovirt-engine Reporter: RamaKasturi <knarra>
Component: Frontend.WebAdminAssignee: Shubhendu Tripathi <shtripat>
Status: CLOSED WONTFIX QA Contact: SATHEESARAN <sasundar>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: bmcclain, bugs, knarra, lsurette, mgoldboi, mzywusko, rbalakri, sabose, sankarshan, sasundar, sbonazzo, shtripat, srevivo, ykaul
Target Milestone: ---Flags: sbonazzo: ovirt-4.2-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1230342 (view as bug list) Environment:
Last Closed: 2017-09-22 12:00:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1187461, 1230342    

Description RamaKasturi 2015-04-27 09:02:27 UTC
Description of problem:
When ever user triggers a snapshot scheduling from UI, it should disable the scheduling which is present in CLI.

Version-Release number of selected component (if applicable):
ovirt-engine-3.6.0-0.0.master.20150420232310.gite30f655.el6.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
snapshot scheduling from UI and cli should not co exist. When user triggers a schedule for snapshot from UI, snapshot scheduling from cli should be disabled.

Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2015-10-19 10:53:41 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Sandro Bonazzola 2015-10-26 12:42:24 UTC
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015.
Please review this bug and if not a blocker, please postpone to a later release.
All bugs not postponed on GA release will be automatically re-targeted to

- 3.6.1 if severity >= high
- 4.0 if severity < high

Comment 3 Sandro Bonazzola 2015-11-05 08:20:52 UTC
oVirt 3.6.0 has been released on November 4th, re-targeting to 4.0 since this bug has been marked with severity < high

Comment 4 Shubhendu Tripathi 2015-11-16 12:27:55 UTC
@Sahina, I remember this was merged. Please check and can be moved to MODIFIED.

Comment 5 Red Hat Bugzilla Rules Engine 2015-11-16 14:07:49 UTC
This bug is flagged for 3.6, yet the milestone is for 4.0 version, therefore the milestone has been reset.
Please set the correct milestone or add the flag.

Comment 6 Red Hat Bugzilla Rules Engine 2015-11-18 08:56:50 UTC
Fixed bug tickets must have target milestone set prior to fixing them. Please set the correct milestone and move the bugs back to the previous status after this is corrected.

Comment 7 Red Hat Bugzilla Rules Engine 2015-12-11 02:17:44 UTC
This bug is not marked for z-stream, yet the milestone is for a z-stream version, therefore the milestone has been reset.
Please set the correct milestone or add the z-stream flag.

Comment 8 Red Hat Bugzilla Rules Engine 2015-12-11 02:17:44 UTC
Fixed bug tickets must have target milestone set prior to fixing them. Please set the correct milestone and move the bugs back to the previous status after this is corrected.

Comment 9 Red Hat Bugzilla Rules Engine 2015-12-11 02:17:44 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 10 Red Hat Bugzilla Rules Engine 2015-12-17 09:32:41 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 11 Yaniv Lavi 2015-12-22 16:16:02 UTC
3.6.1 is out, moving to 3.6.2.

Comment 12 SATHEESARAN 2016-03-15 10:14:19 UTC
Tested with RHEV 3.6.3.4, snap scheduling from UI and CLI seem to co-exist

1. I could able to schedule snap from CLI 
2. At the same time I could able to schedule snap from UI

Comment 13 Red Hat Bugzilla Rules Engine 2016-03-15 10:14:27 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 15 RamaKasturi 2016-03-24 08:44:27 UTC
Hi Sahina,

   Tested with RHGS-C and snap scheduling from UI and CLI does not co-exist.

# snap_scheduler.py init
snap_scheduler: Successfully inited snapshot scheduler for this node
# snap_scheduler.py enable
snap_scheduler: Snapshot scheduling is enabled
# snap_scheduler.py status
snap_scheduler: Snapshot scheduling status: Enabled
# cat /var/run/gluster/shared_storage/snaps/current_scheduler 
cli

Now go to webui and schedule snapshots there --> Warning:
~~~
Gluster CLI based snapshot scheduling is enabled. It would be disabled once volume snapshots scheduled from UI.
~~~

Snapshots scheduled and check cli:
~~~
# cat /var/run/gluster/shared_storage/snaps/current_scheduler
ovirt
# snap_scheduler.py status
snap_scheduler: Snapshot scheduling status: Disabled
~~~

Try enabling it from CLI by running the command 
# snap_scheduler.py enable
snap_scheduler: Failed to enable snapshot scheduling. Error: Another scheduler is active.

. Now suppose in CLI you enable schedule manually, engine does not try to disable it again as RHSC earlier had maintained a flag that CLI scheduling was disabled for the cluster

Because of this if you try to create new schedule again from RHSC, there is no way it can disable CLI schedule.

Also my understanding is that once RHSC is used for maintaining to a gluster, it takes hold of snapshot scheduling for the cluster and user is not going to revert back to CLI scheduling later. This is the reason feature is developed such a way that only first time RHSC tries to disable the CLI schedule and maintains the state.

Comment 16 Sahina Bose 2016-03-24 13:51:26 UTC
Shubhendu, can you please check if we're missing some patches from master in 3.6 branch (vdsm or engine) ?

Comment 17 Shubhendu Tripathi 2016-03-28 04:12:47 UTC
Kasturi's comments are correct.

Only first time when we try to create a snapshot schedule from oVirt engine, it disables the CLI based scheduling for the cluster.

Then onwards oVirt maintains a flag for the cluster that the CLI schedule is disabled for the said cluster and only oVirt can schedule snapshots for the cluster.

Now if somebody manually edits the configuration in CLI, oVirt cannot make it out and re-disable it. At least using the command "snap_scheduler.py enable" if somebody tries to enable CLI based scheduling it does not allow in back-end.

@Sahina, I dont think we are missing some patches here.

Comment 18 Sahina Bose 2016-03-28 12:08:35 UTC
Thanks Shubhendu.

Sas, can you verify based on comments - 16 & 17?

Comment 19 Eyal Edri 2016-03-31 08:35:33 UTC
Bugs moved pre-mature to ON_QA since they didn't have target release.
Notice that only bugs with a set target release will move to ON_QA.

Comment 20 Sandro Bonazzola 2016-04-04 13:32:02 UTC
Has this been fixed in 3.6.5? I see patches only for master.

Comment 21 Sahina Bose 2016-04-05 09:32:24 UTC
The patches in master were merged (jun 2015) before the 3.6 branch creation - and has been available since the 3.6.0 builds.
This bug needs to be verified as per Comment 17. 
Moving to ON_QA

Comment 22 SATHEESARAN 2016-04-18 09:32:00 UTC
Tested with 3.6.5 & RHGS 3.1.2, by adding the RHGS node to 3.5 cluster.

While setting up snap scheduling from UI, the /var/run/gluster/shared_storage/snaps/current_scheduler file contains the "none", against the value of "ovirt"

I see the warning messages in the engine.log

<snip>
"2016-04-18 06:01:59,530 WARN  [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (ajp-/127.0.0.1:8702-15) [57ad0ef7] The message key 'ScheduleGlusterVolumeSnapshot' is missing fro
m 'bundles/ExecutionMessages'"
</snip>

Comment 23 SATHEESARAN 2016-04-20 11:10:57 UTC
(In reply to SATHEESARAN from comment #22)
> Tested with 3.6.5 & RHGS 3.1.2, by adding the RHGS node to 3.5 cluster.
> 
> While setting up snap scheduling from UI, the
> /var/run/gluster/shared_storage/snaps/current_scheduler file contains the
> "none", against the value of "ovirt"
> 
> I see the warning messages in the engine.log
> 
> <snip>
> "2016-04-18 06:01:59,530 WARN 
> [org.ovirt.engine.core.dal.job.ExecutionMessageDirector]
> (ajp-/127.0.0.1:8702-15) [57ad0ef7] The message key
> 'ScheduleGlusterVolumeSnapshot' is missing fro
> m 'bundles/ExecutionMessages'"
> </snip>

Based on this, I am moving this bug to FailedQA

Comment 24 Red Hat Bugzilla Rules Engine 2016-04-20 11:11:04 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 25 Sahina Bose 2016-04-20 12:10:03 UTC
The error message provided in Comment 22 is not related to this - it is a benign message related to display of error messages.

Triveni, can you please check the test case being executed? I think this works in RHSC with same patches

Comment 26 Triveni Rao 2016-04-21 08:53:33 UTC
I have checked with recent version of RHGS-C (3.1.3) and dont see this issue. it works as expected.

Comment 27 Sandro Bonazzola 2016-05-02 09:59:51 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 28 Yaniv Lavi 2016-05-23 13:16:14 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 29 Yaniv Lavi 2016-05-23 13:20:05 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 31 Sahina Bose 2017-09-22 12:00:00 UTC
This is not a commonly seen scenario - hence closing this. Please reopen if you see a need to fix this.