systemctl "enable" doesn't work on symlinked units

Bug #1330937 reported by Sergey Gotliv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Sergey Gotliv

Bug Description

I am trying to create mysql database using my Fedora 20 image but I fail to enable mysql on boot.

2014-06-17 05:15:06.110 521 TRACE trove.openstack.common.rpc.amqp ProcessExecutionError: Unexpected error while running command.
2014-06-17 05:15:06.110 521 TRACE trove.openstack.common.rpc.amqp Command: sudo systemctl enable mysqld
2014-06-17 05:15:06.110 521 TRACE trove.openstack.common.rpc.amqp Exit code: 1
2014-06-17 05:15:06.110 521 TRACE trove.openstack.common.rpc.amqp Stdout: ''
2014-06-17 05:15:06.110 521 TRACE trove.openstack.common.rpc.amqp Stderr: 'Failed to issue method call: No such file or directory\n'

The reason for that problem is that mysql on Fedora 20 is actually mariadb and /usr/lib/systemd/system/mysqld.service is a symbolic link to /usr/lib/systemd/system/mariadb.service and currently systemctl limitation is that it's "enable" doesn't work on symlinked inits, see this bug:

https://bugzilla.redhat.com/1014311

start and stop do work for symlinks.

Sergey Gotliv (sgotliv)
Changed in trove:
assignee: nobody → Sergey Gotliv (sgotliv)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/100504

Changed in trove:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/100504
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=3482d5f4e6175e9e99e78eeaef6eeb730d6c239a
Submitter: Jenkins
Branch: master

commit 3482d5f4e6175e9e99e78eeaef6eeb730d6c239a
Author: Sergey Gotliv <email address hidden>
Date: Tue Jun 17 14:30:55 2014 +0300

    Fix enable on boot when working with systemd and symlinked units

    mysql on Fedora20 is actually mariadb and /usr/lib/systemd/system/mysqld.service
    is a symbolic link to /usr/lib/systemd/system/mariadb.service. systemctl "enable"
    doesn't work on symlinked inits like described in:

    https://bugzilla.redhat.com/1014311

    So in order to enable mysqld service properly in this case we need to
    replace a service name with the real path to service file.

    Closes-Bug: #1330937
    Change-Id: Id823b3e377c4d0d5f1e5452fad9826232bc1f904

Changed in trove:
status: In Progress → Fix Committed
Changed in trove:
importance: Undecided → High
milestone: none → juno-2
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.