Skip to content

Commit

Permalink
populate_kv.sh: create client_host directory once
Browse files Browse the repository at this point in the history
The client_host directory command creation is called for every keys
present in the ceph configuration.
We only need to call the mkdir command once outsite the kv function.

Resolves: #1197

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 32788e8)
  • Loading branch information
dsavineau committed Jun 26, 2019
1 parent bbfc863 commit 9c32e39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/daemon/populate_kv.sh
Expand Up @@ -8,7 +8,6 @@ function kv {
read -r key value <<< "$*"
log "Adding key ${key} with value ${value} to KV store."
etcdctl "${ETCDCTL_OPTS[@]}" "${KV_TLS[@]}" set "${CLUSTER_PATH}""${key}" "${value}" || log "Value is already set"
etcdctl "${ETCDCTL_OPTS[@]}" "${KV_TLS[@]}" mkdir "${CLUSTER_PATH}/client_host" || log "client_host already exists"
}

function populate_kv {
Expand All @@ -18,6 +17,7 @@ function populate_kv {
fi
case "$KV_TYPE" in
etcd)
etcdctl "${ETCDCTL_OPTS[@]}" "${KV_TLS[@]}" mkdir "${CLUSTER_PATH}/client_host" || log "client_host already exists"
# if ceph.defaults found in /etc/ceph/ use that
if [[ -e "/etc/ceph/ceph.defaults" ]]; then
local defaults_path="/etc/ceph/ceph.defaults"
Expand Down

0 comments on commit 9c32e39

Please sign in to comment.