Bug 1389533 - [RFE] Disable sync plans automatically before upgrade
Summary: [RFE] Disable sync plans automatically before upgrade
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Anurag Patel
QA Contact: Nikhil Kathole
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1459226
TreeView+ depends on / blocked
 
Reported: 2016-10-27 20:07 UTC by sthirugn@redhat.com
Modified: 2020-01-17 16:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-11 19:46:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17743 0 High New Disable sync plans automatically before upgrade 2020-02-11 16:51:33 UTC
Red Hat Bugzilla 1396077 1 None None None 2023-09-07 18:48:50 UTC

Internal Links: 1396077

Description sthirugn@redhat.com 2016-10-27 20:07:58 UTC
Description of problem:
[RFE] Disable sync plans automatically before upgrade

Version-Release number of selected component (if applicable):
satellite-6.2.3-1.0.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Keeping the sync plans enabled during a lengthy upgrade process - creates sync plan tasks which errors or never completes.

Actual results:
Errored sync plan tasks.

Expected results:
[1] Upgrade process needs to automatically disable all the enabled sync plans.
[2] The disabled sync plans should be re-enabled at the end of the upgrade process

Additional info:

Comment 2 Shlomi Zadok 2016-12-19 17:02:47 UTC
Created redmine issue http://projects.theforeman.org/issues/17743 from this bug

Comment 8 Nikhil Kathole 2017-12-19 14:35:00 UTC
VERIFIED

# rpm -q rubygem-foreman_maintain
rubygem-foreman_maintain-0.1.1-1.el7sat.noarch

Running Procedures before migrating to Satellite 6.2.z
================================================================================
Turn on maintenance mode:                                             [OK]
--------------------------------------------------------------------------------
disable active sync plans:
| Total 2 sync plans are now disabled.                                [OK]
--------------------------------------------------------------------------------

D, [2017-12-19 09:28:07-0500 #99697] DEBUG -- : Running command su postgres -c 'cd ~; psql -d foreman' with stdin "COPY (        SELECT id FROM kat
ello_sync_plans WHERE enabled ='t'\n) TO STDOUT WITH CSV HEADER"
D, [2017-12-19 09:28:07-0500 #99697] DEBUG -- : output of the command:
 id
1
2
D, [2017-12-19 09:28:07-0500 #99697] DEBUG -- : Running command LANG=en_US.utf-8 hammer -c "/etc/foreman-maintain/foreman-maintain-hammer.yml" --in
teractive=no sync-plan update --id 1 --enabled false with stdin nil
D, [2017-12-19 09:28:08-0500 #99697] DEBUG -- : output of the command:
 Sync plan updated
D, [2017-12-19 09:28:08-0500 #99697] DEBUG -- : Running command LANG=en_US.utf-8 hammer -c "/etc/foreman-maintain/foreman-maintain-hammer.yml" --in
teractive=no sync-plan update --id 2 --enabled false with stdin nil
D, [2017-12-19 09:28:09-0500 #99697] DEBUG -- : output of the command:
 Sync plan updated


Running Procedures after migrating to Satellite 6.2.z
================================================================================
katello-service start:
| No katello service to start                                         [OK]
--------------------------------------------------------------------------------
Turn off maintenance mode:                                            [OK]
--------------------------------------------------------------------------------
re-enable sync plans:
- Total 2 sync plans are now enabled.                                 [OK]
--------------------------------------------------------------------------------

D, [2017-12-19 09:33:08-0500 #99697] DEBUG -- : Running command LANG=en_US.utf-8 hammer -c "/etc/foreman-maintain/foreman-maintain-hammer.yml" --in
teractive=no sync-plan update --id 1 --enabled true with stdin nil
D, [2017-12-19 09:33:12-0500 #99697] DEBUG -- : output of the command:
 Sync plan updated
D, [2017-12-19 09:33:12-0500 #99697] DEBUG -- : Running command LANG=en_US.utf-8 hammer -c "/etc/foreman-maintain/foreman-maintain-hammer.yml" --in
teractive=no sync-plan update --id 2 --enabled true with stdin nil
D, [2017-12-19 09:33:13-0500 #99697] DEBUG -- : output of the command:
 Sync plan updated

Comment 9 Bryan Kearney 2018-01-11 19:46:57 UTC
rubygem-foreman_maintain-0.1.1-1.el7sat.noarch has been released. Closing this out.


Note You need to log in before you can comment on or make changes to this bug.