Revision 4978db17 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
4350 | 4350 |
env.update(_BuildInstanceHookEnv(name=self.op.instance_name, |
4351 | 4351 |
primary_node=self.op.pnode, |
4352 | 4352 |
secondary_nodes=self.secondaries, |
4353 |
status=self.instance_status,
|
|
4353 |
status=self.op.start,
|
|
4354 | 4354 |
os_type=self.op.os_type, |
4355 | 4355 |
memory=self.be_full[constants.BE_MEMORY], |
4356 | 4356 |
vcpus=self.be_full[constants.BE_VCPUS], |
... | ... | |
4525 | 4525 |
self.be_full[constants.BE_MEMORY], |
4526 | 4526 |
self.op.hypervisor) |
4527 | 4527 |
|
4528 |
self.instance_status = self.op.start |
|
4529 |
|
|
4530 | 4528 |
def Exec(self, feedback_fn): |
4531 | 4529 |
"""Create and add the instance to the cluster. |
4532 | 4530 |
|
... | ... | |
4572 | 4570 |
primary_node=pnode_name, |
4573 | 4571 |
nics=self.nics, disks=disks, |
4574 | 4572 |
disk_template=self.op.disk_template, |
4575 |
admin_up=self.instance_status,
|
|
4573 |
admin_up=False,
|
|
4576 | 4574 |
network_port=network_port, |
4577 | 4575 |
beparams=self.op.beparams, |
4578 | 4576 |
hvparams=self.op.hvparams, |
... | ... | |
4658 | 4656 |
% self.op.mode) |
4659 | 4657 |
|
4660 | 4658 |
if self.op.start: |
4659 |
iobj.admin_up = True |
|
4660 |
self.cfg.Update(iobj) |
|
4661 | 4661 |
logging.info("Starting instance %s on node %s", instance, pnode_name) |
4662 | 4662 |
feedback_fn("* starting instance...") |
4663 | 4663 |
result = self.rpc.call_instance_start(pnode_name, iobj, None) |
Also available in: Unified diff