You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/02/07 21:04:12 UTC

[45/51] [abbrv] git commit: refs/heads/ui-plugins - Summary: changed the path from cloud to cloudstack.

Summary: changed the path from cloud to cloudstack.

The change in package script allowed us to create proper tar under rpmbuild/SOURCES directory

The change in the path enabled us to launch the management server properly.

Signed-off-by: Hugo Trippaers <ht...@schubergphilis.com>
Committed-by: Hugo Trippaers <ht...@schubergphilis.com>


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

Branch: refs/heads/ui-plugins
Commit: a9955f155a062a131989bfb30708731e5eafd435
Parents: db3b0d3
Author: Pradeep Soundararajan <pr...@citrix.com>
Authored: Thu Feb 7 13:36:28 2013 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Thu Feb 7 13:45:30 2013 +0100

----------------------------------------------------------------------
 packaging/centos63/package.sh                |    6 +-
 python/lib/cloudutils/serviceConfig.py       |   22 +++++-----
 python/lib/cloudutils/serviceConfigServer.py |   43 ++++++++++-----------
 3 files changed, 35 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a9955f15/packaging/centos63/package.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh
index 83c0e5e..5b1bab4 100644
--- a/packaging/centos63/package.sh
+++ b/packaging/centos63/package.sh
@@ -34,11 +34,11 @@ else
 fi
 
 mkdir -p $RPMDIR/SPECS
-mkdir -p $RPMDIR/SOURCES/cloud-$VERSION
+mkdir -p $RPMDIR/SOURCES/cloudstack-$VERSION
 
 
-(cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/cloud-$VERSION -x )
-(cd $RPMDIR/SOURCES/; tar -czf cloud-$VERSION.tgz cloud-$VERSION)
+(cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/cloudstack-$VERSION -x )
+(cd $RPMDIR/SOURCES/; tar -czf cloudstack-$VERSION.tgz cloudstack-$VERSION)
 
 cp cloud.spec $RPMDIR/SPECS
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a9955f15/python/lib/cloudutils/serviceConfig.py
----------------------------------------------------------------------
diff --git a/python/lib/cloudutils/serviceConfig.py b/python/lib/cloudutils/serviceConfig.py
index 6b211eb..1e32d0f 100755
--- a/python/lib/cloudutils/serviceConfig.py
+++ b/python/lib/cloudutils/serviceConfig.py
@@ -54,9 +54,9 @@ class serviceCfgBase(object):
         except:
             logging.debug(formatExceptionInfo())
             if self.syscfg.env.mode == "Server":
-                raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloud/setupManagement.log for detail"%self.serviceName)
+                raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloudstack/setupManagement.log for detail"%self.serviceName)
             else:
-                raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloud/setupAgent.log for detail"%self.serviceName)
+                raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloudstack/setupAgent.log for detail"%self.serviceName)
 
     def backup(self):
         if self.status is None:
@@ -386,7 +386,7 @@ class securityPolicyConfigUbuntu(serviceCfgBase):
 
             return True
         except:
-            raise CloudRuntimeException("Failed to configure apparmor, please see the /var/log/cloud/setupAgent.log for detail, \
+            raise CloudRuntimeException("Failed to configure apparmor, please see the /var/log/cloudstack/setupAgent.log for detail, \
                                         or you can manually disable it before starting myCloud")
 
     def restore(self):
@@ -416,7 +416,7 @@ class securityPolicyConfigRedhat(serviceCfgBase):
                 cfo.replace_line("SELINUX=", "SELINUX=permissive")
                 return True
             except:
-                raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloud/setupAgent.log for detail, \
+                raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloudstack/setupAgent.log for detail, \
                                             or you can manually disable it before starting myCloud")
         else:
             return True
@@ -602,7 +602,7 @@ class cloudAgentConfig(serviceCfgBase):
 
     def configMyCloud(self):
         try:
-            cfo = configFileOps("/etc/cloud/agent/agent.properties", self)
+            cfo = configFileOps("/etc/cloudstack/agent/agent.properties", self)
             cfo.addEntry("host", self.syscfg.env.mgtSvr)
             cfo.addEntry("zone", self.syscfg.env.zone)
             cfo.addEntry("port", "443")
@@ -624,7 +624,7 @@ class cloudAgentConfig(serviceCfgBase):
 
     def configAgent(self):
         try:
-            cfo = configFileOps("/etc/cloud/agent/agent.properties", self)
+            cfo = configFileOps("/etc/cloudstack/agent/agent.properties", self)
             cfo.addEntry("host", self.syscfg.env.mgtSvr)
             cfo.addEntry("zone", self.syscfg.env.zone)
             cfo.addEntry("pod", self.syscfg.env.pod)
@@ -639,16 +639,16 @@ class cloudAgentConfig(serviceCfgBase):
             cfo.addEntry("resource", "com.cloud.hypervisor.kvm.resource.LibvirtComputingResource")
             cfo.save()
 
-            self.syscfg.svo.stopService("cloud-agent")
+            self.syscfg.svo.stopService("cloudstack-agent")
             bash("sleep 30")
-            self.syscfg.svo.enableService("cloud-agent")
+            self.syscfg.svo.enableService("cloudstack-agent")
             return True
         except:
             raise
 
     def configConsole(self):
         try:
-            cfo = configFileOps("/etc/cloud/agent/agent.properties", self)
+            cfo = configFileOps("/etc/cloudstack/agent/agent.properties", self)
             cfo.addEntry("host", self.syscfg.env.mgtSvr)
             cfo.addEntry("zone", self.syscfg.env.zone)
             cfo.addEntry("pod", self.syscfg.env.pod)
@@ -661,8 +661,8 @@ class cloudAgentConfig(serviceCfgBase):
             cfo.addEntry("resource", "com.cloud.agent.resource.computing.consoleProxyResource")
             cfo.save()
 
-            self.syscfg.svo.stopService("cloud-agent")
-            self.syscfg.svo.enableService("cloud-agent")
+            self.syscfg.svo.stopService("cloudstack-agent")
+            self.syscfg.svo.enableService("cloudstack-agent")
             return True
         except:
             raise

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a9955f15/python/lib/cloudutils/serviceConfigServer.py
----------------------------------------------------------------------
diff --git a/python/lib/cloudutils/serviceConfigServer.py b/python/lib/cloudutils/serviceConfigServer.py
index 3fb9739..66ec2d0 100644
--- a/python/lib/cloudutils/serviceConfigServer.py
+++ b/python/lib/cloudutils/serviceConfigServer.py
@@ -80,32 +80,32 @@ class cloudManagementConfig(serviceCfgBase):
                 if not cmd.isSuccess():
                     raise CloudInternalException(cmd.getErrMsg())
             
-                cfo = configFileOps("/etc/cloud/management/tomcat6.conf", self)
+                cfo = configFileOps("/etc/cloudstack/management/tomcat6.conf", self)
                 cfo.add_lines("JAVA_OPTS+=\" -Djavax.net.ssl.trustStore=%s \""%keyPath)
         elif self.syscfg.env.svrMode == "HttpsServer":
-            if not os.path.exists("/etc/cloud/management/server-ssl.xml") or not os.path.exists("/etc/cloud/management/tomcat6-ssl.conf"):
-                raise CloudRuntimeException("Cannot find /etc/cloud/management/server-ssl.xml or /etc/cloud/management/tomcat6-ssl.conf, https enables failed")
-            if os.path.exists("/etc/cloud/management/server.xml"):
-                bash("rm -f /etc/cloud/management/server.xml")
-            if os.path.exists("/etc/cloud/management/tomcat6.conf"):
-                bash("rm -f /etc/cloud/management/tomcat6.conf")
-            bash("ln -s /etc/cloud/management/server-ssl.xml /etc/cloud/management/server.xml")
-            bash("ln -s /etc/cloud/management/tomcat6-ssl.conf /etc/cloud/management/tomcat6.conf")
+            if not os.path.exists("/etc/cloudstack/management/server-ssl.xml") or not os.path.exists("/etc/cloudstack/management/tomcat6-ssl.conf"):
+                raise CloudRuntimeException("Cannot find /etc/cloudstack/management/server-ssl.xml or /etc/cloudstack/management/tomcat6-ssl.conf, https enables failed")
+            if os.path.exists("/etc/cloudstack/management/server.xml"):
+                bash("rm -f /etc/cloudstack/management/server.xml")
+            if os.path.exists("/etc/cloudstack/management/tomcat6.conf"):
+                bash("rm -f /etc/cloudstack/management/tomcat6.conf")
+            bash("ln -s /etc/cloudstack/management/server-ssl.xml /etc/cloudstack/management/server.xml")
+            bash("ln -s /etc/cloudstack/management/tomcat6-ssl.conf /etc/cloudstack/management/tomcat6.conf")
             if not bash("iptables-save |grep PREROUTING | grep 6443").isSuccess():
                 bash("iptables -A PREROUTING -t nat -p tcp --dport 443 -j REDIRECT --to-port 6443")
         else:
-            if not os.path.exists("/etc/cloud/management/server-nonssl.xml") or not os.path.exists("/etc/cloud/management/tomcat6-nonssl.conf"):
-                raise CloudRuntimeException("Cannot find /etc/cloud/management/server-nonssl.xml or /etc/cloud/management/tomcat6-nonssl.conf, https enables failed")
-            if os.path.exists("/etc/cloud/management/server.xml"):
-                bash("rm -f /etc/cloud/management/server.xml")
-            if os.path.exists("/etc/cloud/management/tomcat6.conf"):
-                bash("rm -f /etc/cloud/management/tomcat6.conf")
-            bash("ln -s /etc/cloud/management/server-nonssl.xml /etc/cloud/management/server.xml")
-            bash("ln -s /etc/cloud/management/tomcat6-nonssl.conf /etc/cloud/management/tomcat6.conf")
+            if not os.path.exists("/etc/cloudstack/management/server-nonssl.xml") or not os.path.exists("/etc/cloudstack/management/tomcat6-nonssl.conf"):
+                raise CloudRuntimeException("Cannot find /etc/cloudstack/management/server-nonssl.xml or /etc/cloudstack/management/tomcat6-nonssl.conf, https enables failed")
+            if os.path.exists("/etc/cloudstack/management/server.xml"):
+                bash("rm -f /etc/cloudstack/management/server.xml")
+            if os.path.exists("/etc/cloudstack/management/tomcat6.conf"):
+                bash("rm -f /etc/cloudstack/management/tomcat6.conf")
+            bash("ln -s /etc/cloudstack/management/server-nonssl.xml /etc/cloudstack/management/server.xml")
+            bash("ln -s /etc/cloudstack/management/tomcat6-nonssl.conf /etc/cloudstack/management/tomcat6.conf")
         
         #distro like sl 6.1 needs this folder, or tomcat6 failed to start
         checkHostName()
-        bash("mkdir /var/log/cloud-management/")
+        bash("mkdir /var/log/cloudstack-management/")
         #set max process per account is unlimited
         if os.path.exists("/etc/security/limits.conf"):
             cfo = configFileOps("/etc/security/limits.conf")
@@ -118,9 +118,8 @@ class cloudManagementConfig(serviceCfgBase):
         except:
             pass
             
-        self.syscfg.svo.stopService("cloud-management")
-        if self.syscfg.svo.enableService("cloud-management"):
+        self.syscfg.svo.stopService("cloudstack-management")
+        if self.syscfg.svo.enableService("cloudstack-management"):
             return True
         else:
-            raise CloudRuntimeException("Failed to configure %s, please see the /var/log/cloud/setupManagement.log for detail"%self.serviceName) 
-            
+            raise CloudRuntimeException("Failed to configure %s, please see the /var/log/cloudstack/setupManagement.log for detail"%self.serviceName)