Bug #5763
closed
ceph-deploy new [IP] should error out
Added by Alfredo Deza almost 11 years ago.
Updated over 10 years ago.
Description
When calling `new` with ceph-deploy, sometimes it is possible a user may use an IP instead of a hostname. The tool should be able to detect that an IP was passed in and not perform any actions since a hostname is actually preferred.
A good error message should be returned with an example of acceptable input types:
$ ceph-deploy new 192.168.1.111
[error] Cannot create new environments with IPs
[error] Acceptable inputs are: hostnames or hostname:IP
- Status changed from 12 to 7
- Status changed from 7 to Resolved
Merged into ceph-deploy master
Hash: a334df3
- Status changed from Resolved to In Progress
on the latest ceph-deploy version 1.2.3, this problem exists.
ceph-deploy new command seems to accept any number or value for IP, while it is not supposed to accept just the IP format in first place.
also ceph-deploy help for new command should be modified to add that host:IP pair is now acceptable.
ubuntu@mira074:~/ceph-deploy$ ./ceph-deploy new 0
[ceph_deploy.new][DEBUG ] Creating new cluster named ceph
[ceph_deploy.new][DEBUG ] Resolving host 0
[ceph_deploy.new][DEBUG ] Monitor 0 at 0.0.0.0
[ceph_deploy.new][DEBUG ] Monitor initial members are ['0']
[ceph_deploy.new][DEBUG ] Monitor addrs are ['0.0.0.0']
[ceph_deploy.new][DEBUG ] Creating a random mon key...
[ceph_deploy.new][DEBUG ] Writing initial config to ceph.conf...
[ceph_deploy.new][DEBUG ] Writing monitor keyring to ceph.mon.keyring...
ubuntu@mira074:~/ceph-deploy$ ./ceph-deploy new 192.168.5.4
[ceph_deploy.new][DEBUG ] Creating new cluster named ceph
[ceph_deploy.new][DEBUG ] Resolving host 192.168.5.4
[ceph_deploy.new][DEBUG ] Monitor 192 at 192.168.5.4
[ceph_deploy.new][DEBUG ] Monitor initial members are ['192']
[ceph_deploy.new][DEBUG ] Monitor addrs are ['192.168.5.4']
[ceph_deploy.new][DEBUG ] Creating a random mon key...
[ceph_deploy.new][DEBUG ] Writing initial config to ceph.conf...
[ceph_deploy.new][DEBUG ] Writing monitor keyring to ceph.mon.keyring...
ubuntu@mira074:~/ceph-deploy$ ./ceph-deploy new --help
usage: ceph-deploy new [-h] MON [MON ...]
Start deploying a new cluster, and write a CLUSTER.conf and keyring for it.
positional arguments:
MON initial monitor hostname, fqdn, or hostname:fqdn pair
optional arguments:
-h, --help show this help message and exit
- Status changed from In Progress to Fix Under Review
- Status changed from Fix Under Review to Resolved
Merged to ceph-deploy master branch with hash: 77438b522c82e79fdb0f9b0c5963ba5a61f07f10
The validator was updated to make sure single IP's would be caught. Previously it was just looking at HOST:IP pairs only.
Also available in: Atom
PDF