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

Bind mount the configured certs location bsc#1219004 #279

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

rtamalin
Copy link
Collaborator

@rtamalin rtamalin commented Feb 1, 2024

When the migration is running ensure that the correct certs directory is bind mounted from the /system-root into the ISO boot's runtime environment, by retrieving the configured server.certlocation setting from the /system-root/etc/regionserverclnt.cfg file.

Add unit tests for new get_regionsrv_certs_path() function and tweak some existing tests, that depend upon mocking calls to builtin.open(), so that they mock any calls to get_regionsrv_certs_path() so as to avoid triggering additional open() calls that would break those tests.

Copy link
Collaborator

@guangyee guangyee left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@smarlowucf smarlowucf left a comment

Choose a reason for hiding this comment

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

LGTM, although I'm not totally familiar with cloud reg client code.

Copy link
Collaborator

@jesusbv jesusbv left a comment

Choose a reason for hiding this comment

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

LGTM

suse_migration_services/units/prepare.py Outdated Show resolved Hide resolved
@rtamalin
Copy link
Collaborator Author

rtamalin commented Feb 2, 2024

I'm going to squash the commits into as single commit before merging; helps with keeping the changes log management simpler ;-)

When the migration is running ensure that the correct certs directory
is bind mounted from the /system-root into the ISO boot's runtime
environment, by retrieving the configured server.certlocation setting
from the /system-root/etc/regionserverclnt.cfg file. Default to the
new cert location if a cert location cannot be determined.

Log a message when no certs are present in the cert location, checking
in the system being migrated, and after the bind mount of that path
into the ISO runtime environment.

Add unit tests for new get_regionsrv_certs_path() function and tweak
some existing tests, that depend upon mocking calls to builtin.open(),
so that they mock any calls to get_regionsrv_certs_path() so as to
avoid triggering additional open() calls that would break those tests.
@rtamalin rtamalin merged commit 87b5485 into master Feb 2, 2024
2 checks 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.

5 participants