[rhsm] Upgrade fails when using rhsm if the overcloud nodes are alread registered in satellite

Bug #1807987 reported by Jose Luis Franco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Jose Luis Franco

Bug Description

When upgrading frm osp13 to osp14 having an already registered overcloud via Satellite (old rhel-registration service was used during deployment) the overcloud upgrade run command will fail because it can't find some puppet classes. This is usually a sign that the overcloud nodes did not have their repositories updated to the last version.
This can be observed in the upgrade_tasks when rhsm service invokes redhat-subsciption ansible role:

u'TASK [redhat-subscription : SATELLITE 6 | Install katello-ca-consumer] *********',
 u'Tuesday 11 December 2018 07:15:18 -0500 (0:00:00.916) 0:01:05.081 ****** ',
 u'ok: [controller-0] => {"changed": false, "msg": "", "rc": 0, "results": ["katello-ca-consumer-rhos-compute-node-08.lab.eng.rdu2.redhat.com-1.0-2.noarch providing /tmp/katello-ca-consumer-latest.noarchK641hh.rpm is already installed"]}',
 u'',
 u'TASK [redhat-subscription : SATELLITE 6 | Execute katello-rhsm-consumer] *******',
 u'Tuesday 11 December 2018 07:15:23 -0500 (0:00:05.216) 0:01:10.298 ****** ',
 u'skipping: [controller-0] => {"changed": false, "skip_reason": "Conditional result was False"}',
 u'',
 u'TASK [redhat-subscription : Manage Red Hat subscription] ***********************',
 u'Tuesday 11 December 2018 07:15:24 -0500 (0:00:00.392) 0:01:10.690 ****** ',
 u'ok: [controller-0] => {"changed": false, "msg": "System already registered."}',
 u'',
 u'TASK [redhat-subscription : Configure repository subscriptions] ****************',
 u'Tuesday 11 December 2018 07:15:26 -0500 (0:00:01.948) 0:01:12.639 ****** ',
 u'skipping: [controller-0] => {"changed": false, "skip_reason": "Conditional result was False"}',
 u'',
 u'TASK [Check if swift-proxy or swift-object-expirer are deployed] ***************',
 u'Tuesday 11 December 2018 07:15:26 -0500 (0:00:00.285) 0:01:12.924 ****** ',

The role does not register the environment with the new osp14 activation key provided because the system was already registered.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/624431

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/624431
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=25a4fb7b62c158d1c7109b32482f0f5c56149cba
Submitter: Zuul
Branch: master

commit 25a4fb7b62c158d1c7109b32482f0f5c56149cba
Author: Jose Luis Franco Arza <email address hidden>
Date: Tue Dec 11 17:17:29 2018 +0100

    Force rhsm re-registration during upgrades.

    The redhat-subscription ansible module doesn't cover the case
    when a system is already registered via Satellite and we try to
    upgrade it's repositories to a new version providing a different
    activation key. The role will catch that the system is already
    registered and it won't register the new activation key.
    This patch passes the rhsm_force_registration option when invoking
    redhat-subscription during an upgrade. This way the system will
    be unregistered and registered again, activating the new key passed.

    Change-Id: I9cd35882e5db47d22df8a456749188c17b48e451
    Closes-Bug: #1807987

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/624739

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/rocky)

Reviewed: https://review.openstack.org/624739
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=e6c373f2fae264e66134018163eedd7cd7a5ec17
Submitter: Zuul
Branch: stable/rocky

commit e6c373f2fae264e66134018163eedd7cd7a5ec17
Author: Jose Luis Franco Arza <email address hidden>
Date: Tue Dec 11 17:17:29 2018 +0100

    Force rhsm re-registration during upgrades.

    The redhat-subscription ansible module doesn't cover the case
    when a system is already registered via Satellite and we try to
    upgrade it's repositories to a new version providing a different
    activation key. The role will catch that the system is already
    registered and it won't register the new activation key.
    This patch passes the rhsm_force_registration option when invoking
    redhat-subscription during an upgrade. This way the system will
    be unregistered and registered again, activating the new key passed.

    Change-Id: I9cd35882e5db47d22df8a456749188c17b48e451
    Closes-Bug: #1807987
    (cherry picked from commit 25a4fb7b62c158d1c7109b32482f0f5c56149cba)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.2.0

This issue was fixed in the openstack/tripleo-heat-templates 9.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.3.0

This issue was fixed in the openstack/tripleo-heat-templates 10.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.