Re: [libvirt] [PATCH] Introduce virt-console

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 15, 2009 at 01:45:50PM +0000, John Levon wrote:
> On Thu, Jan 15, 2009 at 01:28:37PM +0000, Daniel P. Berrange wrote:
> 
> > > +libexec_PROGRAMS = virt-console
> > 
> > This can just be bin_PROGRAMS - not need to hide it outside of
> > /usr/bin - its fine to let users just run virt-console directly
> > if they wish
> 
> Solaris policy is not to introduce plumbing into the user's PATH.
> virt-console is undocumented and there is no advantage to running it
> directly. If it were in PATH we would have to document it, and we have
> no intention of doing that...

I'll volunteer to write a manual page for virt-console, since even
existing manpage for 'virsh console' is non-existant.

> > We need to add an explicit argument to turn on the automatic
> > reconnect of VMs when they reboot. Existing apps calling
> > virsh console rely on its current semantics which are to
> > exit upon domain reboot and we can't break them
> 
> We argued about this last time. Looks like we'll have to keep this
> change private, and let Linux users suffer. Oh well :)

You explicitly break virt-install by doing this.

Have virt-console provide the more sensible default auto-reconnect
semantics, and make 'virsh console' call it with a flag to turn
this off to preserve existing semantics & not break users like
virt-install.

> > > +    if (tcgetattr(ttyfd, &ttyattr) < 0) {
> > > +        ioctl(ttyfd, I_PUSH, "ptem");
> > > +        ioctl(ttyfd, I_PUSH, "ldterm");
> > > +        tcgetattr(ttyfd, &ttyattr);
> > > +    }
> > > +
> > > +    cfmakeraw(&ttyattr);
> > > +    tcsetattr(ttyfd, TCSANOW, &ttyattr);
> > > +#endif
> > 
> > The caller of open_tty() is also doing the getattr/makeraw/setattr
> > operation, so this block appears to be redundant - just need to
> 
> Nope, that's on STDIN, not the pty slave. Stupid STREAMS semantics.

Oh, can you add a comment to this effect -- easy to miss that
distinction when browsing the code :-)

Daniel
-- 
|: Red Hat, Engineering, London   -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 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]