[libvirt] [PATCH] fix LSB part of virtlogd runlevel script

Currently pkg build of master branch fails: [ 300s] + /usr/lib/rpm/brp-boot-scripts [ 300s] E: File `virtlogd' is missing `Required-Start', please add even if empty! [ 300s] W: File `virtlogd' is missing `Required-Stop', please add even if empty! [ 300s] E: File `virtlogd' has empty `Default-Start', please specify default runlevel(s)! [ 300s] ERROR: found one or more broken init or boot scripts, please fix them. [ 300s] For more information about LSB headers please read the manual [ 300s] page of of insserv by executing the command `man 8 insserv'. [ 300s] If you don't understand this, mailto=werner@suse.de [ 300s] error: Bad exit status from /var/tmp/rpm-tmp.44965 (%install) Add the required tags, fix the existing tags. Use soft dependency "Should-Start" because virtlogd may work without network. Signed-off-by: Olaf Hering <olaf@aepfle.de> --- src/logging/virtlogd.init.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/logging/virtlogd.init.in b/src/logging/virtlogd.init.in index 1408236..cc03615 100644 --- a/src/logging/virtlogd.init.in +++ b/src/logging/virtlogd.init.in @@ -5,8 +5,12 @@ # ### BEGIN INIT INFO # Provides: virtlogd -# Default-Start: -# Default-Stop: 0 1 2 3 4 5 6 +# Default-Start: 3 5 +# Required-Start: +# Required-Stop: +# Should-Start: $network $remote_fs +# Should-Stop $network $remote_fs: +# Default-Stop: 0 1 2 4 6 # Short-Description: virtual machine log manager # Description: This is a daemon for managing logs # of virtual machine consoles

On Tue, Dec 01, 2015 at 02:09:59PM +0000, Olaf Hering wrote:
Currently pkg build of master branch fails:
[ 300s] + /usr/lib/rpm/brp-boot-scripts [ 300s] E: File `virtlogd' is missing `Required-Start', please add even if empty! [ 300s] W: File `virtlogd' is missing `Required-Stop', please add even if empty! [ 300s] E: File `virtlogd' has empty `Default-Start', please specify default runlevel(s)! [ 300s] ERROR: found one or more broken init or boot scripts, please fix them. [ 300s] For more information about LSB headers please read the manual [ 300s] page of of insserv by executing the command `man 8 insserv'. [ 300s] If you don't understand this, mailto=werner@suse.de [ 300s] error: Bad exit status from /var/tmp/rpm-tmp.44965 (%install)
Add the required tags, fix the existing tags. Use soft dependency "Should-Start" because virtlogd may work without network.
It must work without network, but it doesn't even have to be started after network, so there is not even a weak dependency, IMO.
Signed-off-by: Olaf Hering <olaf@aepfle.de> --- src/logging/virtlogd.init.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/logging/virtlogd.init.in b/src/logging/virtlogd.init.in index 1408236..cc03615 100644 --- a/src/logging/virtlogd.init.in +++ b/src/logging/virtlogd.init.in @@ -5,8 +5,12 @@ #
There's an invalid link in the header, it should be linked here: http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-gene...
### BEGIN INIT INFO # Provides: virtlogd -# Default-Start: -# Default-Stop: 0 1 2 3 4 5 6 +# Default-Start: 3 5 +# Required-Start: +# Required-Stop: +# Should-Start: $network $remote_fs +# Should-Stop $network $remote_fs:
the colon should not be at the end, but rather after the keyword. And as I said, network should not be here. But seeing this patch, we should also fix other init scripts, I believe. I, personally, see only the same problem in src/locking/virtlockd.init.in, but I didn't use the script you used.
+# Default-Stop: 0 1 2 4 6 # Short-Description: virtual machine log manager # Description: This is a daemon for managing logs # of virtual machine consoles
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Wed, Dec 02, Martin Kletzander wrote:
It must work without network, but it doesn't even have to be started after network, so there is not even a weak dependency, IMO.
Depending on how the daemon works (which I dont know) it may log to remote filesystems. So I think its safe to start it after remote_fs, if the local admin has configured its system that way.
+# Should-Stop $network $remote_fs:
the colon should not be at the end, but rather after the keyword. And
I noticed that, appearently I made a mistake during refresh. Thanks for spotting. Will resend. Olaf

On Wed, Dec 02, Martin Kletzander wrote:
But seeing this patch, we should also fix other init scripts, I believe. I, personally, see only the same problem in src/locking/virtlockd.init.in, but I didn't use the script you used.
virtlockd.init happens to work for me because there is a local patch which fixes its shortcomings. I noticed this patch just now. There are other bugs in sysv scripts. xen has --with-initddir and other knobs to make its source not RedHat-only. If I find the time I can port these knobs to libvirt, if anyone actually cares. Olaf

On Wed, Dec 02, 2015 at 08:52:28AM +0100, Olaf Hering wrote:
On Wed, Dec 02, Martin Kletzander wrote:
But seeing this patch, we should also fix other init scripts, I believe. I, personally, see only the same problem in src/locking/virtlockd.init.in, but I didn't use the script you used.
virtlockd.init happens to work for me because there is a local patch which fixes its shortcomings. I noticed this patch just now.
Feel free to contribute the patches as well if you can. We would love to have such things fixed, which would also fix it for others without the need for some patches downstream needed to be applied (that's big part of the openness ;) )
There are other bugs in sysv scripts. xen has --with-initddir and other knobs to make its source not RedHat-only. If I find the time I can port these knobs to libvirt, if anyone actually cares.
That would be wonderful to have fixes for those that are libvirt-related (to my knowledge libvirt-guests, libvirtd, virtlockd and lately virtlogd). Of course we care about that. For other projects that is to be discussed on their respective mailing-lists (or whatever way of communication channel they tend to use). Thank you for the time and the patches, I'm looking forward to those. Martin
participants (2)
-
Martin Kletzander
-
Olaf Hering