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

Preserve even more stunnel certs on upgrade #39

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

ydirson
Copy link
Collaborator

@ydirson ydirson commented Aug 8, 2024

This is the xcp-ng-8.3 version of xenserver#164 (submitted upstream as a complement to xenserver#158, the xenserver#164 backport not yet merged).
It is a complement to #35 (original xcp-ng-8.3 version of xenserver#158).

ydirson added 3 commits August 8, 2024 10:55
buildRestoreList: include xapi-stunnel-ca-bundle.pem

9a09a4d preserves the certs themselves,
but for some reason the bundle is not necessarily regenerated from them,
(especially when the dir was empty and is "thus" not preserved?) so
preserve the bundle as well - as was done for the pool bundle.

Signed-off-by: Yann Dirson <[email protected]>
(cherry picked from commit 117bde708f89cf532abe3175e68690674ed3ddbe)
…e go

If the specified dir exists but is empty (as can happen for
/etc/stunnel/certs), the current code would not restore it, as in fact
it restores not the dir, but its immediate children matching the pattern.

When no pattern is given, avoid complications by using the fact that
restore_file perfectly works with directories too.

Note this makes it prominent that the 're' handling is only ever applied
to immediate children of the dir; we may simplify further by moving the
pattern-matching code down to restore_file, but then do we want to keep
the current behavior?

Signed-off-by: Yann Dirson <[email protected]>
@ydirson ydirson merged commit 121e7a7 into 10.10.19-8.3 Aug 8, 2024
1 check passed
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.

4 participants