Undercloud - Restart keepalived on update

instack-undercloud had a workaround (30-reload-keepalived)
in place to always restart keepalived on install/upgrade.
This is required to ensure VIP's are present in case the
network config was changed and os-net-config restarts
the network interface. When containerizing the undercloud
this workaround was missed.

This change adds a similar workaround. A pre_deploy
NodeExtraconfig script will restart the keepalived
container when the undercloud installer is (re-)run.

NOTE: We can remove this workaround once keepalived
      v2.0.6 or later is available.

Closes-Bug: #1791238
Change-Id: I8cada7be57cd50c54ca5f2f38ec010062512ae06
This commit is contained in:
Harald Jensås 2018-09-19 09:28:16 +02:00
parent ab24d472f1
commit b766e253f4
4 changed files with 39 additions and 0 deletions

View File

@ -2,6 +2,7 @@ resource_registry:
OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/noop.yaml
OS::TripleO::Network::Ports::ControlPlaneVipPort: ../deployed-server/deployed-neutron-port.yaml
OS::TripleO::Undercloud::Net::SoftwareConfig: ../net-config-undercloud.yaml
OS::TripleO::NodeExtraConfig: ../extraconfig/pre_deploy/undercloud_pre.yaml
OS::TripleO::NodeExtraConfigPost: ../extraconfig/post_deploy/undercloud_post.yaml
OS::TripleO::Services::DockerRegistry: ../puppet/services/docker-registry.yaml
OS::TripleO::Services::ContainerImagePrepare: ../puppet/services/container-image-prepare.yaml

View File

@ -0,0 +1,8 @@
#!/bin/bash
# This needs to be run after os-net-config. since os-net-config potentially can
# restart network interfaces, which would affects VIPs controlled by
# keepalived.
# TODO(hjensas): Remove this when we have keepalived 2.0.6 or later.
docker container restart keepalived || true

View File

@ -0,0 +1,23 @@
heat_template_version: rocky
description: >
Pre-deployment for the TripleO undercloud
parameters:
server:
type: string
resources:
UndercloudPreConfig:
type: OS::Heat::SoftwareConfig
properties:
group: script
config: {get_file: ./undercloud_pre.sh}
UndercloudPreDeployment:
type: OS::Heat::SoftwareDeployment
properties:
name: UndercloudPreDeployment
server: {get_param: server}
config: {get_resource: UndercloudPreConfig}

View File

@ -0,0 +1,7 @@
---
fixes:
- |
An issue causing undercloud installer re-run (or update) to fail because
VIP's where lost in case the networking configuration was changed has been
fixed. See `Bug: 1791238
<https://bugs.launchpad.net/tripleo/+bug/1791238>`_.