X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docker%2Fservices%2Fpacemaker%2Fcinder-volume.yaml;h=262e999dd6c15d43a8e3f1b7645b035f539c2365;hb=5cbcc8377c49e395dc1d02a976d9b4a94253f5ca;hp=987ebaf07741412b66b8d48ddb4162164b0eb454;hpb=6faea7a26b75b8e4db348be737c2bdaa3ec6b125;p=apex-tripleo-heat-templates.git diff --git a/docker/services/pacemaker/cinder-volume.yaml b/docker/services/pacemaker/cinder-volume.yaml index 987ebaf0..262e999d 100644 --- a/docker/services/pacemaker/cinder-volume.yaml +++ b/docker/services/pacemaker/cinder-volume.yaml @@ -4,24 +4,21 @@ description: > OpenStack containerized Cinder Volume service parameters: - DockerNamespace: - description: namespace - default: 'tripleoupstream' - type: string DockerCinderVolumeImage: description: image - default: 'centos-binary-cinder-volume:latest' type: string - # we configure all cinder services in the same cinder base container DockerCinderConfigImage: - description: image - default: 'centos-binary-cinder-api:latest' + description: The container image to use for the cinder config_volume type: string EndpointMap: default: {} description: Mapping of service endpoint -> protocol. Typically set via parameter_defaults in the resource registry. type: json + ServiceData: + default: {} + description: Dictionary packing service data + type: json ServiceNetMap: default: {} description: Mapping of service_name -> network name. Typically set @@ -55,6 +52,7 @@ resources: type: ../../../puppet/services/cinder-volume.yaml properties: EndpointMap: {get_param: EndpointMap} + ServiceData: {get_param: ServiceData} ServiceNetMap: {get_param: ServiceNetMap} DefaultPasswords: {get_param: DefaultPasswords} RoleName: {get_param: RoleName} @@ -68,10 +66,7 @@ outputs: config_settings: map_merge: - get_attr: [CinderBase, role_data, config_settings] - - tripleo::profile::pacemaker::cinder::volume_bundle::cinder_volume_docker_image: &cinder_volume_image - list_join: - - '/' - - [ {get_param: DockerNamespace}, {get_param: DockerCinderVolumeImage} ] + - tripleo::profile::pacemaker::cinder::volume_bundle::cinder_volume_docker_image: &cinder_volume_image {get_param: DockerCinderVolumeImage} cinder::volume::manage_service: false cinder::volume::enabled: false cinder::host: hostgroup @@ -82,10 +77,7 @@ outputs: config_volume: cinder puppet_tags: cinder_config,file,concat,file_line step_config: {get_attr: [CinderBase, role_data, step_config]} - config_image: - list_join: - - '/' - - [ {get_param: DockerNamespace}, {get_param: DockerCinderConfigImage} ] + config_image: {get_param: DockerCinderConfigImage} kolla_config: /var/lib/kolla/config_files/cinder_volume.json: command: /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf @@ -165,6 +157,30 @@ outputs: executable: /bin/bash creates: /dev/loop2 upgrade_tasks: - - name: Stop and disable cinder_volume service + - name: get bootstrap nodeid + tags: common + command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid + register: bootstrap_node + - name: set is_bootstrap_node fact + tags: common + set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}} + - name: Disable the openstack-cinder-volume cluster resource + tags: step2 + pacemaker_resource: + resource: openstack-cinder-volume + state: disable + wait_for_resource: true + when: is_bootstrap_node + - name: Delete the stopped openstack-cinder-volume cluster resource. tags: step2 - service: name=openstack-cinder-volume state=stopped enabled=no + pacemaker_resource: + resource: openstack-cinder-volume + state: delete + wait_for_resource: true + when: is_bootstrap_node + - name: Disable cinder_volume service from boot + tags: step2 + service: name=openstack-cinder-volume enabled=no + + +