[libvirt] [PATCH]show the autostart status when display a 'virsh dominfo'.

http://www.redhat.com/archives/libvir-list/2008-May/msg00065.html
It should really show the autostart status when display a 'virsh domiinfo' I make a patch to show the autostart status when display a 'virsh dominfo'.
*** autostart status = enable *** # virsh dominfo guest_dom Id: - Name: guest_dom UUID: 08b6f537-87f5-9617-1d66-cadd223fd4b6 OS Type: linux State: shut off CPU(s): 1 Max memory: 262144 kB Used memory: 262144 kB Auto Start: enable ^^^^^^^^^^^^^^^^^^^^^^ *** autostart status = disable *** # virsh dominfo guest_dom Id: - Name: guest_dom UUID: 08b6f537-87f5-9617-1d66-cadd223fd4b6 OS Type: linux State: shut off CPU(s): 1 Max memory: 262144 kB Used memory: 262144 kB Auto Start: disable ^^^^^^^^^^^^^^^^^^^^^^^ Thanks, Shigeki Sakamoto. Index: virsh.c =================================================================== RCS file: /data/cvs/libvirt/src/virsh.c,v retrieving revision 1.153 diff -u -p -r1.153 virsh.c --- virsh.c 23 May 2008 08:24:44 -0000 1.153 +++ virsh.c 26 May 2008 05:59:54 -0000 @@ -1492,7 +1492,7 @@ cmdDominfo(vshControl * ctl, vshCmd * cm { virDomainInfo info; virDomainPtr dom; - int ret = TRUE; + int ret = TRUE, autostart; unsigned int id; char *str, uuid[VIR_UUID_STRING_BUFLEN]; @@ -1545,6 +1545,11 @@ cmdDominfo(vshControl * ctl, vshCmd * cm ret = FALSE; } + if (!virDomainGetAutostart(dom, &autostart)) { + vshPrint(ctl, "%-15s %-15s\n", _("Auto Start:"), + autostart ? "enable" : "disable" ); + } + virDomainFree(dom); return ret; }

On Mon, May 26, 2008 at 05:22:47PM +0900, S.Sakamoto wrote:
http://www.redhat.com/archives/libvir-list/2008-May/msg00065.html
It should really show the autostart status when display a 'virsh domiinfo' I make a patch to show the autostart status when display a 'virsh dominfo'.
Looks good. I'll commit this later today, with some extra _(...) around some of the strings (for i18n). Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/

Hi, Rich Please commit it. I heard U.S.(Dan) has a national holiday on monday. so I am waiting up to Tuesday. http://www3.kumc.edu/diversity/national/memorial.html Thanks Atsushi SAKAI "Richard W.M. Jones" <rjones@redhat.com> wrote:
On Mon, May 26, 2008 at 05:22:47PM +0900, S.Sakamoto wrote:
http://www.redhat.com/archives/libvir-list/2008-May/msg00065.html
It should really show the autostart status when display a 'virsh domiinfo' I make a patch to show the autostart status when display a 'virsh dominfo'.
Looks good. I'll commit this later today, with some extra _(...) around some of the strings (for i18n).
Rich.
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, May 27, 2008 at 06:27:52PM +0900, Atsushi SAKAI wrote:
Hi, Rich
Please commit it.
That's committed now. Thanks for the contribution: Display autostart status in virsh dominfo command. * src/virsh.c: Display autostart status in virsh dominfo command (Shigeki Sakamoto).
I heard U.S.(Dan) has a national holiday on monday. so I am waiting up to Tuesday. http://www3.kumc.edu/diversity/national/memorial.html
I think everyone was on holiday yesterday. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/

On Tue, May 27, 2008 at 10:38:54AM +0100, Richard W.M. Jones wrote:
On Tue, May 27, 2008 at 06:27:52PM +0900, Atsushi SAKAI wrote:
Hi, Rich
Please commit it.
That's committed now. Thanks for the contribution:
Display autostart status in virsh dominfo command. * src/virsh.c: Display autostart status in virsh dominfo command (Shigeki Sakamoto).
FYI, you'll also need to update the virshtest data files for dominfo so that they expect the new data output here to avoid failures. Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Tue, May 27, 2008 at 02:09:43PM +0100, Daniel P. Berrange wrote:
On Tue, May 27, 2008 at 10:38:54AM +0100, Richard W.M. Jones wrote:
On Tue, May 27, 2008 at 06:27:52PM +0900, Atsushi SAKAI wrote:
Hi, Rich
Please commit it.
That's committed now. Thanks for the contribution:
Display autostart status in virsh dominfo command. * src/virsh.c: Display autostart status in virsh dominfo command (Shigeki Sakamoto).
FYI, you'll also need to update the virshtest data files for dominfo so that they expect the new data output here to avoid failures.
Yes, forgot that. I'll come up with a patch to fix that ... Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v

On Tue, May 27, 2008 at 02:09:43PM +0100, Daniel P. Berrange wrote:
FYI, you'll also need to update the virshtest data files for dominfo so that they expect the new data output here to avoid failures.
Here's the patch to fix that. Actually, I already committed it. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 59 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

Hi, Rich and Dan Thank you for fixing this. I think it should be noted about submitting patch on HACKING file or others. How do you think? (like make check; make syntax-check; make tests) Thanks Atsushi SAKAI "Richard W.M. Jones" <rjones@redhat.com> wrote:
On Tue, May 27, 2008 at 02:09:43PM +0100, Daniel P. Berrange wrote:
FYI, you'll also need to update the virshtest data files for dominfo so that they expect the new data output here to avoid failures.
Here's the patch to fix that. Actually, I already committed it.
Rich.
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 59 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

On Wed, May 28, 2008 at 11:21:05AM +0900, Atsushi SAKAI wrote:
Hi, Rich and Dan
Thank you for fixing this. I think it should be noted about submitting patch on HACKING file or others. How do you think? (like make check; make syntax-check; make tests)
Yes, basically the three things you should run before committing patches are make check make syntax-check make valgrind (in the tests/ sub-dir) The latter checks for memory leaks. Of course I myself forget this often - which is why we have the automated nightly builds, so we never miss the problem for longer than a day Regards Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Wed, May 28, 2008 at 02:18:50PM +0100, Daniel P. Berrange wrote:
On Wed, May 28, 2008 at 11:21:05AM +0900, Atsushi SAKAI wrote:
Hi, Rich and Dan
Thank you for fixing this. I think it should be noted about submitting patch on HACKING file or others. How do you think? (like make check; make syntax-check; make tests)
Yes, basically the three things you should run before committing patches are
make check make syntax-check make valgrind (in the tests/ sub-dir)
The latter checks for memory leaks.
Of course I myself forget this often - which is why we have the automated nightly builds, so we never miss the problem for longer than a day
Suggested patch to HACKING file. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top

Hi, Rich Thank you for your patch. The document discribes more detail than I expected :-). Thanks Atsushi SAKAI "Richard W.M. Jones" <rjones@redhat.com> wrote:
On Wed, May 28, 2008 at 02:18:50PM +0100, Daniel P. Berrange wrote:
On Wed, May 28, 2008 at 11:21:05AM +0900, Atsushi SAKAI wrote:
Hi, Rich and Dan
Thank you for fixing this. I think it should be noted about submitting patch on HACKING file or others. How do you think? (like make check; make syntax-check; make tests)
Yes, basically the three things you should run before committing patches are
make check make syntax-check make valgrind (in the tests/ sub-dir)
The latter checks for memory leaks.
Of course I myself forget this often - which is why we have the automated nightly builds, so we never miss the problem for longer than a day
Suggested patch to HACKING file.
Rich.
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top

On Mon, Jun 02, 2008 at 10:39:36AM +0100, Richard W.M. Jones wrote:
On Wed, May 28, 2008 at 02:18:50PM +0100, Daniel P. Berrange wrote:
On Wed, May 28, 2008 at 11:21:05AM +0900, Atsushi SAKAI wrote:
Hi, Rich and Dan
Thank you for fixing this. I think it should be noted about submitting patch on HACKING file or others. How do you think? (like make check; make syntax-check; make tests)
Yes, basically the three things you should run before committing patches are
make check make syntax-check make valgrind (in the tests/ sub-dir)
The latter checks for memory leaks.
Of course I myself forget this often - which is why we have the automated nightly builds, so we never miss the problem for longer than a day
Suggested patch to HACKING file.
Nice writeup ! +1 Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Mon, Jun 02, 2008 at 07:03:15AM -0400, Daniel Veillard wrote:
On Mon, Jun 02, 2008 at 10:39:36AM +0100, Richard W.M. Jones wrote:
On Wed, May 28, 2008 at 02:18:50PM +0100, Daniel P. Berrange wrote:
On Wed, May 28, 2008 at 11:21:05AM +0900, Atsushi SAKAI wrote:
Hi, Rich and Dan
Thank you for fixing this. I think it should be noted about submitting patch on HACKING file or others. How do you think? (like make check; make syntax-check; make tests)
Yes, basically the three things you should run before committing patches are
make check make syntax-check make valgrind (in the tests/ sub-dir)
The latter checks for memory leaks.
Of course I myself forget this often - which is why we have the automated nightly builds, so we never miss the problem for longer than a day
Suggested patch to HACKING file.
Nice writeup ! +1
Committed this. It's probably not perfect, so feel free to fix any problems ... Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
participants (5)
-
Atsushi SAKAI
-
Daniel P. Berrange
-
Daniel Veillard
-
Richard W.M. Jones
-
S.Sakamoto