Revision 937f983d
b/lib/cmdlib.py | ||
---|---|---|
880 | 880 |
raise errors.OpPrereqError("Neither the name nor the IP address of the" |
881 | 881 |
" cluster has changed") |
882 | 882 |
if new_ip != old_ip: |
883 |
result = utils.RunCmd(["fping", "-q", new_ip]) |
|
884 |
if not result.failed: |
|
883 |
if utils.TcpPing(new_ip, constants.DEFAULT_NODED_PORT): |
|
885 | 884 |
raise errors.OpPrereqError("The given cluster IP address (%s) is" |
886 | 885 |
" reachable on the network. Aborting." % |
887 | 886 |
new_ip) |
... | ... | |
2284 | 2283 |
new_name) |
2285 | 2284 |
|
2286 | 2285 |
if not getattr(self.op, "ignore_ip", False): |
2287 |
command = ["fping", "-q", name_info.ip] |
|
2288 |
result = utils.RunCmd(command) |
|
2289 |
if not result.failed: |
|
2286 |
if utils.TcpPing(name_info.ip, constants.DEFAULT_NODED_PORT): |
|
2290 | 2287 |
raise errors.OpPrereqError("IP %s of instance %s already in use" % |
2291 | 2288 |
(name_info.ip, new_name)) |
2292 | 2289 |
|
Also available in: Unified diff