Project

General

Profile

Actions

Bug #5763

closed

ceph-deploy new [IP] should error out

Added by Alfredo Deza over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
ceph-deploy
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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
Actions #1

Updated by Alfredo Deza over 10 years ago

  • Status changed from 12 to 7

Added a validator to `ceph-depoy new` so that we prevent this from happening.

Pull request was opened: https://github.com/ceph/ceph-deploy/pull/26

Actions #2

Updated by Alfredo Deza over 10 years ago

  • Status changed from 7 to Resolved

Merged into ceph-deploy master

Hash: a334df3

Actions #3

Updated by Tamilarasi muthamizhan over 10 years ago

  • 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

Actions #4

Updated by Alfredo Deza over 10 years ago

  • Status changed from In Progress to Fix Under Review
Actions #5

Updated by Alfredo Deza over 10 years ago

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

Actions

Also available in: Atom PDF