From 68c6f280b1ca77f9c01dac257e0a603f51809eb7 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Wed, 6 Sep 2017 11:19:48 +0100 Subject: Support for Ocata-Pike live-migration over ssh In Ocata all live-migration over ssh is performed on the default ssh port (22). In Pike the containerized live-migration over ssh is on port 2022 as the docker host's sshd is using port 22. To allow live migration during upgrade we need to temporarily pin the Pike computes to port 22 and in the final converge we can switch over to port 2022. This patch make the necessary puppet-tripleo change to allow this: - Adds support in sshd profile for listening on multiple ports. - Adds a profile to allow proxying to the containerized sshd from the baremetal sshd Change-Id: I0b80b81711f683be539939e7d084365ff63546d3 Related-bug: 1714171 (cherry picked from commit 05a413c34fa1266d38bf991a1f5ed2795631f0b7) --- manifests/profile/base/sshd.pp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'manifests/profile/base/sshd.pp') diff --git a/manifests/profile/base/sshd.pp b/manifests/profile/base/sshd.pp index 3f0245d..22520e9 100644 --- a/manifests/profile/base/sshd.pp +++ b/manifests/profile/base/sshd.pp @@ -31,11 +31,16 @@ # Hash of SSHD options to set. See the puppet-ssh module documentation for # details. # Defaults to {} +# +# [*port*] +# SSH port or list of ports to bind to +# Defaults to [22] class tripleo::profile::base::sshd ( $bannertext = hiera('BannerText', undef), $motd = hiera('MOTD', undef), - $options = {} + $options = {}, + $port = [22], ) { if $bannertext and $bannertext != '' { @@ -67,10 +72,18 @@ class tripleo::profile::base::sshd ( $sshd_options_motd = {} } + if $options['Port'] { + $sshd_options_port = {'Port' => unique(concat(any2array($options['Port']), $port))} + } + else { + $sshd_options_port = {'Port' => unique(any2array($port))} + } + $sshd_options = merge( $options, $sshd_options_banner, - $sshd_options_motd + $sshd_options_motd, + $sshd_options_port ) # NB (owalsh) in puppet-ssh hiera takes precedence over the class param -- cgit 1.2.3-korg