diff options
-rw-r--r-- | docker/services/database/mysql.yaml | 26 | ||||
-rw-r--r-- | docker/services/pacemaker/database/mysql.yaml | 6 | ||||
-rw-r--r-- | docker/services/sensu-client.yaml | 6 | ||||
-rw-r--r-- | network/service_net_map.j2.yaml | 1 | ||||
-rw-r--r-- | puppet/services/nova-base.yaml | 3 | ||||
-rw-r--r-- | puppet/services/nova-migration-target.yaml | 10 | ||||
-rw-r--r-- | puppet/services/tripleo-packages.yaml | 9 |
7 files changed, 51 insertions, 10 deletions
diff --git a/docker/services/database/mysql.yaml b/docker/services/database/mysql.yaml index c434ab76..174acd44 100644 --- a/docker/services/database/mysql.yaml +++ b/docker/services/database/mysql.yaml @@ -127,11 +127,26 @@ outputs: command: ['/bin/bash', '-c', 'chown -R mysql:mysql /var/log/mariadb'] step_2: mysql_bootstrap: + start_order: 1 detach: false image: *mysql_image net: host + user: root # Kolla bootstraps aren't idempotent, explicitly checking if bootstrap was done - command: ['bash', '-c', 'test -e /var/lib/mysql/mysql || kolla_start'] + command: + - 'bash' + - '-ecx' + - + list_join: + - "\n" + - - 'if [ -e /var/lib/mysql/mysql ]; then exit 0; fi' + - 'echo -e "\n[mysqld]\nwsrep_provider=none" >> /etc/my.cnf' + - 'sudo -u mysql -E kolla_start' + - 'mysqld_safe --skip-networking --wsrep-on=OFF &' + - 'timeout ${DB_MAX_TIMEOUT} /bin/bash -c ''until mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" ping 2>/dev/null; do sleep 1; done''' + - 'mysql -uroot -p"${DB_ROOT_PASSWORD}" -e "CREATE USER ''mysql''@''localhost'';"' + - 'mysql -uroot -p"${DB_ROOT_PASSWORD}" -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM ''mysql''@''localhost'';"' + - 'timeout ${DB_MAX_TIMEOUT} mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" shutdown' volumes: &mysql_volumes list_concat: - @@ -143,7 +158,7 @@ outputs: - /var/log/containers/mysql:/var/log/mariadb - if: - internal_tls_enabled - - + - - list_join: - ':' - - {get_param: InternalTLSCAFile} @@ -151,12 +166,13 @@ outputs: - 'ro' - /etc/pki/tls/certs/mysql.crt:/var/lib/kolla/config_files/src-tls/etc/pki/tls/certs/mysql.crt:ro - /etc/pki/tls/private/mysql.key:/var/lib/kolla/config_files/src-tls/etc/pki/tls/private/mysql.key:ro - - null + - null environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_BOOTSTRAP=True # NOTE(mandre) skip wsrep cluster status check - KOLLA_KUBERNETES=True + - DB_MAX_TIMEOUT=60 - list_join: - '=' @@ -191,7 +207,7 @@ outputs: - /var/lib/config-data/mysql/root:/root:ro #provides .my.cnf - if: - internal_tls_enabled - - + - - list_join: - ':' - - {get_param: InternalTLSCAFile} @@ -199,7 +215,7 @@ outputs: - 'ro' - /etc/pki/tls/certs/mysql.crt:/var/lib/kolla/config_files/src-tls/etc/pki/tls/certs/mysql.crt:ro - /etc/pki/tls/private/mysql.key:/var/lib/kolla/config_files/src-tls/etc/pki/tls/private/mysql.key:ro - - null + - null metadata_settings: get_attr: [MysqlPuppetBase, role_data, metadata_settings] host_prep_tasks: diff --git a/docker/services/pacemaker/database/mysql.yaml b/docker/services/pacemaker/database/mysql.yaml index 39bbf42a..a65117fc 100644 --- a/docker/services/pacemaker/database/mysql.yaml +++ b/docker/services/pacemaker/database/mysql.yaml @@ -97,6 +97,12 @@ outputs: - 4567 - 4568 - 9200 + tripleo::profile::pacemaker::database::mysql_bundle::bind_address: + str_replace: + template: + "%{hiera('fqdn_$NETWORK')}" + params: + $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]} - if: - internal_tls_enabled diff --git a/docker/services/sensu-client.yaml b/docker/services/sensu-client.yaml index b64231cd..a535af46 100644 --- a/docker/services/sensu-client.yaml +++ b/docker/services/sensu-client.yaml @@ -39,13 +39,17 @@ parameters: SensuDockerCheckCommand: type: string default: | + output='' for i in $(docker ps --format '{{.ID}}'); do if result=$(docker inspect --format='{{.State.Health.Status}}' $i 2>/dev/null); then if [ "$result" != 'healthy' ]; then - echo "$(docker inspect --format='{{.Name}}' $i) ($i): $(docker inspect --format='{{json .State}}' $i)" && exit 2; + output="${output} ; $(docker inspect --format='{{.Name}}' $i) ($i): $(docker inspect --format='{{(index .State.Health.Log 0).Output}}' $i)"; fi fi done + if [ ! -z "${output}" ]; then + echo ${output:3} && exit 2; + fi SensuDockerCheckInterval: type: number description: The frequency in seconds the docker health check is executed. diff --git a/network/service_net_map.j2.yaml b/network/service_net_map.j2.yaml index 54646c38..e19ccd84 100644 --- a/network/service_net_map.j2.yaml +++ b/network/service_net_map.j2.yaml @@ -55,7 +55,6 @@ parameters: HeatApiCfnNetwork: internal_api HeatApiCloudwatchNetwork: internal_api NovaApiNetwork: internal_api - NovaColdMigrationNetwork: ctlplane NovaPlacementNetwork: internal_api NovaMetadataNetwork: internal_api NovaVncProxyNetwork: internal_api diff --git a/puppet/services/nova-base.yaml b/puppet/services/nova-base.yaml index 08302ee9..55392086 100644 --- a/puppet/services/nova-base.yaml +++ b/puppet/services/nova-base.yaml @@ -159,7 +159,8 @@ outputs: service_name: nova_base config_settings: map_merge: - - nova::rabbit_password: {get_param: RabbitPassword} + - nova::my_ip: {get_param: [ServiceNetMap, NovaApiNetwork]} + nova::rabbit_password: {get_param: RabbitPassword} nova::rabbit_userid: {get_param: RabbitUserName} nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL} nova::rabbit_port: {get_param: RabbitClientPort} diff --git a/puppet/services/nova-migration-target.yaml b/puppet/services/nova-migration-target.yaml index 0c2b419e..e121d37a 100644 --- a/puppet/services/nova-migration-target.yaml +++ b/puppet/services/nova-migration-target.yaml @@ -55,8 +55,14 @@ outputs: tripleo::profile::base::nova::migration::target::ssh_localaddrs: - "%{hiera('cold_migration_ssh_inbound_addr')}" - "%{hiera('live_migration_ssh_inbound_addr')}" - live_migration_ssh_inbound_addr: {get_param: [ServiceNetMap, NovaLibvirtNetwork]} - cold_migration_ssh_inbound_addr: {get_param: [ServiceNetMap, NovaColdMigrationNetwork]} + live_migration_ssh_inbound_addr: + get_param: + - ServiceNetMap + - str_replace: + template: "ROLENAMEHostnameResolveNetwork" + params: + ROLENAME: {get_param: RoleName} + cold_migration_ssh_inbound_addr: {get_param: [ServiceNetMap, NovaApiNetwork]} tripleo::profile::base::sshd::port: - 22 - {get_param: MigrationSshPort} diff --git a/puppet/services/tripleo-packages.yaml b/puppet/services/tripleo-packages.yaml index 766c7525..bfdac3e3 100644 --- a/puppet/services/tripleo-packages.yaml +++ b/puppet/services/tripleo-packages.yaml @@ -53,6 +53,15 @@ outputs: fail: msg="rpm-python package was not present before this run! Check environment before re-running" when: rpm_python_check.changed != false tags: step0 + - block: + - name: Upgrade os-net-config + yum: name=os-net-config state=latest + - name: take new os-net-config parameters into account now + command: os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes + register: os_net_config_upgrade + failed_when: os_net_config_upgrade.rc not in [0,2] + changed_when: os_net_config_upgrade.rc == 2 + tags: step3 - name: Update all packages tags: step3 yum: name=* state=latest |