Revision 8ccecf10
b/lib/cmdlib.py | ||
---|---|---|
5589 | 5589 |
if self.op.disk_state: |
5590 | 5590 |
self.new_disk_state = _MergeAndVerifyDiskState(self.op.disk_state, None) |
5591 | 5591 |
|
5592 |
# TODO: If we need to have multiple DnsOnlyRunner we probably should make |
|
5593 |
# it a property on the base class. |
|
5594 |
result = rpc.DnsOnlyRunner().call_version([node])[node] |
|
5595 |
result.Raise("Can't get version information from node %s" % node) |
|
5596 |
if constants.PROTOCOL_VERSION == result.payload: |
|
5597 |
logging.info("Communication to node %s fine, sw version %s match", |
|
5598 |
node, result.payload) |
|
5599 |
else: |
|
5600 |
raise errors.OpPrereqError("Version mismatch master version %s," |
|
5601 |
" node version %s" % |
|
5602 |
(constants.PROTOCOL_VERSION, result.payload), |
|
5603 |
errors.ECODE_ENVIRON) |
|
5604 |
|
|
5592 | 5605 |
def Exec(self, feedback_fn): |
5593 | 5606 |
"""Adds the new node to the cluster. |
5594 | 5607 |
|
... | ... | |
5633 | 5646 |
if self.op.disk_state: |
5634 | 5647 |
new_node.disk_state_static = self.new_disk_state |
5635 | 5648 |
|
5636 |
# check connectivity |
|
5637 |
result = self.rpc.call_version([node])[node] |
|
5638 |
result.Raise("Can't get version information from node %s" % node) |
|
5639 |
if constants.PROTOCOL_VERSION == result.payload: |
|
5640 |
logging.info("Communication to node %s fine, sw version %s match", |
|
5641 |
node, result.payload) |
|
5642 |
else: |
|
5643 |
raise errors.OpExecError("Version mismatch master version %s," |
|
5644 |
" node version %s" % |
|
5645 |
(constants.PROTOCOL_VERSION, result.payload)) |
|
5646 |
|
|
5647 | 5649 |
# Add node to our /etc/hosts, and add key to known_hosts |
5648 | 5650 |
if self.cfg.GetClusterInfo().modify_etc_hosts: |
5649 | 5651 |
master_node = self.cfg.GetMasterNode() |
Also available in: Unified diff