Software local upgrade failed during ansible due to undefined ssh_hostname variable

Bug #1976520 reported by Bo Yuan Chang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Bo Yuan Chang

Bug Description

Brief Description

Upgrade fail during ansible-playbook /usr/share/ansible/stx-ansible/playbooks/
upgrade_platform.yml because of an undefined variable

 fatal: [localhost]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: 'ssh_hostname' is undefined

    The error appears to have been in '/usr/share/ansible/stx-ansible/playbooks/roles/restore-platform/restore-more-data/tasks/main.yml': line 158, col
umn 5, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

      - name: Gather latest SSH public key
        ^ here

Severity

Critical

Steps to Reproduce

1) Upgrade system from N to N+1 (upload license and iso)
2) Continue upgrade (Restore the upgrade data) running ansible-playbook /usr/share/ansible/stx-ansible/playbooks/upgrade_platform.yml

Expected Behavior

Upgrade system without errors.

Actual Behavior

Upgrade system failing.

Reproducibility

Reproducible

System Configuration

AIO-SX
master build

Last Pass

None.

Alarms

None.

Test Activity

Developer Testing

Workaround

None.

Changed in starlingx:
assignee: nobody → Bo Yuan Chang (cby19961020)
status: New → In Progress
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/c/starlingx/ansible-playbooks/+/844332
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/ac83f0b8159aa48e84d9216d971271a4d0f5850e
Submitter: "Zuul (22348)"
Branch: master

commit ac83f0b8159aa48e84d9216d971271a4d0f5850e
Author: BoYuan Chang <email address hidden>
Date: Wed Jun 1 14:43:58 2022 -0400

    Skip the remote ssh key check on Simplex local upgrade

    The previous change to restore-more-data role [1] used by
    platform_upgrade.yml playbook did not take into consideration of local
    execution of this playbook during AIO-SX upgrade. This commit ensures
    that known_hosts file update only occurs when platform_upgrade.yml
    playbook runs remotely e.g. during orchestrated subcloud upgrade case.

    Test Plan:

    1. Ensure Simplex can be upgraded from N to N+1 without error

    [1] https://review.opendev.org/c/starlingx/ansible-playbooks/+/838949
    Closes-Bug: 1976520
    Signed-off-by: BoYuan Chang <email address hidden>
    Change-Id: Ie2dca2f3c07eaa5950dae85e6d3e85c13312adc9

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.update
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.