Skip to content

Commit

Permalink
grid.promise: fix create promise folder for the first time with wrong…
Browse files Browse the repository at this point in the history
… permissions
  • Loading branch information
takdj committed Apr 19, 2018
1 parent f4a8299 commit 6380686
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion slapos/grid/promise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def run(self):
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)
1 change: 1 addition & 0 deletions slapos/grid/promise/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def _configureLogger(self):
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
Expand Down
1 change: 0 additions & 1 deletion slapos/grid/slapgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ def processSoftwareReleaseList(self):
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
Expand Down

0 comments on commit 6380686

Please sign in to comment.