cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject [4/4] git commit: updated refs/heads/master to 164e3e3
Date Tue, 24 Sep 2013 07:57:26 GMT
CLOUDSTACK-4405: change rpm and debian packaging to support automatic update (KVM upgrade)

Including following steps:
b. Run "cloudstack-agent-upgrade". This script will upgrade all the existing bridge name to
new bridge name, and update related firewall rules.
c. install a libvirt hook:
    c1. mkdir /etc/libvirt/hooks
    c2. cp /usr/share/cloudstack-agent/lib/libvirtqemuhook /etc/libvirt/hooks/qemu
    c3. chmod +x /etc/libvirt/hooks/qemu
    c4. service libvirtd restart
(cherry picked from commit a0988780ad88bb56becb0a13efedcd79c1bee142)

Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/164e3e33
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/164e3e33
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/164e3e33

Branch: refs/heads/master
Commit: 164e3e33b414861d4c49457df66dbd7a73830303
Parents: 258118e
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Tue Sep 24 09:14:15 2013 +0200
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Tue Sep 24 09:55:35 2013 +0200

----------------------------------------------------------------------
 debian/cloudstack-agent.postinst | 10 +++++++++-
 debian/rules                     |  2 ++
 packaging/centos63/cloud.spec    |  7 +++++++
 3 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/164e3e33/debian/cloudstack-agent.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-agent.postinst b/debian/cloudstack-agent.postinst
index 499ae6a..9bad138 100644
--- a/debian/cloudstack-agent.postinst
+++ b/debian/cloudstack-agent.postinst
@@ -34,7 +34,15 @@ case "$1" in
                 fi
             done
         fi
+
+        # Running cloudstack-agent-upgrade to update bridge name for upgrade from CloudStack
4.0.x (and before) to CloudStack 4.1 (and later)
+        /usr/bin/cloudstack-agent-upgrade
+        if [ ! -d "/etc/libvirt/hooks" ] ; then
+            mkdir /etc/libvirt/hooks
+        fi
+        cp -a /usr/share/cloudstack-agent/lib/libvirtqemuhook /etc/libvirt/hooks/qemu
+        /etc/init.d/libvirt-bin restart
         ;;
 esac
 
-exit 0
\ No newline at end of file
+exit 0

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/164e3e33/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index 5e3d58c..26a3495 100755
--- a/debian/rules
+++ b/debian/rules
@@ -71,6 +71,8 @@ install:
 	install -D packaging/debian/init/cloud-agent $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-agent
 	install -D agent/target/transformed/cloud-setup-agent $(DESTDIR)/usr/bin/cloudstack-setup-agent
 	install -D agent/target/transformed/cloud-ssh $(DESTDIR)/usr/bin/cloudstack-ssh
+	install -D agent/target/transformed/cloudstack-agent-upgrade $(DESTDIR)/usr/bin/cloudstack-setup-agent
+	install -D agent/target/transformed/libvirtqemuhook $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 	install -D agent/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
 
 	# cloudstack-management

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/164e3e33/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 90ebe4b..40c983c 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -463,6 +463,13 @@ fi
 
 %post agent
 if [ "$1" == "1" ] ; then
+    echo "Running %{_bindir}/%{name}-agent-upgrade to update bridge name for upgrade from
CloudStack 4.0.x (and before) to CloudStack 4.1 (and later)"
+    %{_bindir}/%{name}-agent-upgrade
+    if [ ! -d %{_sysconfdir}/libvirt/hooks ] ; then
+        mkdir %{_sysconfdir}/libvirt/hooks
+    fi
+    cp -a ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib/libvirtqemuhook %{_sysconfdir}/libvirt/hooks/qemu
+    /sbin/service libvirtd restart
     /sbin/chkconfig --add cloudstack-agent > /dev/null 2>&1 || true
     /sbin/chkconfig --level 345 cloudstack-agent on > /dev/null 2>&1 || true
 fi


Mime
View raw message