Revision 4e272d8c lib/cmdlib.py

b/lib/cmdlib.py
2346 2346
    default_nicpp = cluster.nicparams[constants.PP_DEFAULT]
2347 2347
    if default_nicpp[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
2348 2348
      bridges.add(default_nicpp[constants.NIC_LINK])
2349
    for instance in instanceinfo.values():
2349
    for instance in self.my_inst_info.values():
2350 2350
      for nic in instance.nics:
2351 2351
        full_nic = cluster.SimpleFillNIC(nic.nicparams)
2352 2352
        if full_nic[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
......
2415 2415

  
2416 2416
    feedback_fn("* Verifying configuration file consistency")
2417 2417

  
2418
    if master_node not in self.my_node_info:
2419
      # _VerifyFiles requires that master_node is present in the passed node
2420
      # info, to use it as a point of reference even if we're verifying only a
2421
      # subset of nodes. Make it so.
2418
    # If not all nodes are being checked, we need to make sure the master node
2419
    # and a non-checked vm_capable node are in the list.
2420
    absent_nodes = set(self.all_node_info).difference(self.my_node_info)
2421
    if absent_nodes:
2422 2422
      vf_nvinfo = all_nvinfo.copy()
2423
      vf_node_info = (self.my_node_info.values() +
2424
                      [self.all_node_info[master_node]])
2425

  
2423
      vf_node_info = list(self.my_node_info.values())
2424
      additional_nodes = []
2425
      if master_node not in self.my_node_info:
2426
        additional_nodes.append(master_node)
2427
        vf_node_info.append(self.all_node_info[master_node])
2428
      # Add the first vm_capable node we find which is not included
2429
      for node in absent_nodes:
2430
        nodeinfo = self.all_node_info[node]
2431
        if nodeinfo.vm_capable and not nodeinfo.offline:
2432
          additional_nodes.append(node)
2433
          vf_node_info.append(self.all_node_info[node])
2434
          break
2426 2435
      key = constants.NV_FILELIST
2427
      vf_nvinfo.update(self.rpc.call_node_verify([master_node],
2436
      vf_nvinfo.update(self.rpc.call_node_verify(additional_nodes,
2428 2437
                                                 {key: node_verify_param[key]},
2429 2438
                                                 self.cfg.GetClusterName()))
2430 2439
    else:

Also available in: Unified diff