Bug 1572265
Summary: | Diagnostics -> Region -> Database view is broken on appliance in podified environment | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Matouš Mojžíš <mmojzis> | ||||
Component: | UI - OPS | Assignee: | Harpreet Kataria <hkataria> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Matouš Mojžíš <mmojzis> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5.9.0 | CC: | abellott, cpelland, hkataria, izapolsk, jrafanie, lavenel, mpovolny, ncarboni, obarenbo | ||||
Target Milestone: | GA | ||||||
Target Release: | cfme-future | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | ui:diagnostics | ||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2019-01-22 14:55:28 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
It's blowing up in: [----] F, [2018-04-26T13:54:51.933068 #277:82c7b0] FATAL -- : Error caught: [NoMethodError] undefined method `[]' for nil:NilClass /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-ac8767091e55/app/controllers/ops_controller/diagnostics.rb:836:in `database_details' @database_details = Rails.configuration.database_configuration[Rails.env] @database_display_name = if @database_details["host"].in?([nil, "", "localhost", "127.0.0.1"]) It's blowing up in database_details because Rails.configuration.database_configuration[Rails.env] is nil. database_details is called from build_backup_schedule_options_for_select. I guess we're using environment variables in pods to find the database. Does it even make sense to have the scheduled database backup screen for podified? > Does it even make sense to have the scheduled database backup screen for podified? Nope, database backup through the application won't work in podified so we shouldn't be showing any of that. We have a convenience method to check this kind of thing. In this case we should only show the screen `unless MiqEnvironment.is_container?` [1] Also, as a side note, we also have a method for checking if the database is running locally which would be better than redoing that logic in the controller (and would also fix this particular issue) [2] [1] https://github.com/ManageIQ/manageiq/blob/dcd53e62d50f91c60e9814a8e1d0a483cfe57b0d/lib/miq_environment.rb#L22 [2] https://github.com/ManageIQ/manageiq/blob/dcd53e62d50f91c60e9814a8e1d0a483cfe57b0d/lib/evm_database.rb#L101 |
Created attachment 1427268 [details] production.log stacktrace Description of problem: Version-Release number of selected component (if applicable): 5.9.2.3 How reproducible: Always Steps to Reproduce: 1. Have an appliance in podified environment 2. Go to Configuration -> Diagnostics -> Region -> Database 3. Actual results: Tab is empty and error in production.log Expected results: Additional info: