Bug 882037 - race between adding liveuser and gdm autologin
race between adding liveuser and gdm autologin
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: spin-kickstarts (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeroen van Meeuwen
Fedora Extras Quality Assurance
:
: 854722 (view as bug list)
Depends On:
Blocks: F18-accepted/F18FinalFreezeExcept
  Show dependency treegraph
 
Reported: 2012-11-29 19:43 EST by Mads Kiilerich
Modified: 2013-03-18 18:29 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-14 10:53:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to fix things (2.75 KB, patch)
2013-02-13 12:38 EST, Richard Hughes
no flags Details | Diff

  None (edit)
Description Mads Kiilerich 2012-11-29 19:43:31 EST
liveuser is added by the SysV init script /etc/init.d/livesys . But at the same time gdm starts and try to login as liveuser. There is apparently no ordering, and sometimes (some hardware and some spins/remixes) gdm will try to login and fail before the user is added.

systemd should be told to ensure that livesys has to complete before starting gdm.

The best solution would be to convert livesys to a systemd service and use a Before. That is probably not feasible now.

According to systemd.special(7):
       display-manager.service
           The display manager service. Usually this should be aliased
           (symlinked) to gdm.service or a similar display manager service.

           systemd automatically adds dependencies of type After for this
           target unit to all SysV init script service units with a LSB header
           referring to the $x-display-manager facility, for compatibility
           with Debian.

something like this should work:

### BEGIN INIT INFO
# Provides: $x-display-manager
### END INIT INFO

- but it didn't work for me ...

fedora-kickstarts-0.18.2-1.fc18.noarch
gdm-3.6.2-1.fc18.x86_64 / gdm-3.6.2-1.fc18.usefamilywild.i686
Comment 1 Jóhann B. Guðmundsson 2012-11-30 06:38:39 EST
seems like gdm.service ( and probably other dm service too ) are missing After=livesys.service or livesys or the livesys lsb header is missing X-Start-Before: gdm or gdm.service
Comment 2 Jóhann B. Guðmundsson 2012-11-30 06:45:42 EST
This is the after order in F17 and probably should be the same in each *dm.service

After=livesys-late.service rc-local.service systemd-user-sessions.service
Comment 3 Mads Kiilerich 2012-11-30 07:39:51 EST
Doing

 # chkconfig: 345 00 99
 # description: Init script for live image.
 
+### BEGIN INIT INFO
+#  X-Start-Before: gdm.service
+### END INIT INFO
+
 . /etc/init.d/functions
 
 if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ]; then

and 

+sed -i 's,^After=,After=livesys.service livesys-late.service rc-local.service systemd-user-sessions.service ,g' /lib/systemd/system/gdm.service

worked for me.

A change like that should be nth for f18, but it should probably be figured out exactly what is needed.

A full conversion to systemd service would probably be too late for f18.
Comment 4 Ray Strode [halfline] 2012-11-30 11:44:52 EST
probably better to use display-manager.service instead of gdm.service (which is an alias for gdm.service when appropriate and an alias for other display managers when appropriate)
Comment 5 Ray Strode [halfline] 2012-11-30 13:10:27 EST
is the sed required?  The X-Start-Before should be enough right?
Comment 6 Ray Strode [halfline] 2013-02-13 11:41:11 EST
*** Bug 854722 has been marked as a duplicate of this bug. ***
Comment 7 Ray Strode [halfline] 2013-02-13 12:02:00 EST
Richard did some testing and discovered the sed isn't required, but the the .service suffix on the X-Start-Before line is wrong.
Comment 8 Richard Hughes 2013-02-13 12:38:24 EST
Created attachment 696962 [details]
patch to fix things

This is what I pushed.
Comment 9 Adam Williamson 2013-03-18 18:29:34 EDT
confirmed fixed in f19, fwiw.

Note You need to log in before you can comment on or make changes to this bug.