service_create: invert order for systemctl
Let's run daemon-reload before trying to enable the services, to make sure systemd knows about the new unit file. Change-Id: I9962c9ffa558f443f90c422ec811dc00f9d116a3
This commit is contained in:
parent
aa42360b85
commit
0746273753
|
@ -41,8 +41,8 @@ class TestUtilsSystemd(base.TestCase):
|
|||
mock_chmod.assert_has_calls([mock.call(sysd_unit_f, 420)])
|
||||
|
||||
mock_subprocess_call.assert_has_calls([
|
||||
mock.call(['systemctl', 'enable', '--now', service]),
|
||||
mock.call(['systemctl', 'daemon-reload']),
|
||||
mock.call(['systemctl', 'enable', '--now', service]),
|
||||
])
|
||||
|
||||
os.rmdir(tempdir)
|
||||
|
|
|
@ -78,8 +78,8 @@ ExecStop=/usr/bin/podman stop -t %(stop_grace_period)s %(name)s
|
|||
KillMode=process
|
||||
[Install]
|
||||
WantedBy=multi-user.target""" % s_config)
|
||||
subprocess.call(['systemctl', 'enable', '--now', service])
|
||||
subprocess.call(['systemctl', 'daemon-reload'])
|
||||
subprocess.call(['systemctl', 'enable', '--now', service])
|
||||
|
||||
|
||||
def service_delete(container, log=None):
|
||||
|
|
Loading…
Reference in New Issue