Revision 7c4c22f5 lib/bootstrap.py
b/lib/bootstrap.py | ||
---|---|---|
269 | 269 |
if not ipcls.Own(hostname.ip): |
270 | 270 |
raise errors.OpPrereqError("Inconsistency: this host's name resolves" |
271 | 271 |
" to %s,\nbut this ip address does not" |
272 |
" belong to this host. Aborting." %
|
|
272 |
" belong to this host" % |
|
273 | 273 |
hostname.ip, errors.ECODE_ENVIRON) |
274 | 274 |
|
275 | 275 |
clustername = netutils.GetHostname(name=cluster_name, family=ipcls.family) |
276 | 276 |
|
277 | 277 |
if netutils.TcpPing(clustername.ip, constants.DEFAULT_NODED_PORT, timeout=5): |
278 |
raise errors.OpPrereqError("Cluster IP already active. Aborting.",
|
|
278 |
raise errors.OpPrereqError("Cluster IP already active", |
|
279 | 279 |
errors.ECODE_NOTUNIQUE) |
280 | 280 |
|
281 | 281 |
if not secondary_ip: |
282 | 282 |
if primary_ip_version == constants.IP6_VERSION: |
283 | 283 |
raise errors.OpPrereqError("When using a IPv6 primary address, a valid" |
284 |
" IPv4 address must be given as secondary."
|
|
285 |
" Aborting.", errors.ECODE_INVAL)
|
|
284 |
" IPv4 address must be given as secondary",
|
|
285 |
errors.ECODE_INVAL) |
|
286 | 286 |
secondary_ip = hostname.ip |
287 | 287 |
|
288 | 288 |
if not netutils.IP4Address.IsValid(secondary_ip): |
Also available in: Unified diff