Revision 1c4910f7 lib/cmdlib/common.py

b/lib/cmdlib/common.py
389 389
    if isinstance(osparams[key], Private):
390 390
      osparams[key] = osparams[key].Get()
391 391

  
392
  result = lu.rpc.call_os_validate(node_uuids, required, osname,
393
                                   [constants.OS_VALIDATE_PARAMETERS],
394
                                   osparams)
395
  for node_uuid, nres in result.items():
396
    # we don't check for offline cases since this should be run only
397
    # against the master node and/or an instance's nodes
398
    nres.Raise("OS Parameters validation failed on node %s" %
399
               lu.cfg.GetNodeName(node_uuid))
400
    if not nres.payload:
401
      lu.LogInfo("OS %s not found on node %s, validation skipped",
402
                 osname, lu.cfg.GetNodeName(node_uuid))
392
  if osname:
393
    result = lu.rpc.call_os_validate(node_uuids, required, osname,
394
                                     [constants.OS_VALIDATE_PARAMETERS],
395
                                     osparams)
396
    for node_uuid, nres in result.items():
397
      # we don't check for offline cases since this should be run only
398
      # against the master node and/or an instance's nodes
399
      nres.Raise("OS Parameters validation failed on node %s" %
400
                 lu.cfg.GetNodeName(node_uuid))
401
      if not nres.payload:
402
        lu.LogInfo("OS %s not found on node %s, validation skipped",
403
                   osname, lu.cfg.GetNodeName(node_uuid))
403 404

  
404 405

  
405 406
def CheckOSImage(op):

Also available in: Unified diff