Revision 25a8792c lib/cmdlib.py

b/lib/cmdlib.py
5826 5826
    # for tools
5827 5827
    if not hasattr(self.op, "name_check"):
5828 5828
      self.op.name_check = True
5829
    if not hasattr(self.op, "no_install"):
5830
      self.op.no_install = False
5831
    if self.op.no_install and self.op.start:
5832
      self.LogInfo("No-installation mode selected, disabling startup")
5833
      self.op.start = False
5829 5834
    # validate/normalize the instance name
5830 5835
    self.op.instance_name = utils.HostInfo.NormalizeName(self.op.instance_name)
5831 5836
    if self.op.ip_check and not self.op.name_check:
......
6070 6075
      # works again!
6071 6076
      self.op.force_variant = True
6072 6077

  
6078
      if self.op.no_install:
6079
        self.LogInfo("No-installation mode has no effect during import")
6080

  
6073 6081
    else: # INSTANCE_CREATE
6074 6082
      if getattr(self.op, "os_type", None) is None:
6075 6083
        raise errors.OpPrereqError("No guest OS specified",
......
6441 6449

  
6442 6450
    if iobj.disk_template != constants.DT_DISKLESS and not self.adopt_disks:
6443 6451
      if self.op.mode == constants.INSTANCE_CREATE:
6444
        feedback_fn("* running the instance OS create scripts...")
6445
        # FIXME: pass debug option from opcode to backend
6446
        result = self.rpc.call_instance_os_add(pnode_name, iobj, False,
6447
                                               self.op.debug_level)
6448
        result.Raise("Could not add os for instance %s"
6449
                     " on node %s" % (instance, pnode_name))
6452
        if not self.op.no_install:
6453
          feedback_fn("* running the instance OS create scripts...")
6454
          # FIXME: pass debug option from opcode to backend
6455
          result = self.rpc.call_instance_os_add(pnode_name, iobj, False,
6456
                                                 self.op.debug_level)
6457
          result.Raise("Could not add os for instance %s"
6458
                       " on node %s" % (instance, pnode_name))
6450 6459

  
6451 6460
      elif self.op.mode == constants.INSTANCE_IMPORT:
6452 6461
        feedback_fn("* running the instance OS import scripts...")

Also available in: Unified diff