Revision 55cec070 lib/backend.py
b/lib/backend.py | ||
---|---|---|
1424 | 1424 |
_RemoveBlockDevLinks(iname, instance.disks) |
1425 | 1425 |
|
1426 | 1426 |
|
1427 |
def InstanceReboot(instance, reboot_type, shutdown_timeout): |
|
1427 |
def InstanceReboot(instance, reboot_type, shutdown_timeout, reason):
|
|
1428 | 1428 |
"""Reboot an instance. |
1429 | 1429 |
|
1430 | 1430 |
@type instance: L{objects.Instance} |
... | ... | |
1442 | 1442 |
instance (instead of a call_instance_reboot RPC) |
1443 | 1443 |
@type shutdown_timeout: integer |
1444 | 1444 |
@param shutdown_timeout: maximum timeout for soft shutdown |
1445 |
@type reason: list of reasons |
|
1446 |
@param reason: the reason trail for this reboot |
|
1445 | 1447 |
@rtype: None |
1446 | 1448 |
|
1447 | 1449 |
""" |
... | ... | |
1460 | 1462 |
try: |
1461 | 1463 |
InstanceShutdown(instance, shutdown_timeout) |
1462 | 1464 |
result = StartInstance(instance, False) |
1465 |
_StoreInstReasonTrail(instance.name, reason) |
|
1463 | 1466 |
return result |
1464 | 1467 |
except errors.HypervisorError, err: |
1465 | 1468 |
_Fail("Failed to hard reboot instance %s: %s", instance.name, err) |
Also available in: Unified diff