return port
def _get_ust_app_path():
- return os.getenv('LTTNG_UST_APP_PATH')
+ paths = os.getenv('LTTNG_UST_APP_PATH')
+ if paths is None:
+ return paths
+ paths = paths.split(':')
+ if len(paths) > 1:
+ dbg._pwarning("':' separator in LTTNG_UST_APP_PATH, only the first path will be used")
+ return paths[0]
def _get_user_home_path():
# $LTTNG_HOME overrides $HOME if it exists
user_port = None
dbg._pdebug('ust_app session daemon port: {}'.format(ust_app_port))
else:
+ ust_app_port = None
sys_port = _get_port_from_file('/var/run/lttng/agent.port')
user_port_file = os.path.join(_get_user_home_path(), '.lttng', 'agent.port')
user_port = _get_port_from_file(user_port_file)
sys_port = None
try:
- if ust_app_port is not None:
+ if ust_app_port is not None:
dbg._pdebug('creating ust_app client thread')
t = threading.Thread(target=_client_thread_target,
args=('ust_app', ust_app_port, reg_queue))
t.start()
dbg._pdebug('created and started user client thread')
reg_expecting += 1
- except:
+ except Exception as e:
# cannot create threads for some reason; stop this initialization
- dbg._pwarning('cannot create client threads')
+ dbg._pwarning('cannot create client threads: {}'.format(e))
return
if reg_expecting == 0: