Bug 1123845 - Server presets not applied in systemd scriptlets
Summary: Server presets not applied in systemd scriptlets
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-release
Version: 21
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F21AlphaBlocker
TreeView+ depends on / blocked
Reported: 2014-07-28 12:50 UTC by Miloslav Trmač
Modified: 2014-08-27 18:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-08-27 18:48:32 UTC

Attachments (Terms of Use)

Description Miloslav Trmač 2014-07-28 12:50:16 UTC
Description of problem:
fedora-release-server ships some presets which are (sometimes?) not applied during installation.

Version-Release number of selected component (if applicable):

How reproducible:
Test a Fedora Server DVD install with default options.

Actual results:
Installation order in the problematic case ends up
> 08:26:56,906 INFO packaging: fedora-release-21-0.12.noarch (3/561)
> 08:26:56,957 INFO packaging: systemd-libs-215-6.fc21.x86_64 (197/561)
> 08:26:56,977 INFO packaging: systemd-215-6.fc21.x86_64 (300/561)
> 08:26:56,989 INFO packaging: rolekit-0.0.1-1.fc21.noarch (342/561)
> 08:26:56,990 INFO packaging: systemd-python-215-6.fc21.x86_64 (353/561)
> 08:26:56,991 INFO packaging: systemd-python3-215-6.fc21.x86_64 (356/561)
> 08:26:56,993 INFO packaging: cockpit-assets-0.16-2.fc21.noarch (369/561)
> 08:26:56,993 INFO packaging: cockpit-0.16-2.fc21.x86_64 (370/561)
> 08:26:56,993 INFO packaging: fedora-release-server-21-0.12.noarch (371/561)

i.e. the fedora-release-server presets are not yet present when the rolekit and cockpit scriptlets call (systemctl preset).

A proposed solution was for systemd to require: fedora-release-$something (fedora-release-product_config_if_any ?!), but currently the fedora-release-$product packages don’t share a single Provides: .  If we go with this, the solution would be 1) to add such a Provides: to fedora-release-*, and 2) for systemd to depend on it.

Comment 1 Stephen Gallagher 2014-07-29 11:45:40 UTC
I suggest we add:
Provides: fedora-release-presets
to each of fedora-release-standard, fedora-release-server, fedora-release-workstation and fedora-release-cloud.

Then we can have the Fedora systemd package "Requires: fedora-release-presets"

(Note: the individual products/standard variant do not HAVE to provide an actual preset file, but they need to have the virtual Provides: so that systemd can resolve its dependency)

Comment 2 Adam Williamson 2014-07-30 16:11:55 UTC
Alpha criterion: "Unless explicitly specified otherwise, after system installation the Cockpit web management interface must be running and accessible on its default port (XX)." - https://fedoraproject.org/wiki/Fedora_21_Alpha_Release_Criteria#Cockpit_management_interface . This is implemented via a preset, so if this bug hits, that criterion is violated.

Comment 3 Adam Williamson 2014-07-30 16:17:44 UTC
Discussed at 2014-07-30 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2014-07-30/f21-blocker-review.2014-07-30-15.59.log.txt . Accepted as a blocker per criterion cited in c#2.

Comment 4 Miloslav Trmač 2014-08-01 16:14:23 UTC
Posted a patch as discussed in #fedora-server (requiring only changes to fedora-release-server and no other packages) as https://fedorahosted.org/rel-eng/ticket/5955 .

Comment 5 Stef Walter 2014-08-01 17:50:08 UTC
I see the same problem. My output:

  Installing : libudisks2-2.1.3-3.fc21.x86_64                              1/14 
  Installing : storaged-0.3.0-2.fc21.x86_64                                2/14 
  Installing : libatasmart-0.19-6.fc21.x86_64                              3/14 
  Installing : gdisk-0.8.10-3.fc21.x86_64                                  4/14 
  Installing : accountsservice-0.6.37-2.fc21.x86_64                        5/14 
  Installing : accountsservice-libs-0.6.37-2.fc21.x86_64                   6/14 
  Installing : libssh-0.6.3-2.fc21.x86_64                                  7/14 
  Installing : rolekit-0.0.1-1.fc21.noarch                                 8/14 
  Installing : json-glib-1.0.2-3.fc21.x86_64                               9/14 
  Installing : xfsprogs-3.2.1-1.fc21.x86_64                               10/14 
  Installing : udisks2-2.1.3-3.fc21.x86_64                                11/14 
  Installing : cockpit-assets-0.18-1.fc21.noarch                          12/14 
  Installing : cockpit-0.18-1.fc21.x86_64                                 13/14 
  Installing : fedora-release-server-21-0.12.noarch                       14/14 
  Verifying  : storaged-0.3.0-2.fc21.x86_64                                1/14 
  Verifying  : xfsprogs-3.2.1-1.fc21.x86_64                                2/14 
  Verifying  : json-glib-1.0.2-3.fc21.x86_64                               3/14 
  Verifying  : rolekit-0.0.1-1.fc21.noarch                                 4/14 
  Verifying  : udisks2-2.1.3-3.fc21.x86_64                                 5/14 
  Verifying  : libudisks2-2.1.3-3.fc21.x86_64                              6/14 
  Verifying  : libssh-0.6.3-2.fc21.x86_64                                  7/14 
  Verifying  : cockpit-assets-0.18-1.fc21.noarch                           8/14 
  Verifying  : accountsservice-0.6.37-2.fc21.x86_64                        9/14 
  Verifying  : cockpit-0.18-1.fc21.x86_64                                 10/14 
  Verifying  : gdisk-0.8.10-3.fc21.x86_64                                 11/14 
  Verifying  : libatasmart-0.19-6.fc21.x86_64                             12/14 
  Verifying  : accountsservice-libs-0.6.37-2.fc21.x86_64                  13/14 
  Verifying  : fedora-release-server-21-0.12.noarch                       14/14 

  fedora-release-server.noarch 0:21-0.12                                        

Dependency Installed:
  accountsservice.x86_64 0:0.6.37-2.fc21                                        
  accountsservice-libs.x86_64 0:0.6.37-2.fc21                                   
  cockpit.x86_64 0:0.18-1.fc21                                                  
  cockpit-assets.noarch 0:0.18-1.fc21                                           
  gdisk.x86_64 0:0.8.10-3.fc21                                                  
  json-glib.x86_64 0:1.0.2-3.fc21                                               
  libatasmart.x86_64 0:0.19-6.fc21                                              
  libssh.x86_64 0:0.6.3-2.fc21                                                  
  libudisks2.x86_64 0:2.1.3-3.fc21                                              
  rolekit.noarch 0:0.0.1-1.fc21                                                 
  storaged.x86_64 0:0.3.0-2.fc21                                                
  udisks2.x86_64 0:2.1.3-3.fc21                                                 
  xfsprogs.x86_64 0:3.2.1-1.fc21                                                

[root@jalisco ~]# systemctl status cockpit.socket
● cockpit.socket - Cockpit Web Server Socket
   Loaded: loaded (/usr/lib/systemd/system/cockpit.socket; disabled)
   Active: inactive (dead)
     Docs: man:cockpit-ws(8)
   Listen: [::]:1001 (Stream)
[root@jalisco ~]# systemctl preset cockpit.socket
Created symlink from /etc/systemd/system/sockets.target.wants/cockpit.socket to /usr/lib/systemd/system/cockpit.socket.
[root@jalisco ~]# systemctl status cockpit.socket
● cockpit.socket - Cockpit Web Server Socket
   Loaded: loaded (/usr/lib/systemd/system/cockpit.socket; enabled)
   Active: inactive (dead)
     Docs: man:cockpit-ws(8)
   Listen: [::]:1001 (Stream)

Comment 6 Stef Walter 2014-08-01 19:18:36 UTC
Shouldn't fedora-release-server simply run 'systemctl preset cockpit.socket' and 'systemctl preset rolekit'? Why does this need to be more complicated than that?

Comment 7 Miloslav Trmač 2014-08-01 20:46:30 UTC
(In reply to Stef Walter from comment #6)
> Shouldn't fedora-release-server simply run 'systemctl preset cockpit.socket'
> and 'systemctl preset rolekit'? Why does this need to be more complicated
> than that?

That’s what the patch does, only adding one line and one dependency so that the list of units in the preset file and in the %post script can’t get out of sync.  Or are you saying that that dependency is not worth it?

Comment 8 Miloslav Trmač 2014-08-19 17:17:38 UTC
The patch has been applied and my local composes work fine, FWIW.

Comment 9 Josef Skladanka 2014-08-20 16:50:36 UTC
Discussed in 2014-08-20 Blocker Review Meeting [1].

(06:47:45 PM) sgallagh: This should be fixed now.
(06:48:03 PM) sgallagh: It worked in local tests and was part of the compose run last night
(06:48:22 PM) sgallagh: I'm waiting to test the results on the official compose before marking it VERIFIED, but it's believed to be resolved.

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2013-08-20/

Comment 10 Adam Williamson 2014-08-27 17:37:11 UTC
Discussed at 2014-08-27 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2014-08-27/f21-blocker-review.2014-08-27-15.59.log.txt . This is still expected to be fixed, but sgallagh ran into some other bugs when trying to verify this. He will continue to do so and close the bug if he can confirm it is fixed.

Comment 11 Stephen Gallagher 2014-08-27 18:48:32 UTC
I can verify that the presets are honored on Fedora Server 21 Alpha TC4.

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