Merge "Fix parameter issue in cinder handlers"

This commit is contained in:
Jenkins 2017-02-05 15:08:59 +00:00 committed by Gerrit Code Review
commit 747b100e48
4 changed files with 17 additions and 6 deletions

View File

@ -755,6 +755,9 @@ def generate_module():
# if pid_mode = ""/None/False, remove it
if not new_args.get('pid_mode', False):
new_args.pop('pid_mode', None)
# if ipc_mode = ""/None/False, remove it
if not new_args.get('ipc_mode', False):
new_args.pop('ipc_mode', None)
module.params = new_args
return module

View File

@ -25,6 +25,8 @@ cinder_services:
group: cinder-volume
enabled: true
image: "{{ cinder_volume_image_full }}"
privileged: True
ipc_mode: "host"
volumes:
- "{{ node_config_directory }}/cinder-volume/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
@ -38,6 +40,7 @@ cinder_services:
group: cinder-backup
enabled: true
image: "{{ cinder_backup_image_full }}"
privileged: True
volumes:
- "{{ node_config_directory }}/cinder-backup/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"

View File

@ -12,7 +12,7 @@
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
@ -20,7 +20,7 @@
- config_json.changed | bool
or cinder_conf.changed | bool
or policy_json.changed | bool
or cinder_api_container.changed |
or cinder_api_container.changed | bool
- name: Restart cinder-scheduler container
vars:
@ -35,7 +35,7 @@
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
@ -58,7 +58,9 @@
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
privileged: "{{ service.privileged | default(False) }}"
ipc_mode: "{{ service.ipc_mode | default('') }}"
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
@ -81,7 +83,8 @@
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
privileged: "{{ service.privileged | default(False) }}"
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]

View File

@ -85,7 +85,9 @@
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
privileged: "{{ item.value.privileged | default(False) }}"
ipc_mode: "{{ item.value.ipc_mode | default('') }}"
register: check_cinder_containers
when:
- action != "config"