def __create_data_location(self): sh.create_loopback_file(fname=self.fs_image, size=int(self.cfg.get('swift', 'loopback_disk_size')), fs_type='xfs') self.tracewriter.file_touched(self.fs_image) sh.mount_loopback_file(self.fs_image, self.fs_dev, 'xfs') sh.chown_r(self.fs_dev, sh.geteuid(), sh.getegid())
def _ensure_db_access(self): # Need db access: # openstack-dashboard/local needs to be writeable by the runtime user # since currently its storing the sql-lite databases there (TODO fix that) path = sh.joinpths(self.dash_dir, 'local') if sh.isdir(path): (user, group) = self._get_apache_user_group() LOG.debug("Changing ownership (recursively) of %r so that it can be used by %r/%r", path, group, user) sh.chown_r(path, sh.getuid(user), sh.getgid(group))
def _ensure_db_access(self): # ../openstack-dashboard/local needs to be writeable by the runtime user # since currently its storing the sql-lite databases there (TODO fix that) path = sh.joinpths(self.dash_dir, "local") if sh.isdir(path): (user, group) = self._get_apache_user_group() LOG.info("Changing ownership (recursively) of %s so that it can be used by %s - %s", path, user, group) uid = sh.getuid(user) gid = sh.getgid(group) sh.chown_r(path, uid, gid)
def _ensure_db_access(self): # Need db access: # openstack-dashboard/local needs to be writeable by the runtime user # since currently its storing the sql-lite databases there (TODO fix that) path = sh.joinpths(self.dash_dir, 'local') if sh.isdir(path): (user, group) = self._get_apache_user_group() LOG.debug( "Changing ownership (recursively) of %r so that it can be used by %r/%r", path, group, user) sh.chown_r(path, sh.getuid(user), sh.getgid(group))
def _create_data_location(self): loop_size = self.cfg.get('swift', 'loopback_disk_size') if not loop_size: loop_size = DEF_LOOP_SIZE else: loop_size = utils.to_bytes(loop_size) sh.create_loopback_file(fname=self.fs_image, size=loop_size, fs_type=FS_TYPE) self.tracewriter.file_touched(self.fs_image) sh.mount_loopback_file(self.fs_image, self.fs_dev, FS_TYPE) sh.chown_r(self.fs_dev, sh.geteuid(), sh.getegid())