Project

General

Profile

Bug #15559

Updated by Ivan Necas almost 3 years ago

The rhsm_fact_parser doesn't properly set the the virtual flag. This is due to reason, that the Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1351483
Description of problem:

While performing upgrade from sat6.1.9 -> sat6.2 GA snap18.1 on rhel7, installer failed at step: "update_subscription_facet_backend_data" with error:

==> /var/log/foreman-installer/satellite.log <==

FactParser expects the virtual interface [ERROR 2016-06-30 03:23:04 main] rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Identifier Can't add or remove `.` from
identifier
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/validations.rb:57:in `save!'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:273:in `block
in a form save!'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'

Version-Release number
of 'eth0_1' while the rhsm selected component (if applicable):
has 'eth0.1' upgrade from sat6.1.9 -> sat6.2 GA snap18.1 on rhel7

This leads How reproducible:

Steps
to errors when importing the facts for a host, that was provisioned with virtual interfaces: Reproduce:
1. set 62 snap18.1 repo
2. katello-service stop
3. yum update -y
4. satellite-installer --scenario satellite --upgrade


Actual results:
upgrade failed:

[ERROR 2016-06-30 03:23:04 main] rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Identifier Can't add or remove `.` from identifier

Expected results:

upgrade should complete successfully

Additional info:==>

/var/log/foreman-installer/satellite.log <==
[ERROR 2016-06-30 03:23:04 main] rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Identifier Can't add or remove `.` from identifier
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/validations.rb:57:in `save!'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:273:in `block in save!'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:273:in `save!'
/usr/share/foreman/app/models/host/base.rb:415:in `block in update_virtuals'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
/usr/share/foreman/app/models/host/base.rb:410:in `update_virtuals'
/usr/share/foreman/app/models/host/base.rb:395:in `set_interface'
/usr/share/foreman/app/models/host/base.rb:210:in `block in set_interfaces'
/usr/share/foreman/app/models/host/base.rb:207:in `each'
/usr/share/foreman/app/models/host/base.rb:207:in `set_interfaces'
/usr/share/foreman/app/models/host/base.rb:184:in `populate_fields_from_facts'
/usr/share/foreman/app/models/host/managed.rb:474:in `populate_fields_from_facts'
/usr/share/foreman/app/models/host/base.rb:158:in `import_facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.54/app/models/katello/host/subscription_facet.rb:82:in `update_facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.54/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake:16:in `block (5 levels) in <top (required)>'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:52:in `block (2 levels) in find_each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:52:in `each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:52:in `block in find_each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:125:in `find_in_batches'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:51:in `find_each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/querying.rb:9:in `find_each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.54/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake:8:in `block (4 levels) in <top (required)>'
Tasks: TOP => katello:upgrades:3.0:update_subscription_facet_backend_data
(See full trace by running task with --trace)
Updating backend data for subscription facets

[ERROR 2016-06-30 03:23:04 main] Upgrade step update_subscription_facet_backend_data failed. Check logs for more information.

Back