ConPaaS-team / conpaas

ConPaaS: integrated runtime environment for elastic cloud applications
http://www.conpaas.eu
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

/var/log/cpsdirector/ not created during installation #65

Closed noma closed 10 years ago

noma commented 10 years ago

Occasionally, I get something like the following error:

# cpsclient.py create helloworld
Traceback (most recent call last):
  File "/usr/local/bin/cpsclient.py", line 5, in <module>
    pkg_resources.run_script('cpsclient==1.4.1-xtfs', 'cpsclient.py')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/cpsclient-1.4.1_xtfs-py2.7.egg/EGG-INFO/scripts/cpsclient.py", line 8, in <module>
    BaseClient().main(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/cpsclient-1.4.1_xtfs-py2.7.egg/cps/base.py", line 566, in main
    return getattr(self, command)(service_type, cloud, appid)
  File "/usr/local/lib/python2.7/dist-packages/cpsclient-1.4.1_xtfs-py2.7.egg/cps/base.py", line 160, in create
    res = self.callapi("start/" + service_type, True, data)
  File "/usr/local/lib/python2.7/dist-packages/cpsclient-1.4.1_xtfs-py2.7.egg/cps/base.py", line 94, in callapi
    return self.__callapi_creds(method, post, data, endpoint, username, password, use_certs)
  File "/usr/local/lib/python2.7/dist-packages/cpsclient-1.4.1_xtfs-py2.7.egg/cps/base.py", line 69, in __callapi_creds
    raise Exception(res['msg'] + " while calling %s" % method)
Exception: Error upon service creation: <type 'exceptions.IOError'> [Errno 2] No such file or directory: '/var/log/cpsdirector/debugging.log' while calling start/helloworld

It can be reproduced by

service apache2 restart
cpsclient.py create <any service, e.g. xtreemfs or helloworld>

I guess the folder "/var/log/cpsdirector" should be created with the correct owner and access rights during the director installation or during runtime. Doing so manually fixes the issue for me.

tcrivat commented 10 years ago

Hi,

This is the same as issue #58. I added the instructions to create the directory in the install.sh installation script (commit 6832549d68bf7d00f5f569289b44deab1e9576d0), however this is a temporary fix, the correct way would be to allow to specify the desired log file in director.cfg and create the log file and its directory during runtime. For this reason, I will leave this issue open until I implement this.

Thanks.

noma commented 10 years ago

Sorry, I forgot to check for an existing issue.

I used "make install" instead of "install.sh". (The installation guide from the website says "make install".) These two mechanisms seem to be inconsistent. I suggest the Makefile should simply call install.sh for the install target.

tcrivat commented 10 years ago

Fixed in commit 12bb4eb6c54a61d30f731da422bf0c6d692ec465. Now the two mechanisms are consistent. This can be closed.