micro-osd.sh: Use ipv4 address for 'mon addr' configuration

'mon addr' config option expects value in the following format[1]:

<ip-addr>:<port>

Extract host ipv4 address and mention it with default 6789 port as
'mon addr' config option value.

[1] https://docs.ceph.com/en/latest/rados/configuration/mon-config-ref/#minimum-configuration

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
This commit is contained in:
Anoop C S 2023-04-25 09:40:31 +05:30 committed by mergify[bot]
parent 7476da2582
commit cd007bcbd0
1 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ MIRROR_ID="m"
RGW_ID="r" RGW_ID="r"
S3_ACCESS_KEY=2262XNX11FZRR44XWIRD S3_ACCESS_KEY=2262XNX11FZRR44XWIRD
S3_SECRET_KEY=rmtuS1Uj1bIC08QFYGW18GfSHAbkPqdsuYynNudw S3_SECRET_KEY=rmtuS1Uj1bIC08QFYGW18GfSHAbkPqdsuYynNudw
HOST_IP=$(getent ahostsv4 "${HOSTNAME}" | grep STREAM | head -n 1 | awk '{print $1}')
FSID="$(uuidgen)" FSID="$(uuidgen)"
export CEPH_CONF=${DIR}/ceph.conf export CEPH_CONF=${DIR}/ceph.conf
@ -67,7 +68,7 @@ chdir = ""
mon cluster log file = ${LOG_DIR}/mon-cluster.log mon cluster log file = ${LOG_DIR}/mon-cluster.log
mon data = ${MON_DATA} mon data = ${MON_DATA}
mon data avail crit = 0 mon data avail crit = 0
mon addr = ${HOSTNAME} mon addr = ${HOST_IP}:6789
mon allow pool delete = true mon allow pool delete = true
[osd.0] [osd.0]