Commit 6380686c authored by Alain Takoudjou's avatar Alain Takoudjou

grid.promise: fix create promise folder for the first time with wrong permissions

parent f4a82992
......@@ -539,7 +539,7 @@ class PromiseLauncher(object):
failed_promise_name = promise_name
stat_info = os.stat(self.partition_folder)
chownDirectory(self.partition_folder, stat_info.st_uid, stat_info.st_gid)
chownDirectory(self.promise_output_dir, stat_info.st_uid, stat_info.st_gid)
if failed_promise_name:
raise PromiseError("Promise %r failed." % failed_promise_name)
......@@ -161,6 +161,7 @@ class GenericPromise(object):
logger_handler = logging.StreamHandler(self.__logger_buffer)
self.__log_file = None
else:
mkdir_p(self.__log_folder)
self.__log_file = os.path.join(
self.__log_folder,
'%s.log' % self.__title
......
......@@ -621,7 +621,6 @@ stderr_logfile_backups=1
def _checkPromiseList(self, partition, force=True, check_anomaly=False):
instance_path = os.path.join(self.instance_root, partition.partition_id)
promise_log_path = os.path.join(instance_path, PROMISE_LOG_FOLDER_NAME)
mkdir_p(promise_log_path)
self.logger.info("Checking %s promises..." % partition.partition_id)
uid, gid = None, None
......
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