Actions
Bug #29387
openfacts for OS are being imported even with ignore_facts_for_operatingsystem=true
Description
when the user submits facts w/o OS, app/models/host/managed.rb still adds OS to the facts to be imported
the code reads:
def attributes_to_import_from_facts attrs = [:architecture] if Setting[:update_hostgroup_from_facts] attrs << :hostgroup end if !Setting[:ignore_facts_for_operatingsystem] || (Setting[:ignore_facts_for_operatingsystem] && operatingsystem.blank?) attrs << :operatingsystem end if !Setting[:ignore_facts_for_domain] || (Setting[:ignore_facts_for_domain] && domain.blank?) attrs << :domain end super + attrs end
which means that if "operatingsystem" is blank and the setting is set to true (so ignore), OS is added to attrs
but as operatingsystem was blank, importing it fails miserably
reading the code the same applies for ignore_facts_for_domain=true :(
Updated by The Foreman Bot about 5 years ago
- Status changed from New to Ready For Testing
- Assignee set to Evgeni Golov
- Pull request https://github.com/theforeman/foreman/pull/7535 added
Updated by Ewoud Kohl van Wijngaarden over 2 years ago
- Status changed from Ready For Testing to New
Actions