Cannot run remote backup from an arbitrary host that is not StarlingX

Bug #1986691 reported by Thiago Paiva Brito
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Thiago Paiva Brito

Bug Description

Brief Description
-----------------
Trying to run a remote backup from an arbitrary host that is not an StarlingX OS (using say, an Ubuntu external workstation as Ansible Controller), the backup playbook fails at task "Read in last kubernetes config values (extraArgs and extraVolumes)" trying to include_vars from "/opt/platform/config/22.12/last_kube_extra_config_bootstrap.yaml", but from the Ansible Controller instead of the remote. Apparently there is a misusage of include_vars, that does not support including vars from remote files.

This has a possible hidden impact on the DC configurations as it would get the last_kube_extra_config_bootstrap.yaml from the systemcontroller instead of any subcloud. If there are incompatible configurations between them, there is a possibility for a B&R or upgrade failure.

Severity
--------
Major: System/Feature is usable on local play, on remote play from a StarlingX OS, but not from an arbitrary host

Steps to Reproduce
------------------
Run the backup playbook as a remote play from an OS that doesn't contain StarlingX installed on it

Expected Behavior
------------------
Backup finishes

Actual Behavior
----------------
Backup fails due to missing file on the Ansible Controller

Reproducibility
---------------
5/5

System Configuration
--------------------
AIO-SX, but affects all configurations

Branch/Pull Time/Commit
-----------------------
2022-08-05

Last Pass
---------
N/A

Timestamp/Logs
--------------
TASK [common/prepare-env : Read in last kubernetes config values (extraArgs and extraVolumes)] ***************************************************************************************************************************************************************************
task path: /home/tbrito/workspace/repos/starlingx/cgcs-root/stx/ansible-playbooks/playbookconfig/src/playbooks/roles/common/prepare-env/tasks/kube-extra-save-configuration.yml:12
fatal: [lab_vbox_2]: FAILED! => {
    "ansible_facts": {},
    "ansible_included_var_files": [],
    "changed": false,
    "message": "Could not find or access '/opt/platform/config/22.12/last_kube_extra_config_bootstrap.yaml' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"
}
Read vars_file 'host_vars/backup-restore/default.yml'

Test Activity
-------------
Developer Testing

Workaround
----------
N/A

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Changed in starlingx:
status: New → In Progress
description: updated
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/+/853360
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/a80d03e5af86f847e35c33d856b390f5b6c74ffe
Submitter: "Zuul (22348)"
Branch: master

commit a80d03e5af86f847e35c33d856b390f5b6c74ffe
Author: Thiago Brito <email address hidden>
Date: Tue Aug 16 14:21:15 2022 -0300

    Fix remote play for backup and restore

    This change fixes the cases where ansible is looking for vars file on
    the AnsibleController instead of the remote StarlingX. Also, this
    file adds requirements.txt and uses it for the tox "venv" setup in
    order to provide an wasy way for a user to create an environment to
    remotely run ansible with the same toolset we have on a StarlingX ISO.

    TEST PLAN
    PASS remote play for backup
    PASS local play for backup
    PASS remote play for restore
    PASS local play for restore

    Closes-Bug: #1986691
    Signed-off-by: Thiago Brito <email address hidden>
    Change-Id: I27ea61428afafbd12434fca6f7bef4526ee01559

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
assignee: nobody → Thiago Paiva Brito (outbrito)
tags: added: stx.8.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.