Comment 4 for bug 2011604

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/+/879365
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/8faf51938f89bf86662475384532345f790c9acf
Submitter: "Zuul (22348)"
Branch: master

commit 8faf51938f89bf86662475384532345f790c9acf
Author: Victor Romano <email address hidden>
Date: Tue Mar 14 19:07:05 2023 -0300

    Change subcloud backup transfer to synchronize

    If the user makes a backup of a subcloud or any other operation that
    requires ssh/scp as root by hostname using the System Controller,
    the subcloud host key will be saved on the root known_hosts. If the
    subcloud host key changes, like if the system is reinstalled, and
    another backup is attempted, the operation will fail because of the
    presence of the previous host key on the System Controller root
    known_hosts.
    The backup transfer method was changed from running rsync using command
    to the synchronize module from Ansible posix collection, so the ssh
    handling is taken care by Ansible.
    The restore transfer was also changed to synchronize, to make sure
    the file transfer was still possible after the folder permission
    change during the backup process.

    Test plan:
      PASS:
      - Backup subcloud1 using dcmanager
      - Change subcloud1 host keys
        (by removing old keys and running "ssh-keygen -A")
      - Backup new subcloud and verify that the process ended without errors
      - Reinstall and restore the subcloud and verify that the process ended
        without errors
      PASS:
      - Backup subcloud1 using dcmanager
      - Delete and reinstall subcloud1
      - Backup new subcloud and verify that the process ended without errors
      - Reinstall and restore the subcloud and verify that the process ended
        without errors

    Closes-Bug: 2011604

    Signed-off-by: Victor Romano <email address hidden>
    Change-Id: I3cc7624186aac62dcfb0d9dff413e7d98d57810b