Revision bcee9cb4
b/man/gnt-instance.sgml | ||
---|---|---|
469 | 469 |
</cmdsynopsis> |
470 | 470 |
|
471 | 471 |
<para> |
472 |
Starts one or more instances, depending on the |
|
473 |
<option>--by-*</option> mode. The four available modes are:
|
|
472 |
Starts one or more instances, depending on the following
|
|
473 |
options. The four available modes are:
|
|
474 | 474 |
<variablelist> |
475 | 475 |
<varlistentry> |
476 | 476 |
<term><option>--instance</option></term> |
... | ... | |
514 | 514 |
</para> |
515 | 515 |
|
516 | 516 |
<para> |
517 |
Note that although you can pass more than one |
|
518 |
<option>--by-</option> option, the last one wins, so in |
|
519 |
order to guarantee the desired result, don't pass more than |
|
520 |
one such option. |
|
517 |
Note that although you can pass more than one selection |
|
518 |
option, the last one wins, so in order to guarantee the |
|
519 |
desired result, don't pass more than one such option. |
|
521 | 520 |
</para> |
522 | 521 |
|
523 | 522 |
<para> |
... | ... | |
534 | 533 |
<screen> |
535 | 534 |
# gnt-instance start instance1.example.com |
536 | 535 |
# gnt-instance start --extra single test1.example.com |
537 |
# gnt-instance start --by-node node1.example.com node2.example.com
|
|
538 |
# gnt-instance start --by-cluster
|
|
536 |
# gnt-instance start --node node1.example.com node2.example.com |
|
537 |
# gnt-instance start --all
|
|
539 | 538 |
</screen> |
540 | 539 |
</para> |
541 | 540 |
</refsect3> |
... | ... | |
578 | 577 |
Example: |
579 | 578 |
<screen> |
580 | 579 |
# gnt-instance shutdown instance1.example.com |
581 |
# gnt-instance shutdown --by-cluster
|
|
580 |
# gnt-instance shutdown --all
|
|
582 | 581 |
</screen> |
583 | 582 |
</para> |
584 | 583 |
</refsect3> |
b/scripts/gnt-instance | ||
---|---|---|
333 | 333 |
if opts.multi_mode is None: |
334 | 334 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
335 | 335 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
336 |
if not inames: |
|
337 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
336 | 338 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
337 | 339 |
if not (opts.force_multi or not multi_on |
338 | 340 |
or _ConfirmOperation(inames, "startup")): |
... | ... | |
357 | 359 |
if opts.multi_mode is None: |
358 | 360 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
359 | 361 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
362 |
if not inames: |
|
363 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
360 | 364 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
361 | 365 |
if not (opts.force_multi or not multi_on |
362 | 366 |
or _ConfirmOperation(inames, "reboot")): |
... | ... | |
380 | 384 |
if opts.multi_mode is None: |
381 | 385 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
382 | 386 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
387 |
if not inames: |
|
388 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
383 | 389 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
384 | 390 |
if not (opts.force_multi or not multi_on |
385 | 391 |
or _ConfirmOperation(inames, "shutdown")): |
... | ... | |
469 | 475 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
470 | 476 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
471 | 477 |
if not inames: |
472 |
logger.ToStderr("No instances match the selected options") |
|
473 |
return 1 |
|
478 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
474 | 479 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
475 | 480 |
if not (opts.force_multi or not multi_on |
476 | 481 |
or _ConfirmOperation(inames, "failover (including shutdown)")): |
Also available in: Unified diff