mirror of https://github.com/apache/cloudstack.git
kvm: use libvirtd as service name for all distributions (#2925)
Since we support only Ubuntu 16.04+ on master/4.12+, we can now use the libvirt service name `libvirtd` for all distributions. This also fixes an optional package name for libvirtd installation on Debian 9+. Fixes #2909 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
bfc326384d
commit
8738ca75b1
|
|
@ -22,7 +22,7 @@ Description: CloudStack server library
|
|||
|
||||
Package: cloudstack-agent
|
||||
Architecture: all
|
||||
Depends: ${python:Depends}, openjdk-8-jre-headless | java8-runtime-headless | java8-runtime | openjdk-9-jre-headless, cloudstack-common (= ${source:Version}), lsb-base (>= 9), libcommons-daemon-java, openssh-client, qemu-kvm (>= 2.5), libvirt-bin (>= 1.3), uuid-runtime, iproute2, ebtables, vlan, ipset, python-libvirt, ethtool, iptables, lsb-release, aria2
|
||||
Depends: ${python:Depends}, openjdk-8-jre-headless | java8-runtime-headless | java8-runtime | openjdk-9-jre-headless, cloudstack-common (= ${source:Version}), lsb-base (>= 9), libcommons-daemon-java, openssh-client, qemu-kvm (>= 2.5), libvirt-bin (>= 1.3) | libvirt-daemon-system (>= 3.0), uuid-runtime, iproute2, ebtables, vlan, ipset, python-libvirt, ethtool, iptables, lsb-release, aria2
|
||||
Recommends: init-system-helpers
|
||||
Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, cloud-agent-scripts
|
||||
Description: CloudStack agent
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@ override_dh_auto_install:
|
|||
install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
|
||||
|
||||
install -d -m0755 debian/$(PACKAGE)-agent/lib/systemd/system
|
||||
# Fix libvirt service name for Debian/Ubuntu
|
||||
sed -i 's/Requires=libvirtd.service/Requires=libvirt-bin.service/g' packaging/systemd/$(PACKAGE)-agent.service
|
||||
sed -i 's/After=libvirtd.service/After=libvirt-bin.service/g' packaging/systemd/$(PACKAGE)-agent.service
|
||||
install -m0644 packaging/systemd/$(PACKAGE)-agent.service debian/$(PACKAGE)-agent/lib/systemd/system/$(PACKAGE)-agent.service
|
||||
install -m0644 packaging/systemd/$(PACKAGE)-agent.default $(DESTDIR)/$(SYSCONFDIR)/default/$(PACKAGE)-agent
|
||||
|
||||
|
|
|
|||
|
|
@ -38,11 +38,7 @@ public final class LibvirtPostCertificateRenewalCommandWrapper extends CommandWr
|
|||
if (command != null) {
|
||||
final int timeout = 30000;
|
||||
Script script = new Script(true, "service", timeout, s_logger);
|
||||
if ("Ubuntu".equals(serverResource.getHostDistro())) {
|
||||
script.add("libvirt-bin");
|
||||
} else {
|
||||
script.add("libvirtd");
|
||||
}
|
||||
script.add("libvirtd");
|
||||
script.add("restart");
|
||||
script.execute();
|
||||
return new SetupCertificateAnswer(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue