Commit c014dfc9 authored by Manuela Kuhn's avatar Manuela Kuhn

Merge branch 'hotfix-2.4.2'

parents a13fbfa9 56a302fa
# API to communicate with a data transfer unit
__version__ = '2.4.1'
__version__ = '2.4.2'
import zmq
import socket
......
HiDRA 2.4.2
- Changed process name in initScript
- IPC directory is set to world/write readable when created
- IPC directory is removed (if empty) when HiDRA is stopped
HiDRA 2.4.1
- Changed config file to use file mode by default
......
......@@ -15,7 +15,7 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="HiDRA"
# Process name ( For display )
NAME=HiDRA
NAME=hidra
DAEMON=/opt/HiDRA/src/sender/DataManager.py
DAEMON_ARGS="--verbose"
PIDFILE=/opt/HiDRA/$NAME.pid
......
......@@ -374,7 +374,11 @@ class DataManager():
signal.signal(signal.SIGTERM, self.signal_term_handler)
if not os.path.exists(self.ipcPath):
os.makedirs(self.ipcPath)
os.mkdir(self.ipcPath)
# the permission have to changed explicitly because
# on some platform they are ignored when called within mkdir
os.chmod(self.ipcPath, 0777)
self.log.info("Creating directory for IPC communication: {0}".format(self.ipcPath))
self.extIp = arguments.extIp
......@@ -708,6 +712,23 @@ class DataManager():
except:
logging.warning("Could not remove ipc socket: {s}".format(s=controlSubPath), exc_info=True)
# Remove temp directory (if empty)
try:
os.rmdir(self.ipcPath)
self.log.debug("Removed IPC direcory: {0}".format(self.ipcPath))
except OSError, e:
try:
self.log.warning("Could not remove IPC directory: {0}".format(self.ipcPath))
self.log.debug("Error was {0}".format(e))
except:
logging.warning("Could not remove IPC directory: {0}".format(self.ipcPath))
logging.debug("Error was: {0}".format(e))
except:
try:
self.log.warning("Could not remove IPC directory: {0}".format(self.ipcPath), exc_info=True)
except:
logging.warning("Could not remove IPC directory: {0}".format(self.ipcPath), exc_info=True)
if not self.extLogQueue and self.logQueueListener:
self.log.info("Stopping logQueue")
self.logQueue.put_nowait(None)
......
__version__ = '2.4.1'
__version__ = '2.4.2'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment