Bug #21596

foreman-maintain upgrade run fails on disabling sync plans

Added by Kavita Gaikwad 7 months ago. Updated 6 months ago.

Status:Closed
Priority:High
Assigned To:Kavita Gaikwad
Category:Upgrades
Target version:Foreman - Team Anurag Iteration 22
Difficulty: Bugzilla link:1509364
Found in release: Pull request:https://github.com/theforeman/foreman_maintain/pull/125
Story points-
Velocity based estimate-

Description

Description of problem:
  1. foreman-maintain upgrade run --target-version=6.3

~~
disabling sync plans [FAIL]
Could not update the sync plan:
Couldn't find sync plan '0' in organization ''
~
~

Version-Release number of selected component (if applicable):
  1. rpm -qa | grep maint
    rubygem-foreman_maintain-0.0.10-1.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. # foreman-maintain upgrade run --target-version=6.3
2.
3.

Actual results:
[root@dell-r330-7 backup]# foreman-maintain upgrade run --target-version=6.3
Running preparation steps required to run the next scenarios ================================================================================
Procedures::Packages::Install:
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Sat6-CI_Red_Hat_Satellite_6_3_Composes_Satellite_6_3_RHEL7 | 2.1 kB 00:00:00
Package hdparm-9.43-5.el7.x86_64 already installed and latest version
No package fio available.
Nothing to do
Uploading Enabled Repositories Report
Loaded plugins: product-id
Unable to upload Enabled Repositories Report
[OK]
--------------------------------------------------------------------------------

Running Checks before upgrading to Satellite 6.3 ================================================================================
Check for paused tasks: [OK]
--------------------------------------------------------------------------------
Check whether all services are running using hammer ping: [OK]
--------------------------------------------------------------------------------
Check for running tasks: [OK]
--------------------------------------------------------------------------------
Check for old tasks in paused/stopped state: [OK]
--------------------------------------------------------------------------------
Check for pending tasks which are safe to delete: [OK]
--------------------------------------------------------------------------------
Check for tasks in planning state: [OK]
--------------------------------------------------------------------------------
Check for recommended disk speed of pulp, mongodb, pgsql dir.:
- Finished [OK]
--------------------------------------------------------------------------------

The pre-upgrade checks indicate that the system is ready for upgrade.
It's recommended to perform a backup at this stage.
Confirm to continue with the the modification part of the upgrade, [y(yes), n(no), q(quit)] yes
Running Procedures before migrating to Satellite 6.3 ================================================================================
Turn on maintenance mode: [OK]
--------------------------------------------------------------------------------
disable active sync plans: | disabling sync plans [FAIL]
Could not update the sync plan:
Couldn't find sync plan '0' in organization ''
--------------------------------------------------------------------------------
Scenario [Procedures before migrating to Satellite 6.3] failed.

The following steps ended up in failing state:

[sync-plans-disable]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="sync-plans-disable"

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

Running Checks after upgrading to Satellite 6.3 ================================================================================
Check for paused tasks: [OK]
--------------------------------------------------------------------------------
Check whether all services are running using hammer ping: [OK]
--------------------------------------------------------------------------------

The upgrade failed and system was restored to pre-upgrade state.

Expected results:
No failure

Able to workaround the issue with:
  1. foreman-maintain upgrade run --target-version=6.3 --whitelist="sync-plans-disable"

Additional info:

hammer> organization list
---|---------|---------|------------
ID | NAME | LABEL | DESCRIPTION
---|---------|---------|------------
1 | ORG | ORG |
---|---------|---------|------------

hammer> sync-plan list --organization-id 1
---|---------|---------------------|----------|--------
ID | NAME | START DATE | INTERVAL | ENABLED
---|---------|---------------------|----------|--------
1 | Default | 2016/07/27 02:00:00 | daily | no
---|---------|---------------------|----------|--------

Associated revisions

Revision 0e7de940
Added by Kavita Gaikwad 6 months ago

Fixes #21596 - warnings related to profile files on bash load

History

#1 Updated by The Foreman Bot 6 months ago

  • Pull request https://github.com/theforeman/foreman_maintain/pull/125 added

#2 Updated by Kavita Gaikwad 6 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF