cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: refs/heads/master - CLOUDSTACK-1736: Changes required to get cloudstack-management service working again.
Date Mon, 25 Mar 2013 17:23:41 GMT
Updated Branches:
  refs/heads/master 8eb3ebbe1 -> ae3a04835


CLOUDSTACK-1736: Changes required to get cloudstack-management service
working again.

The newly created package for cloudstack-management was not correctly
installing the service. This prevented cloud-setup-management from being
able to configure the service, and the init script didn't even believe
the service was installed. I also added sudo to the chmod command for
checking script permissions, as most scripts belong to root. It was
trying to configure the agent with cloudstack-setup-agent but the script
was still called cloud-setup-agent, so I renamed it to cloudstack-setup-agent.


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

Branch: refs/heads/master
Commit: ae3a04835096f3e2f8dd659a33ac46348e46b670
Parents: 8eb3ebb
Author: Brian Spindler <darnoth@gmail.com>
Authored: Mon Mar 25 07:47:30 2013 -0700
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Mon Mar 25 17:23:18 2013 +0000

----------------------------------------------------------------------
 debian/cloudstack-agent.install                    |    4 +-
 debian/cloudstack-management.install               |    2 +
 debian/cloudstack-management.postinst              |   19 +++++++++++++-
 debian/rules                                       |    9 ++++--
 packaging/debian/init/cloud-management             |    8 +++---
 packaging/debian/replace.properties                |    2 +-
 .../com/cloud/server/ConfigurationServerImpl.java  |    2 +-
 7 files changed, 33 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/cloudstack-agent.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-agent.install b/debian/cloudstack-agent.install
index b142571..0250185 100644
--- a/debian/cloudstack-agent.install
+++ b/debian/cloudstack-agent.install
@@ -19,8 +19,8 @@
 /etc/cloudstack/agent/environment.properties
 /etc/cloudstack/agent/log4j-cloud.xml
 /etc/init.d/cloudstack-agent
-/usr/bin/cloud-setup-agent
+/usr/bin/cloudstack-setup-agent
 /usr/bin/cloud-ssh
 /var/log/cloudstack/agent
 /usr/share/cloudstack-agent/lib/*
-/usr/share/cloudstack-agent/plugins
\ No newline at end of file
+/usr/share/cloudstack-agent/plugins

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/cloudstack-management.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.install b/debian/cloudstack-management.install
index cecc311..e80701d 100644
--- a/debian/cloudstack-management.install
+++ b/debian/cloudstack-management.install
@@ -31,3 +31,5 @@
 /usr/bin/cloud-setup-databases
 /usr/bin/cloud-migrate-databases
 /usr/share/cloudstack-management/*
+/usr/share/java/*
+/usr/share/tomcat6/lib/*

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/cloudstack-management.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst
index 7b6a1ed..4e9b046 100644
--- a/debian/cloudstack-management.postinst
+++ b/debian/cloudstack-management.postinst
@@ -22,5 +22,20 @@ if [ "$1" = configure ]; then
     else
         usermod -m -d /var/lib/cloudstack/management cloud
     fi
-    chown cloud /var/log/cloudstack/management
-fi
\ No newline at end of file
+
+    for i in /var/cache/cloudstack/management \
+        /var/cache/cloudstack/management/work \
+        /var/cache/cloudstack/management/temp \
+        /var/log/cloudstack/management \
+        /etc/cloudstack/management/Catalina \
+        /etc/cloudstack/management/Catalina/localhost \
+        /var/lib/cloudstack/management \
+        /etc/cloudstack/management/Catalina/localhost/client
+    do
+        chmod 0770 $i
+        chgrp cloud $i
+    done
+
+    chmod 0640 /etc/cloudstack/management/db.properties
+    chgrp cloud /etc/cloudstack/management/db.properties
+fi

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index 613d76a..3804d8d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -68,7 +68,7 @@ install:
 	install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION)-SNAPSHOT.jar
$(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 	install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 	install -D packaging/debian/init/cloud-agent $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-agent
-	install -D agent/bindir/cloud-setup-agent.in $(DESTDIR)/usr/bin/cloud-setup-agent
+	install -D agent/bindir/cloud-setup-agent.in $(DESTDIR)/usr/bin/cloudstack-setup-agent
 	install -D agent/bindir/cloud-ssh.in $(DESTDIR)/usr/bin/cloud-ssh
 	install -D agent/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
 
@@ -99,12 +99,15 @@ install:
 
 	ln -s tomcat6-nonssl.conf $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/tomcat6.conf
 	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/Catalina/localhost/client
+	mkdir -p ${DESTDIR}/usr/share/tomcat6/lib
+	mkdir -p ${DESTDIR}/usr/share/java
 	install -D packaging/debian/init/cloud-management $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-management
 	install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloud-update-xenserver-licenses
-	install -D server/target/cloud-server-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/$(PACKAGE)-server.jar
+	install -D server/target/cloud-server-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/java/$(PACKAGE)-server.jar
 	ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin
 	ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf
-	ln -s /usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
+	ln -s ../../../usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
+	ln -s ../../java/$(PACKAGE)-server.jar $(DESTDIR)/usr/share/tomcat6/lib/$(PACKAGE)-server.jar
 	ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs
 	ln -s ../../../var/cache/$(PACKAGE)/management/temp $(DESTDIR)/usr/share/$(PACKAGE)-management/temp
 	ln -s ../../../var/cache/$(PACKAGE)/management/work $(DESTDIR)/usr/share/$(PACKAGE)-management/work

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/packaging/debian/init/cloud-management
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management
index 490bf1e..69a0428 100755
--- a/packaging/debian/init/cloud-management
+++ b/packaging/debian/init/cloud-management
@@ -31,11 +31,11 @@
 ### END INIT INFO
 
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
-NAME=cloud-management
+NAME=cloudstack-management
 DESC="CloudStack-specific Tomcat servlet engine"
 DAEMON=/usr/bin/jsvc
-CATALINA_HOME=/usr/share/cloud/management
-DEFAULT=/etc/cloud/management/tomcat6.conf
+CATALINA_HOME=/usr/share/cloudstack/management
+DEFAULT=/etc/cloudstack/management/tomcat6.conf
 JVM_TMP=/tmp/$NAME-temp
 
 # We have to explicitly set the HOME variable to the homedir from the user "cloud"
@@ -76,7 +76,7 @@ done
 export JAVA_HOME
 
 # Directory for per-instance configuration files and webapps
-CATALINA_BASE=/usr/share/cloud/management
+CATALINA_BASE=/usr/share/cloudstack/management
 
 # Use the Java security manager? (yes/no)
 TOMCAT6_SECURITY=no

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/packaging/debian/replace.properties
----------------------------------------------------------------------
diff --git a/packaging/debian/replace.properties b/packaging/debian/replace.properties
index fee1def..8705c78 100644
--- a/packaging/debian/replace.properties
+++ b/packaging/debian/replace.properties
@@ -59,4 +59,4 @@ SYSTEMJARS=
 USAGECLASSPATH=
 USAGELOG=/var/log/cloudstack/usage
 USAGESYSCONFDIR=/etc/cloudstack/usage
-PACKAGE=cloud
+PACKAGE=cloudstack

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 3b0ec0f..53df3b9 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -709,7 +709,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
         	if(!file.canExecute()) {
         		s_logger.info("Some of the shell script files may not have executable bit set.
Fixup...");
 
-        		String cmd = "chmod ugo+x " + scriptPath;
+        		String cmd = "sudo chmod ugo+x " + scriptPath;
         		s_logger.info("Executing " + cmd);
                 String result = Script.runSimpleBashScript(cmd);
                 if (result != null) {


Mime
View raw message