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

Workaround s390 clients delete #1559

Merged
merged 5 commits into from
Feb 23, 2025

Conversation

maximenoel8
Copy link
Contributor

@maximenoel8 maximenoel8 commented Feb 21, 2025

Context

The deletion of s390 clients using terraform destroy is failing due to the issue described in #26502. This problem is currently blocking the BV cleanup pipeline and the ability to clean up the BV environment using Terraform.

Since a long-term solution is not expected soon, this PR introduces a temporary workaround to address the issue.

What does this PR do?

Bash Script

  • Introduces a new script, delete_s390_guest, to manually remove the s390 minion.
  • Removes s390 modules from the Terraform state file (tfstate) to prevent conflicts during environment cleanup.

Cleanup Pipeline

  • Updates the cleanup pipeline to execute the new bash script before running Terraform commands.
  • This ensures the environment is properly cleaned and avoids the issue when invoking terraform destroy.

@maximenoel8 maximenoel8 self-assigned this Feb 21, 2025
@maximenoel8 maximenoel8 requested a review from a team February 21, 2025 00:33
// WORKAROUND: Remove s390 clients manually until https://github.com/SUSE/spacewalk/issues/26502 is fixed.
sh """
set +x
source ~/.credentials
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be caution here, as we have a set +x on the line above, it might be printing credentials visibile from the Jenkins web, that we might not want to show.

# Iterate through each userid and delete the s390 clients
for USERID in $USERIDS; do
echo "Deleting client with userid: $USERID"
/usr/local/bin/delete_s390_guest "$USERID"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That binary is already part of our IaC in the infrastructure repo?

Copy link
Contributor

@Bischoff Bischoff Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but I can add it, as well as its friend list_s390_clients.

It will make sense on the workers even when the workaround is gone. As a convenience.

Copy link
Member

@srbarrios srbarrios Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Eric, if it's a dependency for our pipeline, yes we need it automated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the workaround is removed (hopefully before it snows in hell...) it won't be a dependency anymore for our pipelines.

Copy link
Contributor

@Bischoff Bischoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The deletion of s390 clients using terraform destroy is failing due to the issue described in #26502." --> Do we have a 26502, or is it a typo ? There's no link

@maximenoel8 maximenoel8 merged commit d6af815 into SUSE:master Feb 23, 2025
1 check passed
@maximenoel8 maximenoel8 deleted the workaround_s390_client branch February 23, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants