Bug 1483365
Summary: | Editing Name of a Category via API breaks Chargeback Assignments | |||
---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | myoder | |
Component: | Reporting | Assignee: | Gregg Tanzillo <gtanzill> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Nandini Chandra <nachandr> | |
Severity: | urgent | Docs Contact: | ||
Priority: | medium | |||
Version: | 5.7.0 | CC: | cpelland, gtanzill, jhardy, myoder, nachandr, obarenbo, simaishi | |
Target Milestone: | GA | Keywords: | TestOnly, ZStream | |
Target Release: | 5.9.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | chargeback | |||
Fixed In Version: | 5.9.0.1 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1497746 1497748 (view as bug list) | Environment: | ||
Last Closed: | 2018-03-06 14:34:12 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: | 1497746, 1497748 |
Description
myoder
2017-08-21 00:34:20 UTC
Looking at the error and investigating the DB it looks like there was a tag that was referenced in a chargeback rate assignment that was deleted without removing the corresponding assignment. The tag that was deleted is "rhev_teste_tipo1" and it was under the category named "Instance Flavor" To fix this the customer can just add it back using the admin UI as follows - 1. Navigate to "Configuration / Region 1 [1] and click the "My Company Tags" tab. 2. On that page select the category "Instance Flavor" 3. Add a new entry with the name and description of "rhev_teste_tipo1" That should fix the chargeback rate assignment editor. I followed these steps with the customer's DB and I was able to see the assigned compute rates. The reason why the API request caused this still needs to be investigated. I see the request above in the description but it looks like it's incomplete. Can you please ask for the the full contents of the request? If that is the full request please ask what were they expecting to update? New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/dba7bf9ac937db7bfe5c002dfa37365389ae6562 commit dba7bf9ac937db7bfe5c002dfa37365389ae6562 Author: Gregg Tanzillo <gtanzill> AuthorDate: Mon Sep 25 17:55:24 2017 -0400 Commit: Gregg Tanzillo <gtanzill> CommitDate: Fri Sep 29 11:15:22 2017 -0400 Delete tag assignments when deleting a tag that is referenced in an assignment Eg. - Tag to be deleted - /managed/environment/any1 - Referenced in assignment by the tag /chargeback_rate/assigned_to/vm/tag/managed/environment/any1. Which means that a chargeback rate (tagged with the latter) is assigned to any Vm tagged with environment/any1. Should also be deleted https://bugzilla.redhat.com/show_bug.cgi?id=1483365 app/models/classification.rb | 16 +++++++-- app/models/mixins/assignment_mixin.rb | 11 +++++- spec/models/classification_spec.rb | 56 +++++++++++++++++++++++++---- spec/models/mixins/assignment_mixin_spec.rb | 18 ++++++++++ 4 files changed, 91 insertions(+), 10 deletions(-) Before fix: 1)Create a custom category, cat1.Add a tag, tag1 for the category. 2)Assign tag1 to a VM 3)Chargeback assignments , make these selections: Assign to: Tagged VMs and instances Tag Category: cat1 Selections Name: tag11; rate: Default 4)Delete tag1 5)Unable to edit chargeback assignments and error message in logs: After fix 1)Create a custom category, cat1.Add a tag, tag1 for the category. 2)Assign tag1 to a VM 3)Chargeback assignments , make these selections: Assign to: Tagged VMs and instances Tag Category: cat1 Selections Name: tag1; rate: Default 4)Delete tag1 5)No errors in logs and it should be possible to edit chargeback assignments Verified in 5.9.0.8 |