ceph/ceph-deploy — pull request #60 by alfredodeza (2013-09-04 15:57:20+00:00)
Title: create a helper to warn against incompatible hostnames

This PR addresses the problem that sometimes remote hosts may not have a matching `hostname` for the host they are deploying to.

So now we check that when a mon is being created and issue a very clear warning. Example output:

$ ceph-deploy mon create node1
[ceph_deploy.mon][DEBUG ] Deploying mon, cluster ceph hosts node1
[ceph_deploy.mon][DEBUG ] detecting platform for host node1 ...
[ceph_deploy.mon][INFO ] distro info: Ubuntu 12.04 precise
[node1][DEBUG ] determining if provided host has same hostname in remote
[node1][WARNIN] ********************************************************************************
[node1][WARNIN] provided hostname must match remote hostname
[node1][WARNIN] provided hostname: node1
[node1][WARNIN] remote hostname: localhost
[node1][WARNIN] monitors may not reach quorum and create-keys will not complete
[node1][WARNIN] ********************************************************************************
[node1][DEBUG ] deploying mon to node1
[node1][DEBUG ] remote hostname: localhost
[node1][INFO ] write cluster configuration to /etc/ceph/{cluster}.conf
[node1][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-localhost/done
[node1][INFO ] create a done file to avoid re-doing the mon deployment
[node1][INFO ] create the init path if it does not exist
[node1][INFO ] Running command: initctl emit ceph-mon cluster=ceph id=localhost