[RM-36583] align with create by using short hostname
If using fully qualified domain name to check monitor status after "mon add", it will hit the error that can't find the node file under /var/run/ceph/ which result in aboring add monitor
Signed-off-by: Changcheng Liu [email protected]
Can one of the admins verify this patch?
@dmick When using "mon add" command, such as "ceph-deploy mon add nstcloudcc1.sh.intel.com", It will check the monitor status with command " sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.nstcloudcc1.sh.intel.com.asok mon_status". However, the actual file name is "/var/run/ceph/ceph-mon.nstcloudcc1.asok". The reason is it use "fully qualified domain name" as part of the file name. Actually, it should use short hostname.
I've checked the "mon create" command, such as "ceph-deploy mon create nstcloudcc1.sh.intel.com", it use the short hostname to check the monitor status "sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.nstcloudcc1.asok mon_status" and succeed.
Yes, but why is the call to next() added, and why is the statement order changed?
@dmick
- The function mon_hosts is a yield generator. It need use "next" function to get the value.
- I'st better to use the same logic as "create" function: check the monitor status, then catch any error.
@tchaikov I'll check this PR within this week. It was filed about 2 years ago.
@tchaikov I'll check this PR within this week. It was filed about 2 years ago.
the original maintainer does not work on this project anymore. guess that's why your PR was unattended.