Bug 1588417
Summary: | unable to migrate from 5.6 to 5.9 due to to a database validation error | |||
---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Felix Dewaleyne <fdewaley> | |
Component: | Appliance | Assignee: | Brandon Dunne <bdunne> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | luke couzens <lcouzens> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 5.9.0 | CC: | abellott, cpelland, fdewaley, gtanzill, jdeubel, jrafanie, lcouzens, obarenbo, simaishi, smallamp | |
Target Milestone: | GA | Keywords: | TestOnly, ZStream | |
Target Release: | 5.10.0 | |||
Hardware: | All | |||
OS: | All | |||
Whiteboard: | ||||
Fixed In Version: | 5.10.0.0 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1591450 (view as bug list) | Environment: | ||
Last Closed: | 2019-02-11 14:08:13 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1561041, 1591450 |
Description
Felix Dewaleyne
2018-06-07 09:42:20 UTC
full trace : [----] I, [2018-04-26T11:47:56.114474 #17214:ccb118] INFO -- : MIQ(CustomizationTemplate.seed) Updating {:name=>"SSH key addition template", :type=>"CustomizationTemplateCloudInit", :description=>"This template enables placing ssh public key in authorized keys"} [----] E, [2018-04-26T11:47:56.569899 #17214:ccb118] ERROR -- : [ActiveRecord::RecordInvalid]: Validation failed: Name has already been taken Method:[block in method_missing] [----] E, [2018-04-26T11:47:56.570134 #17214:ccb118] ERROR -- : /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/validations.rb:78:in `raise_validation_error' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/validations.rb:50:in `save!' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/attribute_methods/dirty.rb:30:in `save!' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:324:in `block in save!' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:395:in `block in with_transaction_returning_status' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:230:in `transaction' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:392:in `with_transaction_returning_status' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:324:in `save!' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/suppressor.rb:45:in `save!' /var/www/miq/vmdb/app/models/customization_template.rb:37:in `block in seed' /var/www/miq/vmdb/app/models/customization_template.rb:26:in `each' /var/www/miq/vmdb/app/models/customization_template.rb:26:in `seed' /var/www/miq/vmdb/lib/evm_database.rb:80:in `block (2 levels) in seed' /var/www/miq/vmdb/lib/evm_database.rb:69:in `each' /var/www/miq/vmdb/lib/evm_database.rb:69:in `block in seed' /var/www/miq/vmdb/lib/extensions/ar_table_lock.rb:21:in `block (2 levels) in with_lock' /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:91:in `block in timeout' /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `block in catch' /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `catch' /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `catch' /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:106:in `timeout' /var/www/miq/vmdb/lib/extensions/ar_table_lock.rb:21:in `block in with_lock' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction' /var/www/miq/vmdb/lib/extensions/ar_table_lock.rb:15:in `with_lock' /var/www/miq/vmdb/lib/evm_database.rb:68:in `seed' /var/www/miq/vmdb/lib/evm_database.rb:56:in `seed_last' /var/www/miq/vmdb/app/models/miq_server.rb:229:in `start' /var/www/miq/vmdb/lib/workers/evm_server.rb:27:in `start' /var/www/miq/vmdb/lib/workers/evm_server.rb:48:in `start' /var/www/miq/vmdb/lib/workers/bin/evm_server.rb:4:in `<main>' /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/validations.rb:78:in `raise_validation_error': Validation failed: Name has already been taken (ActiveRecord::RecordInvalid) from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/validations.rb:50:in `save!' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/attribute_methods/dirty.rb:30:in `save!' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:324:in `block in save!' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:395:in `block in with_transaction_returning_status' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:230:in `transaction' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:392:in `with_transaction_returning_status' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:324:in `save!' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/suppressor.rb:45:in `save!' from /var/www/miq/vmdb/app/models/customization_template.rb:37:in `block in seed' from /var/www/miq/vmdb/app/models/customization_template.rb:26:in `each' from /var/www/miq/vmdb/app/models/customization_template.rb:26:in `seed' from /var/www/miq/vmdb/lib/evm_database.rb:80:in `block (2 levels) in seed' from /var/www/miq/vmdb/lib/evm_database.rb:69:in `each' from /var/www/miq/vmdb/lib/evm_database.rb:69:in `block in seed' from /var/www/miq/vmdb/lib/extensions/ar_table_lock.rb:21:in `block (2 levels) in with_lock' from /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:91:in `block in timeout' from /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `block in catch' from /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `catch' from /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `catch' from /opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:106:in `timeout' from /var/www/miq/vmdb/lib/extensions/ar_table_lock.rb:21:in `block in with_lock' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction' from /opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction' from /var/www/miq/vmdb/lib/extensions/ar_table_lock.rb:15:in `with_lock' from /var/www/miq/vmdb/lib/evm_database.rb:68:in `seed' from /var/www/miq/vmdb/lib/evm_database.rb:56:in `seed_last' from /var/www/miq/vmdb/app/models/miq_server.rb:229:in `start' from /var/www/miq/vmdb/lib/workers/evm_server.rb:27:in `start' from /var/www/miq/vmdb/lib/workers/evm_server.rb:48:in `start' from /var/www/miq/vmdb/lib/workers/bin/evm_server.rb:4:in `<main>' New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/0c2bf68625ccf36d421dc139bf7b81d42a6ad39f commit 0c2bf68625ccf36d421dc139bf7b81d42a6ad39f Author: Joe Rafaniello <jrafanie> AuthorDate: Thu Jun 7 16:37:19 2018 -0400 Commit: Joe Rafaniello <jrafanie> CommitDate: Thu Jun 7 16:37:19 2018 -0400 Allow duplicate nil pxe_image_types during seed https://bugzilla.redhat.com/show_bug.cgi?id=1588417 We want to disallow the same name template in different regions with the same pxe_image_type. Normally, region id sequences prevent this from happening but we were treating nil pxe_image_types as the same. Therefore you could have the "same" pxe_image_type in different regions for the same name template. app/models/customization_template.rb | 6 +- spec/models/customization_template_spec.rb | 57 + 2 files changed, 62 insertions(+), 1 deletion(-) https://github.com/ManageIQ/manageiq/pull/17544 has been merged and marked for backport to 5.9 along with the dependent PR: https://github.com/ManageIQ/manageiq/pull/16775 If a hotfix is needed, please request them through the normal process. Verified in 5.10.0.1 |