Dave Walker (Daviey) 936722f01c Remove heka_socket vol and unwedge some containers
The presence of heka_socket:/var/lib/kolla/heka with
containers that log to /dev/log, such as nova-ssh cause a
wedge on starting as /var/lib/kolla/heka/log is never
created due to the removal of heka.

This means that ssh data, such as config and keys are never
sync'd and sshd is never started.

Change-Id: Ia561526e6caf82eebd18c6e31cbeb1738b9ff602
Closes-Bug: #1672207
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2017-03-13 09:29:23 +00:00

228 lines
10 KiB
YAML

---
- name: Looking up disks for Swift
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
-m find_disks
-a "name={{ swift_devices_name }}
match_mode={{ swift_devices_match_mode }}"
register: swift_disk_lookup
changed_when: "{{ swift_disk_lookup.stdout.find('localhost | SUCCESS => ') != -1 and
(swift_disk_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
failed_when: swift_disk_lookup.stdout.split()[2] != 'SUCCESS'
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server']
- name: Reading data from variable
set_fact:
swift_disks: "{{ (swift_disk_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server']
- name: Mounting Swift disks
mount:
src: "UUID={{ item.fs_uuid }}"
fstype: xfs
opts: "noatime,nodiratime,nobarrier,logbufs=8"
state: mounted
name: "{{ swift_devices_mount_point }}/{{ item['fs_label'] }}"
with_items: "{{ swift_disks }}"
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server']
- name: Starting swift-rsyncd container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_rsyncd_image_full }}"
name: "swift_rsyncd"
volumes:
- "{{ node_config_directory }}/swift-rsyncd/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server']
- name: Starting swift-account-server container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
name: "swift_account_server"
image: "{{ swift_account_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-account-server/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-account-server']
- name: Starting swift-account-auditor container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_image_full }}"
name: "swift_account_auditor"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-account-auditor/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-account-server']
- name: Starting swift-account-replicator container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_image_full }}"
name: "swift_account_replicator"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-account-replicator/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-account-server']
- name: Starting swift-account-reaper container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_image_full }}"
name: "swift_account_reaper"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-account-reaper/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-account-server']
- name: Starting swift-container-server container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_server"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-container-server/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-container-server']
- name: Starting swift-container-auditor container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_auditor"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-container-auditor/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-container-server']
- name: Starting swift-container-replicator container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_replicator"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-container-replicator/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-container-server']
- name: Starting swift-container-updater container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_updater"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-container-updater/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-container-server']
- name: Starting swift-object-server container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_server"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-object-server/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-object-server']
- name: Starting swift-object-auditor container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_auditor"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-object-auditor/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-object-server']
- name: Starting swift-object-replicator container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_replicator"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-object-replicator/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-object-server']
- name: Starting swift-object-updater container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_updater"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-object-updater/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-object-server']
- name: Starting swift-object-expirer container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_expirer_image_full }}"
name: "swift_object_expirer"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-object-expirer/:{{ container_config_directory }}/:ro"
- "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-object-server']
- name: Starting swift-proxy-server container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_proxy_server_image_full }}"
name: "swift_proxy_server"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-proxy-server/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
when: inventory_hostname in groups['swift-proxy-server']