Rename ceph-mon bootstrap container to avoid conflict
Ceph-mon bootstrap container shares the same name of `ceph_mon` with real ceph-mon service. When bootstrapping, it will sleep forever for the purpose of distribute rings. Later on, when starting real `ceph_mon` service, kolla_docker module will take bootstrap container as real one because bootstrap container has a super set of env variables and kolla_docker doesn't do strict comparing of env variable items. This change follows the pattern of other bootstrap containers and rename to use `bootstrap_ceph_mon` to avoid conflict. Co-Authored-By: Sam Yaple <sam@yaple.net> Change-Id: I0082820900928c42f9cc778ffd705980fea9ad1c Closes-Bug: #1535140
This commit is contained in:
parent
c531338fef
commit
af0d73ea38
@ -3,21 +3,29 @@
|
||||
kolla_docker:
|
||||
action: "start_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
detach: False
|
||||
environment:
|
||||
KOLLA_BOOTSTRAP:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
MON_IP: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
image: "{{ ceph_mon_image_full }}"
|
||||
name: "ceph_mon"
|
||||
name: "bootstrap_ceph_mon"
|
||||
restart_policy: "never"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
||||
- "ceph_mon:/var/lib/ceph"
|
||||
- "ceph_mon_config:/etc/ceph"
|
||||
|
||||
- name: Waiting for a few settings for cluster to generate keys
|
||||
command: sleep 3
|
||||
changed_when: False
|
||||
- name: Starting ceph-mon container
|
||||
kolla_docker:
|
||||
action: "start_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
image: "{{ ceph_mon_image_full }}"
|
||||
name: "ceph_mon"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
||||
- "ceph_mon:/var/lib/ceph"
|
||||
- "ceph_mon_config:/etc/ceph"
|
||||
|
||||
- name: Setting host for cluster files
|
||||
set_fact:
|
||||
|
@ -21,8 +21,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_RGW}"
|
||||
monmaptool --create --add "$(hostname)" "${MON_IP}" --fsid "${FSID}" "${MONMAP}"
|
||||
|
||||
echo "Sleeping until keys are fetched"
|
||||
/bin/sleep infinity
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# This section runs on every mon that does not have a keyring already.
|
||||
|
Loading…
Reference in New Issue
Block a user