ceph / ceph-helm

Curated applications for Kubernetes
Apache License 2.0
108 stars 36 forks source link

start_mon: use --monmap instead of --inject-monmap in mkfs #62

Closed yangdongsheng closed 6 years ago

yangdongsheng commented 6 years ago

When we are going to mkfs in creating mon data, we want to inject our monmap generated local to mon db store.

But the --inject-monmap is wrong parameter for this. If we specify mkfs, the --inject-monmap will be ignored. Instead, in this case, we need to use --monmap.

Reference: http://docs.ceph.com/docs/mimic/rados/operations/add-or-rm-mons/

Signed-off-by: Dongsheng Yang dongsheng.yang@easystack.cn

yangdongsheng commented 6 years ago

@rootfs please help to take a look

rootfs commented 6 years ago

@leseb @alram can you check? thanks.

alram commented 6 years ago

@dmick This looks familiar to the issue we found a few months back, right?

Lgtm.

yangdongsheng commented 6 years ago

@alram thanx, just curious, what's the problem you met "a few months back"? I found we can't deploy the 3 mon correctly with ceph-helm, two of them are probing, and the other one is electing. is that same with yours?

alram commented 6 years ago

I can't really recall. We had an issue when either restarting or adding a new mon on a host who already had a monmap locally. That's when we saw that --inject-monmap was here instead of --monmap. We forgot to do PR obviously

leseb commented 6 years ago

Funny, we still use --inject-monmap in https://github.com/ceph/ceph-container and we don't have any issues restarting monitors.

yangdongsheng commented 6 years ago

@leseb Yes, that's because that although the --inject-monmap doing nothing in mkfs, ceph-mon will build an intiatial monmap with parsing the mon_host. So you will not get error if you did not get an strange result in dns resolving. :)