Revision fe482621 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
2011 | 2011 |
force = self.op.force |
2012 | 2012 |
extra_args = getattr(self.op, "extra_args", "") |
2013 | 2013 |
|
2014 |
self.cfg.MarkInstanceUp(instance.name) |
|
2015 |
|
|
2014 | 2016 |
node_current = instance.primary_node |
2015 | 2017 |
|
2016 | 2018 |
_StartInstanceDisks(self.cfg, instance, force) |
... | ... | |
2019 | 2021 |
_ShutdownInstanceDisks(instance, self.cfg) |
2020 | 2022 |
raise errors.OpExecError("Could not start instance") |
2021 | 2023 |
|
2022 |
self.cfg.MarkInstanceUp(instance.name) |
|
2023 |
|
|
2024 | 2024 |
|
2025 | 2025 |
class LURebootInstance(LogicalUnit): |
2026 | 2026 |
"""Reboot an instance. |
... | ... | |
2136 | 2136 |
""" |
2137 | 2137 |
instance = self.instance |
2138 | 2138 |
node_current = instance.primary_node |
2139 |
self.cfg.MarkInstanceDown(instance.name) |
|
2139 | 2140 |
if not rpc.call_instance_shutdown(node_current, instance): |
2140 | 2141 |
logger.Error("could not shutdown instance") |
2141 | 2142 |
|
2142 |
self.cfg.MarkInstanceDown(instance.name) |
|
2143 | 2143 |
_ShutdownInstanceDisks(instance, self.cfg) |
2144 | 2144 |
|
2145 | 2145 |
|
Also available in: Unified diff