Hide Forgot
Description of problem: It looks like for some services, the unit status isn't checked before attempting to enable it. The error causes the install to abort, even though the listed units are in the desired state Version-Release number of selected component (if applicable):ovirt-engine-4.0.3-1.el7.centos.noarch How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: 2016-09-01 16:11:05 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'enable', u'ovirt-fence-kdump-listener.service') stderr: 2016-09-01 16:11:05 DEBUG otopi.context context._executeMethod:128 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.engine.Plugin._closeup 2016-09-01 16:11:05 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.system.engine engine._closeup:53 Starting engine service 2016-09-01 16:11:05 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service ovirt-engine 2016-09-01 16:11:05 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'start', 'ovirt-engine.service'), executable='None', cwd='None', env=None 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'start', 'ovirt-engine.service'), rc=0 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'start', 'ovirt-engine.service') stdout: 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'start', 'ovirt-engine.service') stderr: 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-engine startup to True 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service'), executable='None', cwd='None', env=None 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service'), rc=0 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service') stdout: Id=ovirt-engine.service 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service') stderr: 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'enable', u'ovirt-engine.service'), executable='None', cwd='None', env=None 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'enable', u'ovirt-engine.service'), rc=1 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'enable', u'ovirt-engine.service') stdout: 2016-09-01 16:11:08 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'enable', u'ovirt-engine.service') stderr: Failed to execute operation: File exists 2016-09-01 16:11:08 DEBUG otopi.context context._executeMethod:142 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/system/engine.py", line 60, in _closeup state=True, File "/usr/share/otopi/plugins/otopi/services/systemd.py", line 122, in startup service=name, RuntimeError: Failed to enable service 'ovirt-engine' 2016-09-01 16:11:08 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Closing up': Failed to enable service 'ovirt-engine' 2016-09-01 16:11:08 DEBUG otopi.context context.dumpEnvironment:760 ENVIRONMENT DUMP - BEGIN 2016-09-01 16:11:08 DEBUG otopi.context context.dumpEnvironment:770 ENV BASE/error=bool:'True' 2016-09-01 16:11:08 DEBUG otopi.context context.dumpEnvironment:770 ENV BASE/exceptionInfo=list:'[(<type 'exceptions.RuntimeError'>, RuntimeError("Failed to enable service 'ovirt-engine'",), <traceback object at 0x3b5a4d0>)]' 2016-09-01 16:11:08 DEBUG otopi.context context.dumpEnvironment:774 ENVIRONMENT DUMP - END Expected results: Additional info:
Seems like [1]. Now reproduced this on a fedora 24 machine: # systemctl enable ovirt-engine Created symlink from /etc/systemd/system/multi-user.target.wants/ovirt-engine.service to /usr/lib/systemd/system/ovirt-engine.service. [root@didi-f19-engine ~]# echo $? 0 [root@didi-f19-engine ~]# systemctl enable ovirt-engine [root@didi-f19-engine ~]# echo $? 0 # ls -l /etc/systemd/system/multi-user.target.wants/ovirt-engine.service lrwxrwxrwx. 1 root root 44 Sep 4 08:41 /etc/systemd/system/multi-user.target.wants/ovirt-engine.service -> /usr/lib/systemd/system/ovirt-engine.service # systemctl disable ovirt-engine Removed symlink /etc/systemd/system/multi-user.target.wants/ovirt-engine.service. # ln -s /lib/systemd/system/ovirt-engine.service /etc/systemd/system/multi-user.target.wants/ovirt-engine.service # systemctl enable ovirt-engine Failed to execute operation: File exists Here starts a workaround, which seems to work: # systemctl disable ovirt-engine Removed symlink /etc/systemd/system/multi-user.target.wants/ovirt-engine.service. # systemctl enable ovirt-engine Created symlink from /etc/systemd/system/multi-user.target.wants/ovirt-engine.service to /usr/lib/systemd/system/ovirt-engine.service. Can you please check? Post the output of these commands: ls -l /etc/systemd/system/multi-user.target.wants/ovirt-engine.service systemctl disable ovirt-engine systemctl enable ovirt-engine Thanks. [1] https://bugs.freedesktop.org/show_bug.cgi?id=90277
I manually ran the disable/enable earlier in order to get the system back up. # ls -l /etc/systemd/system/multi-user.target.wants/ovirt-engine.service lrwxrwxrwx. 1 root root 40 Sep 1 17:13 /etc/systemd/system/multi-user.target.wants/ovirt-engine.service -> /etc/systemd/system/ovirt-engine.service # systemctl disable ovirt-engine Removed symlink /etc/systemd/system/multi-user.target.wants/ovirt-engine.service. # systemctl enable ovirt-engine Created symlink from /etc/systemd/system/multi-user.target.wants/ovirt-engine.service to /etc/systemd/system/ovirt-engine.service. The linked item does appear to be my exact issue.
Ok, thanks for the report! Sandro - do we want to do anything? Always disable before enable? Only enable if not already enabled? Setting priority/severity low as it seems to affect only upgrades from fedora < 17 [1]. Also might be fixed eventually if/when systemd fixes it. [1] https://fedoraproject.org/wiki/Features/UsrMove
It does also impact EL7 systems, but low priority makes sense to me.
This is a bug in the upgrade process of the OS we can't address. The bug: https://bugs.freedesktop.org/show_bug.cgi?id=90277 Will fix the issue.