Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
daemon/demo: avoid duplicate option on restart
Browse files Browse the repository at this point in the history
If the demo container is restarted then the warning option in the ceph
configuration file about the pool without redundancy will be set again
even if it is already present.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 2bb051a)
  • Loading branch information
dsavineau committed Jan 11, 2021
1 parent 3c21991 commit 59f33a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/daemon/start_mon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ function start_mon {
# start MON
if [[ "$CEPH_DAEMON" == demo ]]; then
if [[ ! "${CEPH_VERSION}" =~ ^(luminous|mimic)$ ]]; then
echo "mon warn on pool no redundancy = false" >> /etc/ceph/"${CLUSTER}".conf
if ! grep -qE "mon warn on pool no redundancy = false" /etc/ceph/"${CLUSTER}".conf; then
echo "mon warn on pool no redundancy = false" >> /etc/ceph/"${CLUSTER}".conf
fi
fi
/usr/bin/ceph-mon "${DAEMON_OPTS[@]}" -i "${MON_NAME}" --mon-data "$MON_DATA_DIR" --public-addr "${MON_IP}"

Expand Down

0 comments on commit 59f33a0

Please sign in to comment.