nova-migration-target: Simplify port configuration

This change replaces usage of -p command line option by the listen
option in sshd_config. Now the nova migration target is decoupled from
the host sshd service so we can use the ssh::* parameters to customize
only the target service.

Change-Id: I53fb0229babe46c30b8ffe6b02caa43ad5294d68
This commit is contained in:
Takashi Kajinami 2022-06-07 13:51:48 +09:00
parent 2b64419f09
commit 9168ffa82d
1 changed files with 5 additions and 10 deletions

View File

@ -138,7 +138,10 @@ outputs:
params:
$NETWORK: {get_param: [ServiceNetMap, NovaLibvirtNetwork]}
tripleo::profile::base::sshd::port:
- 22
- if:
- docker_nova_migration_ssh_port_set
- {get_param: DockerNovaMigrationSshdPort}
- {get_param: MigrationSshPort}
tripleo::profile::base::sshd::password_authentication: 'no'
tripleo::profile::base::sshd::options:
HostKey:
@ -170,15 +173,7 @@ outputs:
config_image: {get_attr: [RoleParametersValue, value, ContainerNovaLibvirtConfigImage]}
kolla_config:
/var/lib/kolla/config_files/nova-migration-target.json:
command:
str_replace:
template: "/usr/sbin/sshd -D -p SSHDPORT"
params:
SSHDPORT:
if:
- docker_nova_migration_ssh_port_set
- {get_param: DockerNovaMigrationSshdPort}
- {get_param: MigrationSshPort}
command: "/usr/sbin/sshd -D"
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"