Correct gnocchi-upgrade command quotes
After merging commit 488796, single quotation marks were missed. This causes the upgrade to fail as the flag --sacks-number is considered a su command flag. Also mounts Ceph config data into the container which seems needed for the gnocchi-upgrade command when configured to use Ceph. Also move the gnocchi db sync to step 4, so ceph is ready. Add a retry loop to ceilometer-upgrade cmd so it doesnt fail while apache is restarted. Closes-Bug: #1709322 Change-Id: I62f3a5fa2d43a2cd579f72286661d503e9f08b90
This commit is contained in:
parent
5bf7d6582b
commit
9b79a9bc74
@ -115,7 +115,7 @@ outputs:
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'ceilometer_agent_central'
|
||||
- "su ceilometer -s /bin/bash -c '/usr/bin/ceilometer-upgrade --skip-metering-database'"
|
||||
- "su ceilometer -s /bin/bash -c 'for n in {1..10}; do /usr/bin/ceilometer-upgrade --skip-metering-database && exit 0 || sleep 5; done; exit 1'"
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable ceilometer agent central service
|
||||
tags: step2
|
||||
|
@ -88,6 +88,10 @@ outputs:
|
||||
dest: "/"
|
||||
merge: true
|
||||
preserve_properties: true
|
||||
- source: "/var/lib/kolla/config_files/src-ceph/"
|
||||
dest: "/etc/ceph/"
|
||||
merge: true
|
||||
preserve_properties: true
|
||||
permissions:
|
||||
- path: /var/log/gnocchi
|
||||
owner: gnocchi:gnocchi
|
||||
@ -101,7 +105,7 @@ outputs:
|
||||
volumes:
|
||||
- /var/log/containers/gnocchi:/var/log/gnocchi
|
||||
command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R gnocchi:gnocchi /var/log/gnocchi']
|
||||
step_3:
|
||||
step_4:
|
||||
gnocchi_db_sync:
|
||||
image: *gnocchi_api_image
|
||||
net: host
|
||||
@ -114,12 +118,13 @@ outputs:
|
||||
-
|
||||
- /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
|
||||
- /var/log/containers/gnocchi:/var/log/gnocchi
|
||||
- /etc/ceph:/etc/ceph:ro
|
||||
command:
|
||||
str_replace:
|
||||
template: "/usr/bin/bootstrap_host_exec gnocchi_api su gnocchi -s /bin/bash -c /usr/bin/gnocchi-upgrade --sacks-number=SACK_NUM"
|
||||
template: /usr/bin/bootstrap_host_exec gnocchi_api su gnocchi -s /bin/bash -c '/usr/bin/gnocchi-upgrade --sacks-number=SACK_NUM'
|
||||
params:
|
||||
SACK_NUM: {get_param: NumberOfStorageSacks}
|
||||
step_4:
|
||||
step_5:
|
||||
gnocchi_api:
|
||||
image: *gnocchi_api_image
|
||||
net: host
|
||||
@ -132,6 +137,7 @@ outputs:
|
||||
- /var/lib/kolla/config_files/gnocchi_api.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/gnocchi:/var/log/gnocchi
|
||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||
-
|
||||
if:
|
||||
- internal_tls_enabled
|
||||
@ -149,6 +155,10 @@ outputs:
|
||||
file:
|
||||
path: /var/log/containers/gnocchi
|
||||
state: directory
|
||||
- name: ensure ceph configurations exist
|
||||
file:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable httpd service
|
||||
tags: step2
|
||||
|
Loading…
Reference in New Issue
Block a user