Bug 873344 - Enhancement: virsh should support user-configure command aliases
Summary: Enhancement: virsh should support user-configure command aliases
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2012-11-05 15:33 UTC by James B. Byrne
Modified: 2014-04-04 20:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-04-04 20:59:55 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description James B. Byrne 2012-11-05 15:33:56 UTC
Description of problem:

The virsh command to start a guest instance is 'start', to stop the command is 'shutdown' and to restart the command is 'reboot'.  

Unless there is a strong reason why these terms were chosen it seems that it would present a more consistent user interface to either use the commands 'start, 'stop' and 'restart' OR 'boot', shutdown' and 'reboot'.  The present admixture of dissimilar terms places an easily avoidable intellectual burden on operators which serves no evident useful purpose.

My own preference is that all six commands should be provided and that 'boot' be aliased to 'start', 'restart' to 'reboot', and 'stop' to 'shutdown'. This approach would avoid impacting those who are already familiar with the existing scheme.  

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 2 Dave Allan 2012-11-05 17:19:48 UTC
This seems like a reasonable request to me.

Comment 3 Eric Blake 2012-11-05 19:59:42 UTC
Patch proposed:

Comment 4 Eric Blake 2012-11-06 15:12:55 UTC
The patches are trivial, and only impact virsh.  Done for upstream with:

commit 5f63a5cb42642f945696c51bbce7fdc160325510
Author: Eric Blake <eblake@redhat.com>
Date:   Tue Nov 6 08:09:32 2012 -0700

    virsh: document which term is older
    Make it clear that the alternate terms have no difference except
    for length of time they were supported.
    * tools/virsh.pod (start, shutdown, reboot): More documentation.

commit ff86b0c97b0525a2cd26048a0dbf16e600aaeb7b
Author: Eric Blake <eblake@redhat.com>
Date:   Mon Nov 5 12:54:59 2012 -0700

    virsh: add aliases 'boot', 'stop', and 'restart'
    https://bugzilla.redhat.com/show_bug.cgi?id=873344 suggested that
    the grouping 'boot', 'shutdown', 'reboot'; as well as the grouping
    'start', 'stop', 'restart'; might be easier to remember than the
    current mix of 'start', 'shutdown', 'reboot'.
    Also, touch up the wording of 'reboot' to be more accurate.
    * tools/virsh-domain.c (domManagementCmds): Add other command names.
    * tools/virsh.pod (start, shutdown, reboot): Document the aliases.

Comment 6 Eric Blake 2012-11-08 17:54:40 UTC
Moving out of POST - upstream is seriously considering reverting these patches, in which case this bug should be closed as WONTFIX.  Final determination will be made by the time upstream releases 1.0.1.

Comment 8 Eric Blake 2013-04-12 01:58:02 UTC
Retitling.  Upstream rejected the patches in comment 4.  All upstream is willing to support is the creation of virsh aliases, but no one has started work on that yet.

Comment 9 Eric Blake 2013-06-06 03:30:58 UTC
A proper upstream design is still a ways out; deferring until upstream has a solution.

Comment 12 RHEL Program Management 2014-04-04 20:59:55 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.