[libvirt] [PATCH 0/3] Drop Upstart support

Andrea Bolognani (3): travis: Use 'redhat' init script on CentOS 7 Drop Upstart support news: Document Upstart support being dropped .travis.yml | 2 +- docs/news.xml | 11 +++++++++ m4/virt-init-script.m4 | 7 +----- src/Makefile.am | 29 ----------------------- src/remote/Makefile.inc.am | 2 -- src/remote/libvirtd.upstart | 47 ------------------------------------- 6 files changed, 13 insertions(+), 85 deletions(-) delete mode 100644 src/remote/libvirtd.upstart -- 2.20.1

We're gonna drop Upstart support soon, and we don't want Travis CI builds to break when we do. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 55ba340a34..e80f1d367f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: - docker env: - IMAGE="centos-7" - - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart" + - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=redhat" - DOCKER_CMD="$LINUX_CMD" - services: - docker -- 2.20.1

On Thu, Mar 14, 2019 at 12:31:08PM +0100, Andrea Bolognani wrote:
We're gonna drop Upstart support soon, and we don't want Travis CI builds to break when we do.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml index 55ba340a34..e80f1d367f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: - docker env: - IMAGE="centos-7" - - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart" + - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=redhat"
Heh, this was always kind of wrong since RHEL 6 was the one with upstart Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, Mar 15, 2019 at 10:23:52AM +0000, Daniel P. Berrangé wrote:
On Thu, Mar 14, 2019 at 12:31:08PM +0100, Andrea Bolognani wrote:
We're gonna drop Upstart support soon, and we don't want Travis CI builds to break when we do.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml index 55ba340a34..e80f1d367f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: - docker env: - IMAGE="centos-7" - - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart" + - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=redhat"
Heh, this was always kind of wrong since RHEL 6 was the one with upstart
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Actually on second thoughts, this is not desirable. We should be actually purging the traditional init script too. RHEL-7 is systemd based and so are all Fedora's. The "redhat" initscript was last used in RHEL-6. Even if other distros use classis sysvinit I don't think they'll use the Red Hat variant initscript. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, 2019-03-15 at 10:26 +0000, Daniel P. Berrangé wrote:
On Fri, Mar 15, 2019 at 10:23:52AM +0000, Daniel P. Berrangé wrote:
On Thu, Mar 14, 2019 at 12:31:08PM +0100, Andrea Bolognani wrote:
env: - IMAGE="centos-7" - - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart" + - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=redhat"
Heh, this was always kind of wrong since RHEL 6 was the one with upstart
True, but the argument IIRC was that we would get coverage for that code path regardless of what distribution we'd run it on... It's not like we actually test whether init can bring up libvirtd and friends in our 'make check' anyway :)
Actually on second thoughts, this is not desirable.
We should be actually purging the traditional init script too. RHEL-7 is systemd based and so are all Fedora's. The "redhat" initscript was last used in RHEL-6. Even if other distros use classis sysvinit I don't think they'll use the Red Hat variant initscript.
Yeah, I was thinking about that yesterday too... Honestly I just didn't spend time checking whether the "redhat" init scripts actually have anything RHEL-specific or they would work on other SysV-init based distribution, so I decided to go only for the obvious low-hanging fruit at first. So if you're okay with that I'll merge the series as-is for now, and see whether the "redhat" init script can be safely dropped in a follow-up series. -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Mar 15, 2019 at 11:48:43AM +0100, Andrea Bolognani wrote:
On Fri, 2019-03-15 at 10:26 +0000, Daniel P. Berrangé wrote:
On Fri, Mar 15, 2019 at 10:23:52AM +0000, Daniel P. Berrangé wrote:
On Thu, Mar 14, 2019 at 12:31:08PM +0100, Andrea Bolognani wrote:
env: - IMAGE="centos-7" - - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart" + - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=redhat"
Heh, this was always kind of wrong since RHEL 6 was the one with upstart
True, but the argument IIRC was that we would get coverage for that code path regardless of what distribution we'd run it on... It's not like we actually test whether init can bring up libvirtd and friends in our 'make check' anyway :)
Actually on second thoughts, this is not desirable.
We should be actually purging the traditional init script too. RHEL-7 is systemd based and so are all Fedora's. The "redhat" initscript was last used in RHEL-6. Even if other distros use classis sysvinit I don't think they'll use the Red Hat variant initscript.
Yeah, I was thinking about that yesterday too...
Honestly I just didn't spend time checking whether the "redhat" init scripts actually have anything RHEL-specific or they would work on other SysV-init based distribution, so I decided to go only for the obvious low-hanging fruit at first.
IME the only thing common about sysvinit scripts is that they're all written in shell and all buggy. I would just kill it as the name we gave it always indicated it was only for redhat distro variants. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Not a single one of the platforms we target still uses Upstart, and the Upstart project itself has been abandoned for several years now. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- m4/virt-init-script.m4 | 7 +----- src/Makefile.am | 29 ----------------------- src/remote/Makefile.inc.am | 2 -- src/remote/libvirtd.upstart | 47 ------------------------------------- 4 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 src/remote/libvirtd.upstart diff --git a/m4/virt-init-script.m4 b/m4/virt-init-script.m4 index 757fd10541..7094e29f46 100644 --- a/m4/virt-init-script.m4 +++ b/m4/virt-init-script.m4 @@ -20,7 +20,7 @@ dnl AC_DEFUN([LIBVIRT_ARG_INIT_SCRIPT],[ LIBVIRT_ARG_WITH([INIT_SCRIPT], [Style of init script to install: redhat, systemd, - systemd+redhat, upstart, check, none], [check]) + systemd+redhat, check, none], [check]) ]) AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[ @@ -28,7 +28,6 @@ AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[ init_redhat=no init_systemd=no - init_upstart=no if test "$with_init_script" = check && test "$cross_compiling" = yes; then with_init_script=none @@ -51,9 +50,6 @@ AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[ [systemd],[ init_systemd=yes ], - [upstart],[ - init_upstart=yes - ], [redhat],[ init_redhat=yes ], @@ -64,7 +60,6 @@ AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[ ) AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_RED_HAT], test "$init_redhat" = "yes") - AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_UPSTART], test "$init_upstart" = "yes") AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_SYSTEMD], test "$init_systemd" = "yes") AC_MSG_RESULT($with_init_script) diff --git a/src/Makefile.am b/src/Makefile.am index 4294bd1c6c..6c49493f17 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -86,7 +86,6 @@ PODFILES = MANINFILES = SYSTEMD_UNIT_FILES_IN = SYSVINIT_FILES_IN = -UPSTART_FILES = SYSCONF_FILES = sbin_PROGRAMS = man8_MANS = @@ -873,34 +872,6 @@ endif LIBVIRT_INIT_SCRIPT_SYSTEMD endif WITH_LIBVIRTD -EXTRA_DIST += $(UPSTART_FILES) - -if WITH_LIBVIRTD -if LIBVIRT_INIT_SCRIPT_UPSTART - -install-upstart: install-sysconfig - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d - for f in $(UPSTART_FILES:%.upstart=%); \ - do \ - tgt=`basename $$f` ; \ - $(INSTALL_SCRIPT) $(srcdir)/$$f.upstart \ - $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \ - done - -uninstall-upstart: uninstall-sysconfig - for f in $(UPSTART_FILES:%.upstart=%); \ - do \ - tgt=`basename $$f` ; \ - rm -f $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \ - done - rmdir $(DESTDIR)$(sysconfdir)/event.d || : - -INSTALL_DATA_LOCAL += install-upstart -UNINSTALL_LOCAL += uninstall-upstart -endif LIBVIRT_INIT_SCRIPT_UPSTART -endif WITH_LIBVIRTD - - EXTRA_DIST += dtrace2systemtap.pl diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 3d0ff29548..0ff67d2029 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -54,8 +54,6 @@ SYSTEMD_UNIT_FILES_IN += \ remote/virt-guest-shutdown.target.in \ $(NULL) -UPSTART_FILES += remote/libvirtd.upstart - REMOTE_PROTOCOL = $(srcdir)/remote/remote_protocol.x LXC_PROTOCOL = $(srcdir)/remote/lxc_protocol.x QEMU_PROTOCOL = $(srcdir)/remote/qemu_protocol.x diff --git a/src/remote/libvirtd.upstart b/src/remote/libvirtd.upstart deleted file mode 100644 index e620f41450..0000000000 --- a/src/remote/libvirtd.upstart +++ /dev/null @@ -1,47 +0,0 @@ -# libvirtd upstart job -# -# XXX wait for rc to get all dependent initscripts started -# from sysv libvirtd initscript: Required-Start: $network messagebus -start on stopped rc RUNLEVEL=[345] -stop on runlevel [!345] - -respawn - -script - LIBVIRTD_CONFIG= - LIBVIRTD_ARGS= - KRB5_KTNAME=/etc/libvirt/krb5.tab - - if [ -f /etc/sysconfig/libvirtd ]; then - . /etc/sysconfig/libvirtd - fi - - export QEMU_AUDIO_DRV - export SDL_AUDIODRIVER - export KRB5_KTNAME - - LIBVIRTD_CONFIG_ARGS= - if [ -n "$LIBVIRTD_CONFIG" ]; then - LIBVIRTD_CONFIG_ARGS="--config $LIBVIRTD_CONFIG" - fi - - # DAEMON_COREFILE_LIMIT from /etc/sysconfig/libvirtd is not handled - # automatically - if [ -n "$DAEMON_COREFILE_LIMIT" ]; then - ulimit -c "$DAEMON_COREFILE_LIMIT" - fi - - # LIBVIRTD_NOFILES_LIMIT from /etc/sysconfig/libvirtd is not handled - # automatically - if [ -n "$LIBVIRTD_NOFILES_LIMIT" ]; then - ulimit -n "$LIBVIRTD_NOFILES_LIMIT" - fi - mkdir -p /var/cache/libvirt - rm -rf /var/cache/libvirt/* - - exec /usr/sbin/libvirtd $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS -end script - -post-stop script - rm -rf /var/cache/libvirt/* -end script -- 2.20.1

On Thu, Mar 14, 2019 at 12:31:09PM +0100, Andrea Bolognani wrote:
Not a single one of the platforms we target still uses Upstart, and the Upstart project itself has been abandoned for several years now.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- m4/virt-init-script.m4 | 7 +----- src/Makefile.am | 29 ----------------------- src/remote/Makefile.inc.am | 2 -- src/remote/libvirtd.upstart | 47 ------------------------------------- 4 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 src/remote/libvirtd.upstart
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 896700fa97..5c15940178 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -83,6 +83,17 @@ </description> </change> </section> + <section title="Removed features"> + <change> + <summary> + Drop Upstart support + </summary> + <description> + Not a single one of the platforms we target still uses Upstart, and + the Upstart project itself has been abandoned for several years now. + </description> + </change> + </section> <section title="Improvements"> </section> <section title="Bug fixes"> -- 2.20.1

On Thu, Mar 14, 2019 at 12:31:10PM +0100, Andrea Bolognani wrote:
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrangé