"""
remote.run(
args=[
- 'sudo', 'rm', '-f', '/etc/apt/sources.list.d/{proj}.list'.format(
+ 'sudo', 'rm', '/etc/apt/sources.list.d/{proj}.list'.format(
proj=proj),
run.Raw('&&'),
'sudo', 'apt-get', 'update',
- # ignore failure
- run.Raw('||'),
- 'true',
],
- stdout=StringIO(),
+ check_status=False,
)
def _remove_sources_list_rpm(remote, proj):
"""
- Removes /etc/yum.repos.d/{proj}.repo, /var/lib/{proj}, and /var/log/{proj}.
+ Removes /etc/yum.repos.d/{proj}.repo, /var/lib/{proj}, and /var/log/{proj}
:param remote: the teuthology.orchestra.remote.Remote object
- :param proj: the project whose sources.list needs removing
+ :param proj: the project whose .repo needs removing
"""
remote.run(
- args=[
- 'sudo', 'rm', '-f', '/etc/yum.repos.d/{proj}.repo'.format(
- proj=proj),
- run.Raw('||'),
- 'true',
- ],
- stdout=StringIO(),
+ args=['sudo', 'rm', '/etc/yum.repos.d/{proj}.repo'.format(proj=proj)],
+ check_status=False,
)
# FIXME
# There probably should be a way of removing these files that is
# implemented in the yum/rpm remove procedures for the ceph package.
# FIXME but why is this function doing these things?
remote.run(
- args=[
- 'sudo', 'rm', '-fr', '/var/lib/{proj}'.format(proj=proj),
- run.Raw('||'),
- 'true',
- ],
- stdout=StringIO(),
+ args=['sudo', 'rm', '-r', '/var/lib/{proj}'.format(proj=proj)],
+ check_status=False,
)
remote.run(
- args=[
- 'sudo', 'rm', '-fr', '/var/log/{proj}'.format(proj=proj),
- run.Raw('||'),
- 'true',
- ],
- stdout=StringIO(),
+ args=['sudo', 'rm', '-r', '/var/log/{proj}'.format(proj=proj)],
+ check_status=False,
)