From 4e76e1fb72ce1af012abf412c179d286fd127bd9 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Fri, 1 May 2020 13:23:46 +0200 Subject: [PATCH] pcs commands on host: ovn dbs We add the following depends on because at this stage ovn will be created on the host and the resource-agent won't be present so we have to be able to tell pcs to ignore the non existance of the ovn-dbs ocfg resource on the host. Depends-On: If9048196b5c03e3cfaba72f043b7f7275568bdc4 Depends-On: Iaa7e89f0d25221c2a6ef0b81eb88a6f496f01696 Change-Id: I918b6c16db6ed70d9ad612aecd7af7d725520f7b Related-Bug: #1863442 --- deployment/ovn/ovn-dbs-pacemaker-puppet.yaml | 47 +++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml index 69aaa51a98..87132c7012 100644 --- a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml +++ b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml @@ -146,6 +146,7 @@ outputs: - tripleo::profile::pacemaker::ovn_dbs_bundle::container_backend: {get_param: ContainerCli} - tripleo::profile::pacemaker::ovn_dbs_bundle::dbs_timeout: {get_param: OVNDBSPacemakerTimeout} - tripleo::profile::pacemaker::ovn_dbs_bundle::replication_probe_interval: {get_param: OVNDBSReplicationInterval} + - tripleo::profile::pacemaker::ovn_dbs_bundle::force_ocf: true - tripleo::haproxy::ovn_dbs_manage_lb: if: - use_external_load_balancer @@ -223,8 +224,8 @@ outputs: list_concat: - - '/container_puppet_apply.sh' - '3' - - 'file,file_line,concat,augeas,pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ip,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation,ovn_dbs_remove_old_cruft' - - 'include tripleo::profile::base::pacemaker;include tripleo::profile::pacemaker::ovn_dbs_bundle' + - 'ovn_dbs_remove_old_cruft' + - 'include tripleo::profile::pacemaker::ovn_dbs_bundle' - if: - puppet_debug_enabled - - '--debug' @@ -247,26 +248,6 @@ outputs: # NOTE: this should force this container to re-run on each # update (scale-out, etc.) TRIPLEO_DEPLOY_IDENTIFIER: {get_param: DeployIdentifier} - ovn_dbs_restart_bundle: - start_order: 1 - config_volume: ovn_dbs - detach: false - net: host - ipc: host - user: root - environment: - TRIPLEO_MINOR_UPDATE: '' - command: /var/lib/container-config-scripts/pacemaker_restart_bundle.sh ovn_dbs ovndb_servers ovn-dbs-bundle Slave Master - image: {get_param: ContainerOvnDbsConfigImage} - volumes: - list_concat: - - {get_attr: [ContainersCommon, pacemaker_restart_volumes]} - - if: - - internal_tls_enabled - - - - /etc/pki/tls/certs/ovn_dbs.crt:/etc/pki/tls/certs/ovn_dbs.crt:ro - - /etc/pki/tls/private/ovn_dbs.key:/etc/pki/tls/private/ovn_dbs.key:ro - - null host_prep_tasks: - name: create persistent directories file: @@ -285,6 +266,21 @@ outputs: vars: container_image: {get_param: ContainerOvnDbsImage} container_image_latest: *ovn_dbs_image_pcmklatest + - name: OVNDbs HA Wrappers Step + when: step|int == 3 + block: &ovn_dbs_puppet_bundle + - name: Ovn dbs puppet bundle + import_role: + name: tripleo_ha_wrapper + vars: + tripleo_ha_wrapper_service_name: ovn_dbs + tripleo_ha_wrapper_resource_name: ovndbs_servers + tripleo_ha_wrapper_bundle_name: ovn-dbs-bundle + tripleo_ha_wrapper_resource_state: Slave Master + tripleo_ha_wrapper_puppet_config_volume: ovn_dbs + tripleo_ha_wrapper_puppet_execute: 'include ::tripleo::profile::base::pacemaker; include ::tripleo::profile::pacemaker::ovn_dbs_bundle' + tripleo_ha_wrapper_puppet_tags: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ip,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation' + tripleo_ha_wrapper_puppet_debug: {get_param: ConfigDebug} update_tasks: - name: Tear-down non-HA ovn-dbs containers @@ -371,6 +367,13 @@ outputs: vars: ovn_dbs_image_latest: *ovn_dbs_image_pcmklatest + post_update_tasks: + - name: Ovn dbs bundle post update + when: step|int == 1 + block: *ovn_dbs_puppet_bundle + vars: + tripleo_ha_wrapper_minor_update: true + upgrade_tasks: - name: Tear-down non-HA ovn-dbs container when: