Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix opensuse provisioning support #1369

Merged
merged 1 commit into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions teuthology/nuke/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def remove_ceph_packages(ctx):
for remote in ctx.cluster.remotes.keys():
if remote.os.package_type == 'rpm':
log.info("Remove any broken repos")
dist_release = remote.os.name
remote.run(
args=['sudo', 'rm', run.Raw("/etc/yum.repos.d/*ceph*")],
check_status=False
Expand All @@ -267,14 +268,18 @@ def remove_ceph_packages(ctx):
check_status=False,
)
remote.run(
args=['sudo', 'rpm', '--rebuilddb', run.Raw('&&'), 'yum',
'clean', 'all']
)
log.info('Remove any ceph packages')
remote.run(
args=['sudo', 'yum', 'remove', '-y', run.Raw(pkgs)],
check_status=False
args=['sudo', 'rpm', '--rebuilddb']
)
if dist_release in ['opensuse', 'sle']:
remote.sh('sudo zypper clean')
log.info('Remove any ceph packages')
remote.sh('sudo zypper remove --non-interactive',
check_status=False
)
else:
remote.sh('sudo yum clean all')
log.info('Remove any ceph packages')
remote.sh('sudo yum remove -y', check_status=False)
else:
log.info("Remove any broken repos")
remote.run(
Expand Down Expand Up @@ -340,7 +345,6 @@ def remove_ceph_data(ctx):
run.Raw('/var/run/ceph*'),
],
)
install_task.purge_data(ctx)


def remove_testing_tree(ctx):
Expand Down
3 changes: 2 additions & 1 deletion teuthology/orchestra/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ def chcon(self, file_path, context):
:param file_path: The path to the file
:param context: The SELinux context to be used
"""
if self.os.package_type != 'rpm':
if self.os.package_type != 'rpm' or \
self.os.name in ['opensuse', 'sle']:
return
if teuthology.lock.query.is_vm(self.shortname):
return
Expand Down
4 changes: 4 additions & 0 deletions teuthology/task/selinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def filter_hosts(self):
if remote.is_vm:
msg = "Excluding {host}: VMs are not yet supported"
log.info(msg.format(host=remote.shortname))
elif remote.os.name in ['opensuse', 'sle']:
msg = "Excluding {host}: \
SELinux is not supported for '{os}' os_type yet"
log.info(msg.format(host=remote.shortname, os=remote.os.name))
elif remote.os.package_type == 'rpm':
new_cluster.add(remote, roles)
else:
Expand Down