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

util: set defaults for Vault config before converting #2602

Merged
merged 1 commit into from Oct 28, 2021

Conversation

nixpanic
Copy link
Collaborator

When using UPPER_CASE formatting for the HashiCorp Vault KMS
configuration, a missing VAULT_DESTROY_KEYS will cause the option to
be set to "false". The default for the option is intended for be "true".

This is a difference in behaviour between the vaultDestroyKeys and
VAULT_DESTROY_KEYS options. Both should use a default of "true" when
the configuration does not set the option explicitly.

By setting the default options in the standardVault struct before
unmarshalling the configuration in it, the default values will be
retained for the missing configuration options.


Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)
  • /retest all: run this in case the CentOS CI failed to start/report any test
    progress or results

When using UPPER_CASE formatting for the HashiCorp Vault KMS
configuration, a missing `VAULT_DESTROY_KEYS` will cause the option to
be set to "false". The default for the option is intended for be "true".

This is a difference in behaviour between the `vaultDestroyKeys` and
`VAULT_DESTROY_KEYS` options. Both should use a default of "true" when
the configuration does not set the option explicitly.

By setting the default options in the `standardVault` struct before
unmarshalling the configuration in it, the default values will be
retained for the missing configuration options.

Reported-by: Rachael George <rgeorge@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
@nixpanic nixpanic added bug Something isn't working component/rbd Issues related to RBD backport-to-release-v3.4 labels Oct 28, 2021
@nixpanic nixpanic requested review from a team October 28, 2021 11:23
Copy link
Contributor

@yati1998 yati1998 left a comment

Choose a reason for hiding this comment

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

LGTM.

@nixpanic
Copy link
Collaborator Author

/retest ci/centos/mini-e2e/k8s-1.22

@nixpanic
Copy link
Collaborator Author

/retest ci/centos/mini-e2e/k8s-1.22

Failed with #2204 (logs)

@@ -43,7 +43,7 @@ const (
vaultDefaultRole = "csi-kubernetes"
vaultDefaultNamespace = ""
vaultDefaultPassphrasePath = ""
vaultDefaultCAVerify = "true"
vaultDefaultCAVerify = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

@nixpanic this is bit confusing actually, vaultDefaultCAVerify take it as bool and DestroyKeys with string but in form form of boolean "true". Cant we make it in uniform manner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/rbd Issues related to RBD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants