Re: [gentoo-user] OK, so not everything works properly with systemd

2015-03-31 Thread Daniel Frey
On 03/21/2015 02:46 PM, Canek Peláez Valdés wrote:
 
 Could you run this immediately after booting:
 
 systemd-delta
 
 Just to check that the unit files you are using are not being overridden
 by something.
 

OK, I've confirmed the poweroff target works fine but the reboot and
shutdown targets don't. Is there an easy way to list the differences
between the targets?

One other question, I have an APC UPS, and use apcupsd - systemd always
waits a minute and a half for apcupsd to stop. The thing is, it IS
stopping, but for some reason systemd doesn't seem to notice:

-- Reboot --
Mar 31 19:08:14 osoikaze apcupsd[618]: apcupsd 3.14.8 (16 January 2010)
gentoo startup succeeded
Mar 31 19:08:14 osoikaze apcupsd[618]: NIS server startup succeeded
Mar 31 19:31:52 osoikaze apcupsd[618]: apcupsd exiting, signal 15
-- Reboot --


Dan



Re: [gentoo-user] OK, so not everything works properly with systemd

2015-03-31 Thread Daniel Frey
On 03/21/2015 02:46 PM, Canek Peláez Valdés wrote:
 
 They are; basically everything nowadays is systemd aware. Even OpenRC
 can now use some of its configurations.
 
 Could you run this immediately after booting:
 
 systemd-delta

I've finally gotten around to doing this:

[OVERRIDDEN] /etc/systemd/system/distccd.service →
/usr/lib/systemd/system/distccd.service

--- /usr/lib/systemd/system/distccd.service 2015-02-20
09:03:58.46960 -0800
+++ /etc/systemd/system/distccd.service 2015-03-12 14:49:15.145608558 -0700
@@ -4,7 +4,7 @@

 [Service]
 User=distcc
-ExecStart=/usr/bin/distccd --verbose --no-detach --daemon --port 3632
-N 15 --allow $ALLOWED_SERVERS
+ExecStart=/usr/bin/distccd --verbose --no-detach --daemon --port 3632
-N 15 --allow 127.0.0.1 --allow $ALLOWED_SERVERS

 [Install]
 WantedBy=multi-user.target

[EXTENDED]   /etc/systemd/system/distccd.service →
/etc/systemd/system/distccd.service.d/00gentoo.conf
[EXTENDED]   /run/systemd/system/session-1.scope →
/run/systemd/system/session-1.scope.d/50-SendSIGHUP.conf
[EXTENDED]   /run/systemd/system/session-1.scope →
/run/systemd/system/session-1.scope.d/50-After-systemd-user-sessions\x2eservice.conf
[EXTENDED]   /run/systemd/system/session-1.scope →
/run/systemd/system/session-1.scope.d/50-After-systemd-logind\x2eservice.conf
[EXTENDED]   /run/systemd/system/session-1.scope →
/run/systemd/system/session-1.scope.d/50-Description.conf
[EXTENDED]   /run/systemd/system/session-1.scope →
/run/systemd/system/session-1.scope.d/50-Slice.conf
[EXTENDED]   /usr/lib/systemd/system/sntp.service →
/etc/systemd/system/sntp.service.d/00gentoo.conf
[EXTENDED]   /usr/lib/systemd/system/ntpdate.service →
/etc/systemd/system/ntpdate.service.d/00gentoo.conf

9 overridden configuration files found.


I had to override distccd myself, as it didn't allow specifying multiple
hosts.

I did discover something else today, the shutdown target doesn't work
either. I'm waiting for my array to rebuild. So the reboot and shutdown
targets don't work, but the poweroff target seems to. I'm going to
double-check that next.

I did check my profile:
  [7]   default/linux/amd64/13.0/desktop/kde/systemd *

So I am built using a systemd profile. I'm getting a little confused.

Dan




Re: [gentoo-user] OK, so not everything works properly with systemd

2015-03-21 Thread Canek Peláez Valdés
On Sat, Mar 21, 2015 at 11:21 AM, Daniel Frey djqf...@gmail.com wrote:
 Hi list,

Hi.

 In one of my earlier posts I mentioned I wasn't having any issues with
 systemd. Well, I guess I lied, although I didn't know about it at the
time.

 My laptop works fine, no issues.

 My desktop, however, has an issue, but only while rebooting. I use mdadm
 to access my IMSM raid, and during the reboot process, the last message
 I see is (from memory, so it's not exact):

 Stopping mdmon...

 And it hangs there.

 The journal shows this:
 =
 -- Reboot --
 Mar 18 20:48:42 osoikaze systemd-journal[485]: Journal stopped
 Mar 18 20:48:42 osoikaze systemd-shutdown[1]: Sending SIGTERM to
 remaining processes...
 Mar 18 20:48:41 osoikaze systemd[1]: Shutting down.

 =

 mdmon is normally stopped right at the end, so it should be a part of
 'Sending SIGTERM to remaining processes'. The Journal stops, then from
 what I gather, it hangs on the next one, which is mdmon. I have left it
 for a half an hour and it doesn't do anything.

 When rebooting:

 =
 Mar 18 20:49:39 osoikaze kernel: md/raid10:md126: active with 4 out of 4
 devices
 Mar 18 20:49:39 osoikaze kernel: md/raid10:md126: not clean -- starting
 background reconstruction
 Mar 18 20:49:39 osoikaze kernel: md: bindsdi
 Mar 18 20:49:39 osoikaze kernel: md: bindsdh
 Mar 18 20:49:39 osoikaze kernel: md: bindsdg
 Mar 18 20:49:39 osoikaze kernel: md: bindsdf
 Mar 18 20:49:39 osoikaze kernel: md: bindsdi
 Mar 18 20:49:39 osoikaze kernel: md: bindsdg
 =

 Indicating that mdmon was not stopped properly. (The array starts a
 rebuild.) Checking /proc/mdstat confirms this.

 Now this is the odd thing: `systemctl poweroff` works fine! It shuts
 everything down, and turns my workstation off without corrupting the
 RAID array!

 So why does `systemctl reboot` not want to work? I'm a little confused.

What kind of initramfs are you using?  Supposedly, the only difference
between poweroff and reboot is that the former turns off the machine and
reboot does a reset. In either case, systemd pivots back to the initramfs
before umounting everything, so perhaps there lies the problem.

 I also noticed this in the USE flags for systemd:
 - - sysv-utils : Install sysvinit compatibility
 symlinks and manpages for init, telinit, halt, poweroff, reboot,
 runlevel, and shutdown

 Should I enable that USE flag?

No. In Gentoo in particular the SysV compatibility is completely useless.

 (By the way, KDE shows the same behaviour. If I shutdown with the K
 Menu, it works. Reboot from the K Menu hangs.)

KDE (as GNOME, Xfce, and everything else) uses logind, so it's equivalent
to do systemctl poweroff or click Power Off in your DE.

I would bet on the initramfs.

Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México


Re: [gentoo-user] OK, so not everything works properly with systemd

2015-03-21 Thread Tom H
On Sat, Mar 21, 2015 at 1:21 PM, Daniel Frey djqf...@gmail.com wrote:

 I also noticed this in the USE flags for systemd:
 - - sysv-utils : Install sysvinit compatibility
 symlinks and manpages for init, telinit, halt, poweroff, reboot,
 runlevel, and shutdown

 Should I enable that USE flag?

It removes sysvinit (and systemd-sysv-utils if it's installed) and
turns the listed binaries into symlinks to systemd.



[gentoo-user] OK, so not everything works properly with systemd

2015-03-21 Thread Daniel Frey
Hi list,

In one of my earlier posts I mentioned I wasn't having any issues with
systemd. Well, I guess I lied, although I didn't know about it at the time.

My laptop works fine, no issues.

My desktop, however, has an issue, but only while rebooting. I use mdadm
to access my IMSM raid, and during the reboot process, the last message
I see is (from memory, so it's not exact):

Stopping mdmon...

And it hangs there.

The journal shows this:
=
-- Reboot --
Mar 18 20:48:42 osoikaze systemd-journal[485]: Journal stopped
Mar 18 20:48:42 osoikaze systemd-shutdown[1]: Sending SIGTERM to
remaining processes...
Mar 18 20:48:41 osoikaze systemd[1]: Shutting down.

=

mdmon is normally stopped right at the end, so it should be a part of
'Sending SIGTERM to remaining processes'. The Journal stops, then from
what I gather, it hangs on the next one, which is mdmon. I have left it
for a half an hour and it doesn't do anything.

When rebooting:

=
Mar 18 20:49:39 osoikaze kernel: md/raid10:md126: active with 4 out of 4
devices
Mar 18 20:49:39 osoikaze kernel: md/raid10:md126: not clean -- starting
background reconstruction
Mar 18 20:49:39 osoikaze kernel: md: bindsdi
Mar 18 20:49:39 osoikaze kernel: md: bindsdh
Mar 18 20:49:39 osoikaze kernel: md: bindsdg
Mar 18 20:49:39 osoikaze kernel: md: bindsdf
Mar 18 20:49:39 osoikaze kernel: md: bindsdi
Mar 18 20:49:39 osoikaze kernel: md: bindsdg
=

Indicating that mdmon was not stopped properly. (The array starts a
rebuild.) Checking /proc/mdstat confirms this.

Now this is the odd thing: `systemctl poweroff` works fine! It shuts
everything down, and turns my workstation off without corrupting the
RAID array!

So why does `systemctl reboot` not want to work? I'm a little confused.

I also noticed this in the USE flags for systemd:
- - sysv-utils : Install sysvinit compatibility
symlinks and manpages for init, telinit, halt, poweroff, reboot,
runlevel, and shutdown

Should I enable that USE flag?

(By the way, KDE shows the same behaviour. If I shutdown with the K
Menu, it works. Reboot from the K Menu hangs.)

Dan



Re: [gentoo-user] OK, so not everything works properly with systemd

2015-03-21 Thread Canek Peláez Valdés
On Sat, Mar 21, 2015 at 3:38 PM, Daniel Frey djqf...@gmail.com wrote:
[...]
 I was using genkernel, but it was whining about not supporting systemd,
 so I tried dracut for the first time.

 However, the initramfs created by genkernel has the same issue.

 I didn't do any special configuation of dracut, I read that just running
 it can usually create a initramfs without any additional configuration.
 It did detect I have mdadm of course, or my system wouldn't have booted
 at all.

That's weird.

[...]
 I was wondering more about the symlinks to the regular
 shutdown/reboot/etc commands. I never actually checked to see if they're
 already systemd-aware.

They are; basically everything nowadays is systemd aware. Even OpenRC can
now use some of its configurations.

Could you run this immediately after booting:

systemd-delta

Just to check that the unit files you are using are not being overridden by
something.

Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México


Re: [gentoo-user] OK, so not everything works properly with systemd

2015-03-21 Thread Daniel Frey
On 03/21/2015 10:27 AM, Canek Peláez Valdés wrote:

 So why does `systemctl reboot` not want to work? I'm a little confused.
 
 What kind of initramfs are you using?  Supposedly, the only difference
 between poweroff and reboot is that the former turns off the machine and
 reboot does a reset. In either case, systemd pivots back to the
 initramfs before umounting everything, so perhaps there lies the problem.

I was using genkernel, but it was whining about not supporting systemd,
so I tried dracut for the first time.

However, the initramfs created by genkernel has the same issue.

I didn't do any special configuation of dracut, I read that just running
it can usually create a initramfs without any additional configuration.
It did detect I have mdadm of course, or my system wouldn't have booted
at all.


 I also noticed this in the USE flags for systemd:
 - - sysv-utils : Install sysvinit compatibility
 symlinks and manpages for init, telinit, halt, poweroff, reboot,
 runlevel, and shutdown

 Should I enable that USE flag?
 
 No. In Gentoo in particular the SysV compatibility is completely useless.

I was wondering more about the symlinks to the regular
shutdown/reboot/etc commands. I never actually checked to see if they're
already systemd-aware.


Dan