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

Fix post_activation exception when setting up internal database #244

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions lib/manageiq/appliance_console/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,14 @@ def run
saml_unconfig if saml_unconfig?
oidc_config if oidc_config?
oidc_unconfig if oidc_unconfig?
set_server_state if set_server_state?
openscap if openscap?
message_server_config if message_server_config?
message_server_unconfig if message_server_unconfig?
message_client_config if message_client_config?
message_client_unconfig if message_client_unconfig?
# set_server_state must be after set_db and message_*_config so that a user
# can configure database, messaging, and start the server in one command
set_server_state if set_server_state?
Fryguy marked this conversation as resolved.
Show resolved Hide resolved
rescue CliError => e
say(e.message)
say("")
Expand Down Expand Up @@ -322,9 +324,6 @@ def set_internal_db
# start pg, create user, create db update the rails configuration,
# verify, set up the database with region. activate does it all!
raise CliError, "Failed to configure internal database" unless config.activate

# enable/start related services
config.post_activation
rescue RuntimeError => e
raise CliError, "Failed to configure internal database #{e.message}"
end
Expand All @@ -343,9 +342,6 @@ def set_external_db

# call create_or_join_region (depends on region value)
raise CliError, "Failed to configure external database" unless config.activate

# enable/start related services
config.post_activation
end

def set_replication
Expand Down