-
Notifications
You must be signed in to change notification settings - Fork 72
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
Halt upgrades if evr is not owned by foreman #953
base: master
Are you sure you want to change the base?
Halt upgrades if evr is not owned by foreman #953
Conversation
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
4cd6c7a
to
a54ac48
Compare
a54ac48
to
d4d3d5b
Compare
All the comments should be addressed now. |
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
unless evr_owned_by_postgres.empty? | ||
return evr_owned_by_postgres.first['evr_owned_by_postgres'] == '0' | ||
end | ||
fail!('Could not determine if the evr extension is owned by the foreman DB owner') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we expect a user that hits this fail statement to do next? Can we give them some direction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only failures reasons I can think of would be if the DB connection failed or if the config doesn't have the correct username information. I've updated the error message.
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
40e70cd
to
d86def9
Compare
I stopped hardcoding 'foreman' as the DB name just in case. We are hardcoding it in the installer check, but I figured why not here since it seems to be supported. |
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
definitions/checks/foreman/check_external_db_evr_permissions.rb
Outdated
Show resolved
Hide resolved
I had just a minor nit, @evgeni please also do a final review |
d86def9
to
e6dc6f1
Compare
Halts upgrades if the
evr
extension in Katello external DBs are not owned byforeman
. Skips the checks if theevr
extension does not exist.Related installer PR: theforeman/foreman-installer#984