Bug #16485
closedNoMethodError: undefined method `openscap_proxy_id_changed?' for #<Host::Managed:>
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1363806
Description of problem:
when upgrading to satellite 6.2 from 6.1.9 we received openscap error in the satellite.log
Version-Release number of selected component (if applicable):
How reproducible: have not reproduced. pre health check script passed before upgrade.
Steps to Reproduce:
1.
2.
3.
Actual results:
db:migrate 18195 (See full trace by running task with --trace) 18196 == 20150612135546 CreateHostStatus: migrating ================================= 18197 -- create_table(:host_status) 18198 -> 0.0412s 18199 -- add_index(:host_status, :host_id) 18200 -> 0.0051s 18201 -- add_foreign_key("host_status", "hosts", {:name=>"host_status_hosts_host_id_fk", :column=>"host_id"}) 18202 -> 0.0044s 18203 -- add_column(:hosts, :global_status, :integer, {:default=>0, :null=>false})
Expected results: a completed satellite upgrade or the health check for hosts to fail before upgrade.
We did delete the host out of the webui, and it did not get us passed this error.
Additional info: adding full satellite.log
Updated by Marek Hulán over 8 years ago
- Description updated (diff)
- Target version set to 1.5.3
Updated by Marek Hulán over 8 years ago
The issue is in foreman core migration that uses host object to save recalculate host statuses. Foreman openscap adds new field and uses it in validation. OTOH I'm not sure how realistic it is to get statuses refreshed without duplicating the whole logic in migration. We can add a condition to foreman_openscap to do puppet run only if host respond to the "host.openscap_proxy_id_changed?" and it really changed which would be probably much simpler.
Updated by Marek Hulán over 8 years ago
- Related to Bug #15676: Host(group) validations breaks foreman migration added
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Assignee set to Marek Hulán
- Pull request https://github.com/theforeman/foreman_openscap/pull/216 added
Updated by Marek Hulán over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_openscap|a2a74842a14295e03c365205df17a5ea61e28356.
Updated by Marek Hulán over 8 years ago
- Translation missing: en.field_release set to 191