Skip to content

Commit

Permalink
packaging: fix error when enabling KeyCloak
Browse files Browse the repository at this point in the history
This fixes engine-setup error:
[ ERROR ] Failed to execute stage 'Misc configuration': 'OVESETUP_OVN/ovirtProviderOvnSecret'

Since commit 978c90e we save the ovirtProviderOvnSecret value in the
setup file.
But if this value is not there, but ovirtProviderOvn is True, the
engine-setup fails.

So if we can't find the value in the config, a new password is
generated.

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
  • Loading branch information
dupondje authored and sandrobonazzola committed May 6, 2024
1 parent b94007b commit 8b75156
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,8 @@ def _misc_configure_provider(self):
oengcommcons.KeycloakEnv.ENABLE
)
if keycloak_enabled:
if self.environment.get(OvnEnv.OVIRT_PROVIDER_OVN_SECRET) is None:
self._generate_client_secret()
self._configure_ovirt_provider_ovn()

@plugin.event(
Expand Down

0 comments on commit 8b75156

Please sign in to comment.