[Bug 1038401] New: libvirt: Usage of systemctrl enable should be changed to %sytemd_add_pre/post
http://bugzilla.suse.com/show_bug.cgi?id=1038401 Bug ID: 1038401 Summary: libvirt: Usage of systemctrl enable should be changed to %sytemd_add_pre/post Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: jfehlig@suse.com Reporter: behlert@suse.com QA Contact: qa-bugs@suse.de CC: aginies@suse.com Found By: --- Blocker: --- "systemctl preset-all" is intended to return service states to a factory state based on presets. But currently we can see breakages in some products due to services that are not following the guidelines as described in https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines#Enabling_syste... The package libvirt was identified to use "systemctl enable" in its spec-file, and it should get replaced by the proper use of %sytemd_add_pre/post and preset. Please check your package, thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038401 Stefan Behlert <behlert@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://fate.suse.com/32214 | |0 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038401 Stefan Behlert <behlert@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1038402 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038401 http://bugzilla.suse.com/show_bug.cgi?id=1038401#c1 James Fehlig <jfehlig@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |behlert@suse.com, | |mlatimer@suse.com Flags| |needinfo?(behlert@suse.com) --- Comment #1 from James Fehlig <jfehlig@suse.com> --- (In reply to Stefan Behlert from comment #0)
But currently we can see breakages in some products due to services that are not following the guidelines as described in
https://en.opensuse.org/openSUSE: Systemd_packaging_guidelines#Enabling_systemd_unit_files
Those guidelines only talk about the simple scenario of enabling a single service.
The package libvirt
was identified to use "systemctl enable" in its spec-file, and it should get replaced by the proper use of %sytemd_add_pre/post and preset.
libvirt does use %service_add_{pre,post}, %service_del_{preun,postun}, etc.
Please check your package, thanks.
The only use of 'systemctl enable' in libvirt.spec is to handle an upgrade scenario. From Factory libvirt.spec: # In upgrade scenario we must explicitly enable virtlockd/virtlogd # sockets, if libvirtd is already enabled and start them if # libvirtd is running, otherwise you'll get failures to start # guests %triggerpostun daemon -- libvirt-daemon < 1.3.0 if [ $1 -ge 1 ] ; then %if %{with_systemd} /usr/bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && /usr/bin/systemctl enable virtlogd.socket || : /usr/bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && /usr/bin/systemctl start virtlogd.socket || : %else /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && /sbin/chkconfig virtlogd on || : /sbin/service libvirtd status 1>/dev/null 2>&1 && /sbin/service virtlogd start || : %endif fi I don't really see how to replace this logic with '%service_*' macros. Suggestions or references for further reading are welcome. Thanks! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038401 http://bugzilla.suse.com/show_bug.cgi?id=1038401#c2 --- Comment #2 from James Fehlig <jfehlig@suse.com> --- BTW, one option is to simply remove the upgrade logic. The logic is needed when upgrading libvirt from < 1.3.0, where virtlogd did not exist. So for example the logic is executed when upgrading Leap 42.1 -> Leap42.2, or SLE12 SP1 -> SLE12 SP2. Upgrading an old libvirt < 1.3.0 with current 3.3.0 Factory package is unlikely, so it is probably safe to remove it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038401 http://bugzilla.suse.com/show_bug.cgi?id=1038401#c3 Jonathan Kang <sckang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sckang@suse.com --- Comment #3 from Jonathan Kang <sckang@suse.com> --- Why does this bug block bug#1038402? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038401 http://bugzilla.suse.com/show_bug.cgi?id=1038401#c4 James Fehlig <jfehlig@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Flags|needinfo?(behlert@suse.com) | --- Comment #4 from James Fehlig <jfehlig@suse.com> --- I took the option described in #2 and simply removed the upgrade logic in libvirt.spec. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038401 http://bugzilla.suse.com/show_bug.cgi?id=1038401#c6 --- Comment #6 from Bernhard Wiedemann <bwiedemann@suse.com> --- This is an autogenerated message for OBS integration: This bug (1038401) was mentioned in https://build.opensuse.org/request/show/547322 Factory / libvirt -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com