sardana-org / sardana

Moved to GitLab: https://gitlab.com/sardana-org/sardana
39 stars 52 forks source link

MacroServer Environment dir name problems (SF#19) #20

Open sf-migrator-bot opened 11 years ago

sf-migrator-bot commented 11 years ago

On first execution of Macroserver I got this errors

MainThread     INFO     2013-05-19 14:14:52,613 MS_demo1_1.EnvironmentManager: Creating environment directory: /tmp/tango/MacroServer/demo1
MainThread     ERROR    2013-05-19 14:14:52,613 MS_demo1_1.EnvironmentManager: Creating environment: Permission denied
MainThread     DEBUG    2013-05-19 14:14:52,614 MS_demo1_1.EnvironmentManager: Details:
Traceback (most recent call last):
  File "/home/sardana/.local/lib/python2.7/site-packages/sardana/macroserver/msenvmanager.py", line 114, in setEnvironmentDb
    os.makedirs(dir_name)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/tmp/tango/MacroServer'
MainThread     ERROR    2013-05-19 14:14:52,614 MacroServer/demo1/1: Failed to set environment DB to /tmp/tango/MacroServer/demo1/macroserver.properties
MainThread     DEBUG    2013-05-19 14:14:52,614 MacroServer/demo1/1: Details:
Traceback (most recent call last):
  File "/home/sardana/.local/lib/python2.7/site-packages/sardana/tango/macroserver/MacroServer.py", line 94, in init_device
    macro_server.set_environment_db(self.EnvironmentDb)
  File "/home/sardana/.local/lib/python2.7/site-packages/sardana/macroserver/macroserver.py", line 181, in set_environment_db
    self.environment_manager.setEnvironmentDb(environment_db)
  File "/home/sardana/.local/lib/python2.7/site-packages/sardana/macroserver/msenvmanager.py", line 118, in setEnvironmentDb
    raise ose
OSError: [Errno 13] Permission denied: '/tmp/tango/MacroServer'
MainThread     INFO     2013-05-19 14:14:52,643 MS_demo1_1.EnvironmentManager: Creating environment directory: /tmp/tmpoIA0Pl/%(ds_exec_name)s/%(ds_inst_name)s
MainThread     INFO     2013-05-19 14:14:53,017 MS_demo1_1.EnvironmentManager: Environment is being stored in /tmp/tmpoIA0Pl/%(ds_exec_name)s/%(ds_inst_name)s/macroserver.properties

There are two things here:

First, the file that should be tried is '/tmp/tango-USERNAME/MacroServer' instead of '/tmp/tango/MacroServer' (see ticket #588 of tango-cs).

Second, there is a fallback mechanism that creates a temporary dir... the problem is that there is a bug with the string substitution for the dir name (note the last line of the log):

Environment is being stored in /tmp/tmpoIA0Pl/%(ds_exec_name)s/%(ds_inst_name)s/macroserver.properties

the file name actually created was literally the one reported

Reported by: cpascual ( http://sf.net/u/cpascual )

Original Ticket: sardana/tickets/19

sf-migrator-bot commented 11 years ago

I fixed the second part of this issue (svn 21096). The first part is not urgent

Original comment by: cpascual (http://sf.net/u/cpascual)

sf-migrator-bot commented 11 years ago

Original comment by: cpascual (http://sf.net/u/cpascual)

sf-migrator-bot commented 11 years ago

Original comment by: reszelaz (http://sf.net/u/zreszela)

sf-migrator-bot commented 10 years ago

Original comment by: reszelaz (http://sf.net/u/zreszela)

sf-migrator-bot commented 10 years ago

Original comment by: cpascual (http://sf.net/u/cpascual)

sf-migrator-bot commented 10 years ago

what remains of this bug is not urgent and requires some debugging and testing. Changing milestone to Jul14 and owner to zreszela.

Original comment by: cpascual (http://sf.net/u/cpascual)

sf-migrator-bot commented 10 years ago

Original comment by: cpascual (http://sf.net/u/cpascual)

sf-migrator-bot commented 9 years ago

Original comment by: cpascual (http://sf.net/u/cpascual)

sf-migrator-bot commented 8 years ago

Original comment by: reszelaz (http://sf.net/u/zreszela)