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 random error during installation of CA certificate (bsc#1227245) #386

Closed
wants to merge 2 commits into from

Conversation

nadvornik
Copy link
Contributor

What does this PR change?

When a container is started via systemd, there is a short period when
GetPodName() can fail or GetPodName() succeeds and the following command fails.

It was reported on migration, but I think it can happen on install too. It is more likely on migration, probably because of large writes.

This PR fixes it.

Test coverage

  • No tests: already covered

  • DONE

Links

Issue(s):
https://github.com/SUSE/spacewalk/issues/24705
https://bugzilla.suse.com/show_bug.cgi?id=1227245

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Before you merge

Check How to branch and merge properly!

@nadvornik nadvornik requested review from cbosdo and rjmateus July 4, 2024 14:54
Copy link
Member

@rjmateus rjmateus left a comment

Choose a reason for hiding this comment

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

lgtm. thank you for the solution

Copy link
Contributor

@aaannz aaannz left a comment

Choose a reason for hiding this comment

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

LGTM, I only think we can do this wait little less scary.

shared/connection.go Outdated Show resolved Hide resolved
shared/connection.go Outdated Show resolved Hide resolved
args := []string{"exec", podName}
command, err := c.GetCommand()
if err != nil {
log.Fatal().Err(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

better return the error rather than log.Fatal()

@nadvornik nadvornik requested a review from cbosdo July 8, 2024 11:05
@cbosdo cbosdo added the SUSE Manager 5.0.1 Candidate PRs for 5.0.1 inclusion label Jul 12, 2024
@cbosdo cbosdo mentioned this pull request Jul 17, 2024
3 tasks
@cbosdo cbosdo closed this Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SUSE Manager 5.0.1 Candidate PRs for 5.0.1 inclusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants