Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scheduler] Fix possible failure during first object task launch
This issue may happen during the first task launch on an object when some other tasks are also running on this object. We have then following node.scheduler.log: failed run '%s' exit code:1" This patch fix following silent stack Traceback (most recent call last): File /usr/lib/python3.8/runpy.py, line 194, in _run_module_as_main return _run_code(code, main_globals, None, File /usr/lib/python3.8/runpy.py, line 87, in _run_code exec(code, run_globals) File /usr/share/opensvc/opensvc/__main__.py, line 131, in <module> ret = main(sys.argv) File /usr/share/opensvc/opensvc/__main__.py, line 74, in main ret = Mgr()(argv=argv[2:]) File /usr/share/opensvc/opensvc/commands/mgr/__init__.py, line 357, in __call__ ret = self._main(argv=argv) File /usr/share/opensvc/opensvc/commands/mgr/__init__.py, line 331, in _main ret = self.do_svcs_action(options, action, argv=argv) File /usr/share/opensvc/opensvc/commands/mgr/__init__.py, line 137, in do_svcs_action ret = self.node.do_svcs_action(action, options) File /usr/share/opensvc/opensvc/core/node/node.py, line 2452, in do_svcs_action data, err, errs = self.do_svcs_action_sequential(action, options, svcs, need_aggregate) File /usr/share/opensvc/opensvc/core/node/node.py, line 2491, in do_svcs_action_sequential ret = svc.action(action, options) File /usr/share/opensvc/opensvc/core/objects/svc.py, line 925, in action return self._action(action, options=options) File /usr/share/opensvc/opensvc/core/scheduler.py, line 166, in _func self.sched.action_timestamps(action, options.rid) File /usr/share/opensvc/opensvc/core/scheduler.py, line 1053, in action_timestamps timestamp(tsfile, last=last) File /usr/share/opensvc/opensvc/core/scheduler.py, line 150, in timestamp os.makedirs(timestamp_d, 0o755) File /usr/lib/python3.8/os.py, line 223, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/var/lib/opensvc/svc/<svcname>/scheduler'
- Loading branch information