Revision 3e0ed18c lib/client/gnt_cluster.py
b/lib/client/gnt_cluster.py | ||
---|---|---|
1002 | 1002 |
return True |
1003 | 1003 |
|
1004 | 1004 |
|
1005 |
def _InstanceStart(opts, inst_list, start): |
|
1005 |
def _InstanceStart(opts, inst_list, start, no_remember=False):
|
|
1006 | 1006 |
"""Puts the instances in the list to desired state. |
1007 | 1007 |
|
1008 | 1008 |
@param opts: The command line options selected by the user |
1009 | 1009 |
@param inst_list: The list of instances to operate on |
1010 | 1010 |
@param start: True if they should be started, False for shutdown |
1011 |
@param no_remember: If the instance state should be remembered |
|
1011 | 1012 |
@return: The success of the operation (none failed) |
1012 | 1013 |
|
1013 | 1014 |
""" |
... | ... | |
1016 | 1017 |
text_submit, text_success, text_failed = ("startup", "started", "starting") |
1017 | 1018 |
else: |
1018 | 1019 |
opcls = compat.partial(opcodes.OpInstanceShutdown, |
1019 |
timeout=opts.shutdown_timeout) |
|
1020 |
timeout=opts.shutdown_timeout, |
|
1021 |
no_remember=no_remember) |
|
1020 | 1022 |
text_submit, text_success, text_failed = ("shutdown", "stopped", "stopping") |
1021 | 1023 |
|
1022 | 1024 |
jex = JobExecutor(opts=opts) |
... | ... | |
1196 | 1198 |
@return: The desired exit status |
1197 | 1199 |
|
1198 | 1200 |
""" |
1199 |
if not _InstanceStart(opts, inst_map.keys(), False): |
|
1201 |
if not _InstanceStart(opts, inst_map.keys(), False, no_remember=True):
|
|
1200 | 1202 |
ToStderr("Please investigate and stop instances manually before continuing") |
1201 | 1203 |
return constants.EXIT_FAILURE |
1202 | 1204 |
|
Also available in: Unified diff