ceph-deploy icon indicating copy to clipboard operation
ceph-deploy copied to clipboard

[RM-36583] align with create by using short hostname

Open changchengx opened this issue 7 years ago • 6 comments

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]

changchengx avatar Oct 24 '18 11:10 changchengx

Can one of the admins verify this patch?

ceph-jenkins avatar Oct 24 '18 11:10 ceph-jenkins

@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.

changchengx avatar Oct 25 '18 01:10 changchengx

Yes, but why is the call to next() added, and why is the statement order changed?

dmick avatar Oct 25 '18 17:10 dmick

@dmick

  1. The function mon_hosts is a yield generator. It need use "next" function to get the value.
  2. I'st better to use the same logic as "create" function: check the monitor status, then catch any error.

changchengx avatar Oct 25 '18 23:10 changchengx

@tchaikov I'll check this PR within this week. It was filed about 2 years ago.

changchengx avatar Sep 14 '20 16:09 changchengx

@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.

tchaikov avatar Sep 17 '20 03:09 tchaikov