Bug 1507240

Summary: Classification validation errors in seeding keep server from starting
Product: Red Hat CloudForms Management Engine Reporter: Ryan Spagnola <rspagnol>
Component: ApplianceAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED CURRENTRELEASE QA Contact: luke couzens <lcouzens>
Severity: low Docs Contact:
Priority: low    
Version: 5.8.0CC: abellott, gmccullo, gtanzill, jhardy, lcouzens, obarenbo, rspagnol, simaishi, smallamp
Target Milestone: GAKeywords: Reopened, TestOnly
Target Release: 5.10.0   
Hardware: All   
OS: All   
Whiteboard: upgrade:black
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1519875 1523402 (view as bug list) Environment:
Last Closed: 2018-06-21 20:51:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1519875, 1523402    

Description Ryan Spagnola 2017-10-28 15:56:28 UTC
Description of problem:
After applying hotfix (supplied by Red Hat support in previous case 01938800) in our PTE/PRD environment, the EVM server process on our WebUI node is in endless loop of stopping/stopping


Version-Release number of selected component (if applicable):
5.8.1.5

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
[----] I, [2017-10-27T17:23:42.550503 #11095:411130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_HOST
[----] I, [2017-10-27T17:23:42.550523 #11095:411130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_HOST_ALL_TAKEN
[----] I, [2017-10-27T17:23:42.550570 #11095:411130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_NAME
[----] I, [2017-10-27T17:23:42.550589 #11095:411130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_NAMES_ALL_TAKEN
[----] I, [2017-10-27T17:23:42.554692 #11095:411130]  INFO -- :                 - HOST_INSTALL_IN_PROGRESS_ERROR
[----] I, [2017-10-27T17:23:42.555223 #11095:411130]  INFO -- :                 - SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_WITH_ERROR
[----] I, [2017-10-27T17:23:42.561359 #11095:411130]  INFO -- :                 - VM_DOWN_ERROR
[----] I, [2017-10-27T17:23:42.561390 #11095:411130]  INFO -- :                 - VM_PAUSED_ERROR
[----] I, [2017-10-27T17:23:42.563436 #11095:411130]  INFO -- :                 - IRS_DISK_SPACE_LOW_ERROR
[----] I, [2017-10-27T17:23:42.563582 #11095:411130]  INFO -- :                 - SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_WITH_ERROR
[----] I, [2017-10-27T17:23:42.564455 #11095:411130]  INFO -- :                 - STORAGE_DOMAIN_ERROR
[----] E, [2017-10-27T17:23:54.663627 #11095:411130] ERROR -- : [ActiveRecord::RecordNotSaved]: You cannot call create unless the parent is saved  Method:[rescue in block (2 levels) in seed]
[----] E, [2017-10-27T17:23:54.663723 #11095:411130] ERROR -- : /opt/rh/cfme-gemset/gems/activerecord-5.0.3/lib/active_record/associations/collection_association.rb:488:in `_create_record'
[----] I, [2017-10-27T17:23:58.428237 #11245:4f3134]  INFO -- : MIQ(Vmdb::Loggers.apply_config) Log level for rhevm.log has been changed to [ERROR]
[----] I, [2017-10-27T17:24:05.312426 #11267:41913c]  INFO -- : MIQ(Vmdb::Loggers.apply_config) Log level for rhevm.log has been changed to [ERROR]
[----] I, [2017-10-27T17:24:11.467155 #11282:1249130]  INFO -- : MIQ(Vmdb::Loggers.apply_config) Log level for rhevm.log has been changed to [ERROR]
[----] I, [2017-10-27T17:24:18.956394 #11282:1249130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_HOST
[----] I, [2017-10-27T17:24:18.956410 #11282:1249130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_HOST_ALL_TAKEN
[----] I, [2017-10-27T17:24:18.956426 #11282:1249130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_NAME
[----] I, [2017-10-27T17:24:18.956442 #11282:1249130]  INFO -- :                 - HOST_REGISTER_ERROR_UPDATING_NAMES_ALL_TAKEN
[----] I, [2017-10-27T17:24:18.960508 #11282:1249130]  INFO -- :                 - HOST_INSTALL_IN_PROGRESS_ERROR
[----] I, [2017-10-27T17:24:18.961070 #11282:1249130]  INFO -- :                 - SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_WITH_ERROR
[----] I, [2017-10-27T17:24:18.967077 #11282:1249130]  INFO -- :                 - VM_DOWN_ERROR
[----] I, [2017-10-27T17:24:18.967110 #11282:1249130]  INFO -- :                 - VM_PAUSED_ERROR
[----] I, [2017-10-27T17:24:18.969121 #11282:1249130]  INFO -- :                 - IRS_DISK_SPACE_LOW_ERROR
[----] I, [2017-10-27T17:24:18.969252 #11282:1249130]  INFO -- :                 - SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_WITH_ERROR
[----] I, [2017-10-27T17:24:18.970039 #11282:1249130]  INFO -- :                 - STORAGE_DOMAIN_ERROR

Comment 3 Greg McCullough 2017-10-29 22:45:34 UTC
At the moment I think the best work-around is for them to change the Description field of the default "Workload" catalog to "Function" (matching the name "function") and then create their own "Workload" category and tags.

This will allow seeding to work since it is doing the lookup by name "function".  It will find the proper classification and skip seeding for that category so the description field will not be updated

Comment 7 CFME Bot 2017-11-30 17:16:38 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b093edafebe5b8a6ce0312f1f9bf503fd2c2a833

commit b093edafebe5b8a6ce0312f1f9bf503fd2c2a833
Author:     Chris Arcand <chris>
AuthorDate: Thu Nov 30 09:52:43 2017 -0600
Commit:     Chris Arcand <chris>
CommitDate: Thu Nov 30 09:52:43 2017 -0600

    Skip seeding of categories if their creation is invalid
    
    Warning: This is somewhat hacky and definitely an exception in what
    we've deemed 'standard practice' with our unusual seeding procedure.
    
    This change skips seeding of categories in the event that creating them
    would be invalid - and they would be invalid because people would like
    to use their own categories with the same name. Because categories here
    in seeding are looked up via name (delegated to tag), a new category
    with the same name is attempted to be made, fails silently, and gives a
    weird error when entries are attempted to be added to an initialized but
    unpersisted category record.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1507240

 app/models/classification.rb       | 17 ++++++++++-------
 spec/models/classification_spec.rb | 12 ++++++++++++
 2 files changed, 22 insertions(+), 7 deletions(-)

Comment 13 luke couzens 2018-06-21 10:10:12 UTC
Verified in 5.10.0.1