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

Validate settings before running Pulp instance #1671

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

MichalPysik
Copy link
Member

When token authentization is enabled, 4 additional variables have to be set. The state of these variables is now checked, while properly informing the user, instead of relying on exceptions raised later during the instance's run.

closes #1550

@MichalPysik MichalPysik force-pushed the validate_settings branch 2 times, most recently from 4fb8bc6 to b81a6fe Compare June 24, 2024 16:55
@MichalPysik MichalPysik marked this pull request as ready for review June 24, 2024 16:55
@MichalPysik MichalPysik requested a review from lubosmj June 24, 2024 17:42
@MichalPysik MichalPysik force-pushed the validate_settings branch 21 times, most recently from 9ae30af to e9cc0a4 Compare June 27, 2024 14:49
Copy link
Member

@lubosmj lubosmj left a comment

Choose a reason for hiding this comment

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

Tested manually. The following output is printed out:

[root@a3d3e4263785 /]# pulpcore-manager check --deploy
SystemCheckError: System check identified some issues:

ERRORS:
?: (pulp_container.E001) PRIVATE_KEY_PATH variable has to be set when token authentification is enabled
?: (pulp_container.E001) PUBLIC_KEY_PATH variable has to be set when token authentification is enabled
?: (pulp_container.E001) TOKEN_SERVER variable has to be set when token authentification is enabled
?: (pulp_container.E001) TOKEN_SIGNATURE_ALGORITHM variable has to be set when token authentification is enabled
...

The question mark suggests that there is no actual object causing the problem: https://github.com/django/django/blob/0fdcf1029cea2d43bd68c5270f48e0f7deab5e47/django/core/checks/messages.py#L25. I guess we are fine with it.

@MichalPysik MichalPysik force-pushed the validate_settings branch 2 times, most recently from efd7f8f to 4cfb9d8 Compare June 28, 2024 10:38
When token authentization is enabled, 4 additional variables have to be
set. The state of these variables is now checked, while properly
informing the user, instead of relying on exceptions raised later during
the instance's run.

closes pulp#1550
@lubosmj lubosmj merged commit 8973f80 into pulp:main Jun 28, 2024
16 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.

Validate settings before running up a Pulp instance
2 participants