Bug 1104104

Summary: promoting a CV to next env when a promotion already ongoing for another env, raised ISE error in production.log
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: Tazim Kolhar <tkolhar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, cwelton, jhutar, jmontleo, tkolhar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/6646
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-11 12:28:04 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:
Attachments:
Description Flags
promoting a CV to next env, when a promotion already ongoing for another env, raised ISE error in production.log
none
Logs from production.log none

Description Sachin Ghai 2014-06-03 09:51:12 UTC
Created attachment 901728 [details]
promoting a CV to next env, when a promotion already ongoing for another env, raised ISE error in production.log

Description of problem:
I created environments for promoting CV's: like

Library-->dev--> test

I created a CV and published it to 'Library' env. And later I promoted it to next env "dev". So when the promotion was on-going for "dev", I tried to promote same CV to next env "test". And UI throws following error:

---
Required lock is already taken by other running tasks. Please inspect their state, fix their errors nad resume them. Required lock: read Conflicts with tasks: - https://dhcp207-55.lab.eng.pnq.redhat.com/foreman_tasks/tasks/595cf53f-1daa-4d4a-91ff-d7331eb492e5 
---

I know that its expected since a promotion is already on-going. But I think we should make the error message more clear?
OR
we should disable the promote button when a promotion is already on-going ?
AND
In any case, "Internal server Error" shouldn't be thrown in production.log


Version-Release number of selected component (if applicable):
sat6 beta sanp7 compose2 (Satellite-6.0.3-RHEL-6-20140528.4)

How reproducible:
always

Steps to Reproduce:
1. create env for promoting CV's: like
Library-->dev--> test
2. create a CV and publish it
3. Now promote it to next env "dev"
4. when promotion to "dev" is ongoing, again try to promote and select env "test"


Actual results:
UI throws:
---
Required lock is already taken by other running tasks. Please inspect their state, fix their errors nad resume them. Required lock: read Conflicts with tasks: - https://dhcp207-55.lab.eng.pnq.redhat.com/foreman_tasks/tasks/595cf53f-1daa-4d4a-91ff-d7331eb492e5 
---

500 Internal Server Error in production.log


Expected results:
1. In any case, "Internal server Error" shouldn't be thrown in production.log
2. The raised message should be more clear from end user perspective. Promotion to "env" is already in-progress, please wait until the current promotion is finished..somthing like this ?
3. The best would be, disable the promote button when a promotion is already on-going ?

Additional info:

Comment 1 Sachin Ghai 2014-06-03 09:53:40 UTC
Created attachment 901731 [details]
Logs from production.log

Comment 2 RHEL Program Management 2014-06-03 10:14:58 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Brad Buckingham 2014-07-16 17:44:46 UTC
Created redmine issue http://projects.theforeman.org/issues/6646 from this bug

Comment 5 Brad Buckingham 2014-07-16 21:17:53 UTC
Proposed fix in Katello PR: https://github.com/Katello/katello/pull/4447

Comment 6 Brad Buckingham 2014-07-16 21:20:48 UTC
When verifying this one recommend validating the following:

1. when publishing a version, the promote/remove buttons are disabled for the version
2. when promoting a version, the promote/remove buttons are disabled for the version

This will confirm the scenario from bug 1085247.

Comment 7 Brad Buckingham 2014-07-16 21:20:55 UTC
*** Bug 1085247 has been marked as a duplicate of this bug. ***

Comment 8 Jan Hutaƙ 2014-07-18 09:52:34 UTC
(In reply to Brad Buckingham from comment #6)
> When verifying this one recommend validating the following:
> 
> 1. when publishing a version, the promote/remove buttons are disabled for
> the version
> 2. when promoting a version, the promote/remove buttons are disabled for the
> version
> 
> This will confirm the scenario from bug 1085247.

Another use case might be to make sure hammer handles it somehow as well.

Comment 10 Tazim Kolhar 2014-08-08 13:34:20 UTC
VERIFIED

Comment 12 Bryan Kearney 2014-09-11 12:28:04 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.