Mount host localtime for containers

Add /etc/localtime:/etc/localtime:ro to volume for aodh, barbican, etcd,
gnocchi, kuryr and sahara.
All the containers are added in Netwon cycle, so no need to backport

Closes-Bug: #1633049
Change-Id: I9cdba54cf730af44fb1a9ff6f2c936d23dadbe9a
This commit is contained in:
Jeffrey Zhang 2016-09-29 00:14:05 +08:00 committed by Jeffrey Zhang
parent 5fbdee9bbf
commit 16a1f9f006
9 changed files with 17 additions and 2 deletions

View File

@ -14,8 +14,8 @@
restart_policy: "never"
volumes:
- "{{ node_config_directory }}/aodh-api/:{{ container_config_directory }}/:ro"
- "aodh:/var/lib/aodh/"
- "/etc/localtime:/etc/localtime:ro"
- "aodh:/var/lib/aodh/"
- "kolla_logs:/var/log/kolla/"
run_once: True
delegate_to: "{{ groups['aodh-api'][0] }}"

View File

@ -7,6 +7,7 @@
name: "aodh_api"
volumes:
- "{{ node_config_directory }}/aodh-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "aodh:/var/lib/aodh/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['aodh-api']
@ -19,6 +20,7 @@
name: "aodh_evaluator"
volumes:
- "{{ node_config_directory }}/aodh-evaluator/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['aodh-evaluator']
@ -30,6 +32,7 @@
name: "aodh_listener"
volumes:
- "{{ node_config_directory }}/aodh-listener/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['aodh-listener']
@ -41,5 +44,6 @@
name: "aodh_notifier"
volumes:
- "{{ node_config_directory }}/aodh-notifier/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['aodh-notifier']

View File

@ -14,8 +14,8 @@
restart_policy: "never"
volumes:
- "{{ node_config_directory }}/barbican-api/:{{ container_config_directory }}/:ro"
- "barbican:/var/lib/barbican/"
- "/etc/localtime:/etc/localtime:ro"
- "barbican:/var/lib/barbican/"
- "kolla_logs:/var/log/kolla/"
run_once: True
delegate_to: "{{ groups['barbican-api'][0] }}"

View File

@ -7,6 +7,7 @@
name: "barbican_api"
volumes:
- "{{ node_config_directory }}/barbican-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "barbican:/var/lib/barbican/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['barbican-api']
@ -19,6 +20,7 @@
name: "barbican_keystone_listener"
volumes:
- "{{ node_config_directory }}/barbican-keystone-listener/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['barbican-keystone-listener']
@ -30,5 +32,6 @@
name: "barbican_worker"
volumes:
- "{{ node_config_directory }}/barbican-worker/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['barbican-worker']

View File

@ -14,5 +14,6 @@
restart_policy: "never"
volumes:
- "{{ node_config_directory }}/etcd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_etcd:/var/lib/etcd/"
- "kolla_logs:/var/log/kolla/"

View File

@ -7,6 +7,7 @@
name: "gnocchi_api"
volumes:
- "{{ node_config_directory }}/gnocchi-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "gnocchi:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['gnocchi-api']
@ -19,6 +20,7 @@
name: "gnocchi_metricd"
volumes:
- "{{ node_config_directory }}/gnocchi-metricd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "gnocchi:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['gnocchi-metricd']
@ -31,6 +33,7 @@
name: "gnocchi_statsd"
volumes:
- "{{ node_config_directory }}/gnocchi-statsd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "gnocchi:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['gnocchi-statsd']

View File

@ -14,5 +14,6 @@
restart_policy: "never"
volumes:
- "{{ node_config_directory }}/kuryr/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/run:/run"
- "/usr/lib/docker:/usr/lib/docker"

View File

@ -13,6 +13,7 @@
privileged: True
volumes:
- "{{ node_config_directory }}/kuryr/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/run:/run"
- "/usr/lib/docker:/usr/lib/docker"
when: inventory_hostname in groups['compute']

View File

@ -7,6 +7,7 @@
name: "sahara_api"
volumes:
- "{{ node_config_directory }}/sahara-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "sahara:/var/lib/sahara/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['sahara-api']
@ -19,6 +20,7 @@
name: "sahara_engine"
volumes:
- "{{ node_config_directory }}/sahara-engine/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "sahara:/var/lib/sahara/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['sahara-engine']