Bug 1495575

Summary: Turn off maintenance mode if upgrade run failed
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Satellite MaintainAssignee: Anurag Patel <apatel>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: apatel, bbuckingham, inecas, kgaikwad, mmccune, nkathole, sghai, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-03 19:18: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:
Bug Depends On:    
Bug Blocks: 1496794, 1526612    
Attachments:
Description Flags
log in foreman-maintain.log file none

Description Nikhil Kathole 2017-09-26 10:32:16 UTC
Created attachment 1330986 [details]
log in foreman-maintain.log file

Description of problem: While running foreman-maintain upgrade run, if upgrade failed in repository setup, firewall set in maintenance mode should turn off.


Version-Release number of selected component (if applicable): Foreman-maintain snap 2.0 


How reproducible: always


Steps to Reproduce:
1. Run #foreman-maintain upgrade run --target-version 6.3 without setting up repositories


Actual results:
Upgrade run will fail due to Error: 'rhel-7-server-satellite-6.3-rpms' does not match a valid repository ID and can not access satellite as maintenance mode on.

Expected results:
Maintenance mode should turn off if upgrade run failed.

Additional info:

Comment 1 Sachin Ghai 2017-09-27 13:13:10 UTC
@Nikhil, If I understand the issue correctly, foreman-maintain set its own firewall rules before upgrade and once upgrade completed successfully, it auto removes those firewall rules right ?

But it doesn't happen when upgrade fails at some step. Do you see any issue if it doesn't clean the rules ? I mean in next run or re-run do you see any issue w/ firewall rules ?

Comment 2 sthirugn@redhat.com 2017-09-27 13:33:18 UTC
Most likely in this scenario the satellite admin will fix the repo issue and try upgrading again.  It is better to leave the satellite in maintenance mode - may be there can be a message saying that satellite continues to be in maintenance mode?

Comment 4 Swapnil Abnave 2017-12-07 12:27:26 UTC
Based on https://bugzilla.redhat.com/show_bug.cgi?id=1495575#c2 Adding need info from Nikhil.

Comment 5 Nikhil Kathole 2017-12-07 12:38:59 UTC
(In reply to Swapnil Abnave from comment #4)
> Based on https://bugzilla.redhat.com/show_bug.cgi?id=1495575#c2 Adding need
> info from Nikhil.

This is not causing any issue in next-run or rerun and yes I agree with comment #2, There should be message saying Satellite is in maintenance mode and use 'foreman-maintain advanced procedure run maintenance-mode-disable' to turn off maintenance mode.

Comment 6 Satellite Program 2018-01-10 15:11:38 UTC
Upstream bug assigned to apatel

Comment 7 Bryan Kearney 2018-10-03 19:18:55 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Rich Jerrido or Bryan Kearney. Thank you.