From bfa9dd97a95479c2fa68887178d7e232d1a9a8c5 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 8 Jan 2024 23:12:38 +0100 Subject: [PATCH] Fix Nova scp failures on Debian Bookworm The addition of an instance resize operation [1] to CI testing is triggering a failure in kolla-ansible-debian-ovn jobs, which are using a nodeset with multiple nodes: oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command. Command: scp -r /var/lib/nova/instances/8ca2c7e8-acae-404c-af7d-6cac38e354b8_resize/disk 192.0.2.2:/var/lib/nova/instances/8ca2c7e8-acae-404c-af7d-6cac38e354b8/disk Exit code: 255 Stdout: '' Stderr: "Warning: Permanently added '[192.0.2.2]:8022' (ED25519) to the list of known hosts.\r\nsubsystem request failed on channel 0\r\nscp: Connection closed\r\n" This is not seen on Ubuntu Jammy, which uses OpenSSH 8.9, while Debian Bookworm uses OpenSSH 9.2. This is likely related to this change in OpenSSH 9.0 [2]: This release switches scp(1) from using the legacy scp/rcp protocol to using the SFTP protocol by default. Configure sftp subsystem like on RHEL9 derivatives. Even though it is not yet required for Ubuntu, we also configure it so we are ready for the Noble release. [1] https://review.opendev.org/c/openstack/kolla-ansible/+/904249 [2] https://www.openssh.com/txt/release-9.0 Closes-Bug: #2048700 Change-Id: I9f1129136d7664d5cc3b57ae5f7e8d05c499a2a5 --- ansible/roles/nova-cell/templates/sshd_config.j2 | 2 ++ releasenotes/notes/bug-2048700-98eb939b72079173.yaml | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/bug-2048700-98eb939b72079173.yaml diff --git a/ansible/roles/nova-cell/templates/sshd_config.j2 b/ansible/roles/nova-cell/templates/sshd_config.j2 index eb4aff220f..0f607bc0e6 100644 --- a/ansible/roles/nova-cell/templates/sshd_config.j2 +++ b/ansible/roles/nova-cell/templates/sshd_config.j2 @@ -8,4 +8,6 @@ SyslogFacility AUTHPRIV UsePAM yes {% if kolla_base_distro in ["centos", "rocky"] %} Subsystem sftp /usr/libexec/openssh/sftp-server +{% elif kolla_base_distro in ["debian", "ubuntu"] %} +Subsystem sftp /usr/lib/openssh/sftp-server {% endif %} diff --git a/releasenotes/notes/bug-2048700-98eb939b72079173.yaml b/releasenotes/notes/bug-2048700-98eb939b72079173.yaml new file mode 100644 index 0000000000..a4aec372bf --- /dev/null +++ b/releasenotes/notes/bug-2048700-98eb939b72079173.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes Nova operations using the ``scp`` command, such as cold migration or + resize, on Debian Bookworm. `LP#2048700 + `__