Skip to content

Commit 008146a

Browse files
author
frank
committed
Bug 10217 - cloud-setup-management seems to be not checking for fqdn hostname
status 10217: resolved fixed
1 parent e34d044 commit 008146a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

python/lib/cloudutils/serviceConfigServer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ def __init__(self, syscfg):
1111
self.serviceName = "CloudStack Management Server"
1212

1313
def config(self):
14+
def checkHostName():
15+
ret = bash("hostname --fqdn")
16+
if not ret.isSuccess():
17+
raise CloudInternalException("Cannot get hostname, 'hostname --fqdn failed'")
18+
1419
if self.syscfg.env.svrMode == "mycloud":
1520
cfo = configFileOps("/usr/share/cloud/management/conf/environment.properties", self)
1621
cfo.addEntry("cloud-stack-components-specification", "components-cloudzones.xml")
@@ -83,6 +88,7 @@ def config(self):
8388
bash("ln -s /etc/cloud/management/tomcat6-nonssl.conf /etc/cloud/management/tomcat6.conf")
8489

8590
#distro like sl 6.1 needs this folder, or tomcat6 failed to start
91+
checkHostName()
8692
bash("mkdir /var/log/cloud-management/")
8793

8894
try:

0 commit comments

Comments
 (0)