Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 09:29, Meech (meech...@gmail.com) wrote:

> I created a fresh container by following the steps here
> https://wiki.archlinux.org/index.php/Arch_systemd_container using the
> command
> 
> pacstrap -i -c -d ~/MyContainer base
> 
> Not sure what is pulling it in.  Nor how to find out.
> 
> If I start it via systemd, the journal is quiet until I log in (via
> machinectl login) for the very first time.   Then after I logout the
> service goes into a restart loop every 10 seconds.

Hmm, your proposoed fix with ConditionPathExists= is actually right,
after all, sorry for my earlier confusion.

We should restart the getty as long as the pts device is around, but
not do so anymore as soon as it is gone (which happens when
"machinectl login" dies). ConditionPathExists= is a nice way to
implement this.

I have now applied a patch that makes that change.

Thanks for tracking this down, and sorry for the confusion!

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Meech
I created a fresh container by following the steps here
https://wiki.archlinux.org/index.php/Arch_systemd_container using the
command

pacstrap -i -c -d ~/MyContainer base

Not sure what is pulling it in.  Nor how to find out.

If I start it via systemd, the journal is quiet until I log in (via
machinectl login) for the very first time.   Then after I logout the
service goes into a restart loop every 10 seconds.




On Mon, Dec 8, 2014 at 9:15 AM, Lennart Poettering 
wrote:

> On Sun, 07.12.14 09:20, Meech (meech...@gmail.com) wrote:
>
> > Disabling seems to have no effect, it's a static service:
> >
> > console-getty.service  disabled
> > container-getty@.service   static
> > getty@.service enabled
> > serial-getty@.service  disabled
>
> Well, something appears to pull it in, the question is what precisely
> is it...
>
> >
> > However, I think adding this to the [unit] section seems to help:
> >
> > ConditionPathExists=/dev/pts/%I
> >
> > Still testing.  Thanks.
>
> That'd just be a work-around to ensure the service is skipped when it
> is pulled in incorrectly, but we really should figure out why it is
> pulled in incorrectly in the first place, and fix that.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Lennart Poettering
On Sun, 07.12.14 09:20, Meech (meech...@gmail.com) wrote:

> Disabling seems to have no effect, it's a static service:
> 
> console-getty.service  disabled
> container-getty@.service   static
> getty@.service enabled
> serial-getty@.service  disabled

Well, something appears to pull it in, the question is what precisely
is it...

> 
> However, I think adding this to the [unit] section seems to help:
> 
> ConditionPathExists=/dev/pts/%I
> 
> Still testing.  Thanks.

That'd just be a work-around to ensure the service is skipped when it
is pulled in incorrectly, but we really should figure out why it is
pulled in incorrectly in the first place, and fix that.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Lennart Poettering
On Sat, 06.12.14 09:49, Meech (meech...@gmail.com) wrote:

> Running Arch64 / Systemd 217.   I have a barebones container initialized
> with pacstrap.   The conatiner is stored in /var/lib and started via
> systemd (systemctl start systemd-nspawn@mycontainer)
> 
> When nobody is logged in, the journal is spammed every 10 seconds with
> agetty errors.   How can I prevent this?   It seems like it's in a never
> ending restart loop until somebody is logged in.

Hmm, did you manually enable "container-getty@.service" in some way?
Do you see any symlink to it in /etc/systemd/system/ somewhere? The
only way that service should be instantiated is during runtime with
tools like "machinectl login".

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Nspawn / getty restart loop

2014-12-07 Thread Meech
Disabling seems to have no effect, it's a static service:

console-getty.service  disabled
container-getty@.service   static
getty@.service enabled
serial-getty@.service  disabled

However, I think adding this to the [unit] section seems to help:

ConditionPathExists=/dev/pts/%I

Still testing.  Thanks.



On Sat, Dec 6, 2014 at 11:05 AM, Florian Koch 
wrote:

> the container-getty@.service only needs to be present, not enabled,
> you can disable the unit, then the logs go away
>
> 2014-12-06 15:49 GMT+01:00 Meech :
> > Running Arch64 / Systemd 217.   I have a barebones container initialized
> > with pacstrap.   The conatiner is stored in /var/lib and started via
> systemd
> > (systemctl start systemd-nspawn@mycontainer)
> >
> > When nobody is logged in, the journal is spammed every 10 seconds with
> > agetty errors.   How can I prevent this?   It seems like it's in a never
> > ending restart loop until somebody is logged in.
> >
> >
> > Dec 06 00:13:53 vpn agetty[1582]: /dev/pts/0: No such file or directory
> > Dec 06 00:14:03 vpn systemd[1]: container-getty@0.service has no holdoff
> > time, scheduling restart.
> > Dec 06 00:14:03 vpn systemd[1]: Stopping Container Getty on /dev/pts/0...
> > Dec 06 00:14:03 vpn systemd[1]: Starting Container Getty on /dev/pts/0...
> > Dec 06 00:14:03 vpn systemd[1]: Started Container Getty on /dev/pts/0.
> > Dec 06 00:14:03 vpn agetty[1583]: /dev/pts/0: No such file or directory
> > Dec 06 00:14:13 vpn systemd[1]: container-getty@0.service has no holdoff
> > time, scheduling restart.
> > Dec 06 00:14:13 vpn systemd[1]: Stopping Container Getty on /dev/pts/0...
> > Dec 06 00:14:13 vpn systemd[1]: Starting Container Getty on /dev/pts/0...
> > Dec 06 00:14:13 vpn systemd[1]: Started Container Getty on /dev/pts/0.
> >
> > Thanks.
> >
> > ___
> > systemd-devel mailing list
> > systemd-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> >
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Nspawn / getty restart loop

2014-12-06 Thread Florian Koch
the container-getty@.service only needs to be present, not enabled,
you can disable the unit, then the logs go away

2014-12-06 15:49 GMT+01:00 Meech :
> Running Arch64 / Systemd 217.   I have a barebones container initialized
> with pacstrap.   The conatiner is stored in /var/lib and started via systemd
> (systemctl start systemd-nspawn@mycontainer)
>
> When nobody is logged in, the journal is spammed every 10 seconds with
> agetty errors.   How can I prevent this?   It seems like it's in a never
> ending restart loop until somebody is logged in.
>
>
> Dec 06 00:13:53 vpn agetty[1582]: /dev/pts/0: No such file or directory
> Dec 06 00:14:03 vpn systemd[1]: container-getty@0.service has no holdoff
> time, scheduling restart.
> Dec 06 00:14:03 vpn systemd[1]: Stopping Container Getty on /dev/pts/0...
> Dec 06 00:14:03 vpn systemd[1]: Starting Container Getty on /dev/pts/0...
> Dec 06 00:14:03 vpn systemd[1]: Started Container Getty on /dev/pts/0.
> Dec 06 00:14:03 vpn agetty[1583]: /dev/pts/0: No such file or directory
> Dec 06 00:14:13 vpn systemd[1]: container-getty@0.service has no holdoff
> time, scheduling restart.
> Dec 06 00:14:13 vpn systemd[1]: Stopping Container Getty on /dev/pts/0...
> Dec 06 00:14:13 vpn systemd[1]: Starting Container Getty on /dev/pts/0...
> Dec 06 00:14:13 vpn systemd[1]: Started Container Getty on /dev/pts/0.
>
> Thanks.
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Nspawn / getty restart loop

2014-12-06 Thread Meech
Running Arch64 / Systemd 217.   I have a barebones container initialized
with pacstrap.   The conatiner is stored in /var/lib and started via
systemd (systemctl start systemd-nspawn@mycontainer)

When nobody is logged in, the journal is spammed every 10 seconds with
agetty errors.   How can I prevent this?   It seems like it's in a never
ending restart loop until somebody is logged in.


Dec 06 00:13:53 vpn agetty[1582]: /dev/pts/0: No such file or directory
Dec 06 00:14:03 vpn systemd[1]: container-getty@0.service has no holdoff
time, scheduling restart.
Dec 06 00:14:03 vpn systemd[1]: Stopping Container Getty on /dev/pts/0...
Dec 06 00:14:03 vpn systemd[1]: Starting Container Getty on /dev/pts/0...
Dec 06 00:14:03 vpn systemd[1]: Started Container Getty on /dev/pts/0.
Dec 06 00:14:03 vpn agetty[1583]: /dev/pts/0: No such file or directory
Dec 06 00:14:13 vpn systemd[1]: container-getty@0.service has no holdoff
time, scheduling restart.
Dec 06 00:14:13 vpn systemd[1]: Stopping Container Getty on /dev/pts/0...
Dec 06 00:14:13 vpn systemd[1]: Starting Container Getty on /dev/pts/0...
Dec 06 00:14:13 vpn systemd[1]: Started Container Getty on /dev/pts/0.

Thanks.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel