public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] OK, so not everything works properly with systemd
@ 2015-03-21 17:21 Daniel Frey
  2015-03-21 17:27 ` Canek Peláez Valdés
  2015-03-21 17:51 ` Tom H
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Frey @ 2015-03-21 17:21 UTC (permalink / raw
  To: gentoo-user

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: bind<sdi>
Mar 18 20:49:39 osoikaze kernel: md: bind<sdh>
Mar 18 20:49:39 osoikaze kernel: md: bind<sdg>
Mar 18 20:49:39 osoikaze kernel: md: bind<sdf>
Mar 18 20:49:39 osoikaze kernel: md: bind<sdi>
Mar 18 20:49:39 osoikaze kernel: md: bind<sdg>
=====

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OK, so not everything works properly with systemd
  2015-03-21 17:21 [gentoo-user] OK, so not everything works properly with systemd Daniel Frey
@ 2015-03-21 17:27 ` Canek Peláez Valdés
  2015-03-21 21:38   ` Daniel Frey
  2015-03-21 17:51 ` Tom H
  1 sibling, 1 reply; 7+ messages in thread
From: Canek Peláez Valdés @ 2015-03-21 17:27 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3039 bytes --]

On Sat, Mar 21, 2015 at 11:21 AM, Daniel Frey <djqfrey@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: bind<sdi>
> Mar 18 20:49:39 osoikaze kernel: md: bind<sdh>
> Mar 18 20:49:39 osoikaze kernel: md: bind<sdg>
> Mar 18 20:49:39 osoikaze kernel: md: bind<sdf>
> Mar 18 20:49:39 osoikaze kernel: md: bind<sdi>
> Mar 18 20:49:39 osoikaze kernel: md: bind<sdg>
> =====
>
> 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

[-- Attachment #2: Type: text/html, Size: 3565 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OK, so not everything works properly with systemd
  2015-03-21 17:21 [gentoo-user] OK, so not everything works properly with systemd Daniel Frey
  2015-03-21 17:27 ` Canek Peláez Valdés
@ 2015-03-21 17:51 ` Tom H
  1 sibling, 0 replies; 7+ messages in thread
From: Tom H @ 2015-03-21 17:51 UTC (permalink / raw
  To: Gentoo User

On Sat, Mar 21, 2015 at 1:21 PM, Daniel Frey <djqfrey@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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OK, so not everything works properly with systemd
  2015-03-21 17:27 ` Canek Peláez Valdés
@ 2015-03-21 21:38   ` Daniel Frey
  2015-03-21 21:46     ` Canek Peláez Valdés
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Frey @ 2015-03-21 21:38 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OK, so not everything works properly with systemd
  2015-03-21 21:38   ` Daniel Frey
@ 2015-03-21 21:46     ` Canek Peláez Valdés
  2015-04-01  2:26       ` Daniel Frey
  2015-04-01  2:42       ` Daniel Frey
  0 siblings, 2 replies; 7+ messages in thread
From: Canek Peláez Valdés @ 2015-03-21 21:46 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]

On Sat, Mar 21, 2015 at 3:38 PM, Daniel Frey <djqfrey@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

[-- Attachment #2: Type: text/html, Size: 1334 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OK, so not everything works properly with systemd
  2015-03-21 21:46     ` Canek Peláez Valdés
@ 2015-04-01  2:26       ` Daniel Frey
  2015-04-01  2:42       ` Daniel Frey
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Frey @ 2015-04-01  2:26 UTC (permalink / raw
  To: gentoo-user

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.469677770 -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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OK, so not everything works properly with systemd
  2015-03-21 21:46     ` Canek Peláez Valdés
  2015-04-01  2:26       ` Daniel Frey
@ 2015-04-01  2:42       ` Daniel Frey
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Frey @ 2015-04-01  2:42 UTC (permalink / raw
  To: gentoo-user

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-01  2:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-21 17:21 [gentoo-user] OK, so not everything works properly with systemd Daniel Frey
2015-03-21 17:27 ` Canek Peláez Valdés
2015-03-21 21:38   ` Daniel Frey
2015-03-21 21:46     ` Canek Peláez Valdés
2015-04-01  2:26       ` Daniel Frey
2015-04-01  2:42       ` Daniel Frey
2015-03-21 17:51 ` Tom H

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox