install_path = find_program('install')
f.write('{install_path} -d -m0770 -o {uid} -g {gid} /var/run/ceph/{fsid}\n'.format(install_path=install_path, fsid=fsid, uid=uid, gid=gid))
+ # Sometimes, adding `--rm` to a run_cmd doesn't work. Let's remove the container manually
+ f.write(' '.join(c.rm_cmd()) + '\n')
+
# container run command
f.write(' '.join(c.run_cmd()) + '\n')
os.fchmod(f.fileno(), 0o600)
self.cname,
] + cmd
+ def rm_cmd(self):
+ # type: () -> List[str]
+ return [
+ str(container_path),
+ 'rm', '-f',
+ self.cname
+ ]
+
def run(self, timeout=DEFAULT_TIMEOUT):
# type: (Optional[int]) -> str
logger.debug(self.run_cmd())