Bug 1508437
| Summary: | Label->Tag mapping doesn't unassign last tag(s) | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Beni Paskin-Cherniavsky <cben> | |
| Component: | Providers | Assignee: | Beni Paskin-Cherniavsky <cben> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | juwatts | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 5.9.0 | CC: | cben, epacific, gblomqui, jfrey, jhardy, obarenbo, simaishi | |
| Target Milestone: | GA | Keywords: | TestOnly | |
| Target Release: | 5.10.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | container | |||
| Fixed In Version: | 5.10.0.0 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1510095 1510096 (view as bug list) | Environment: | ||
| Last Closed: | 2018-06-21 21:09:21 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | Bug | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | Container Management | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1510095, 1510096 | |||
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set the severity to Low. Setting severity medium, but if somebody relies strongly on tag mapping, this could be high. New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/5bc81aa9802a22fb4b2f9cf114d144f51f0ebdf1 commit 5bc81aa9802a22fb4b2f9cf114d144f51f0ebdf1 Author: Beni Cherniavsky-Paskin <cben> AuthorDate: Wed Nov 1 14:32:22 2017 +0200 Commit: Beni Cherniavsky-Paskin <cben> CommitDate: Wed Nov 1 14:32:22 2017 +0200 Do unassign tags when mapped tags list becomes empty .blank? check was a bug, it also skipped retagging given empty array. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1508437 app/models/ems_refresh/save_inventory.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/61a5961565c2db7f3c8a272cc886a000d6a3e2e2 commit 61a5961565c2db7f3c8a272cc886a000d6a3e2e2 Author: Beni Cherniavsky-Paskin <cben> AuthorDate: Mon Nov 13 13:51:55 2017 +0200 Commit: Beni Cherniavsky-Paskin <cben> CommitDate: Mon Nov 13 14:07:35 2017 +0200 Improve save_tags_inventory tests Use factory for more realistic setup. Add test for https://bugzilla.redhat.com/show_bug.cgi?id=1508437 .../save_inventory/save_tags_inventory_spec.rb | 51 ++++++++++++++++++---- 1 file changed, 43 insertions(+), 8 deletions(-) New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/1509ecb221d1d5c138c4dc8b264dd35303071964 commit 1509ecb221d1d5c138c4dc8b264dd35303071964 Author: Beni Cherniavsky-Paskin <cben> AuthorDate: Mon Nov 20 15:27:40 2017 +0200 Commit: Beni Cherniavsky-Paskin <cben> CommitDate: Mon Nov 20 15:27:40 2017 +0200 Fix save_tags_inventory spec: assign the tag, not the catogory In #16453, I changed this spec to "realistically" create a tag mapping + category + tag. But I made a typo/thinko, taking the parent (category) tag to be assigned to the vm. This caused false failure for #16449 and days of lost work debugging/rewriting it, eventually caused similar failure in the rewrite too :-( https://bugzilla.redhat.com/show_bug.cgi?id=1508437 spec/models/ems_refresh/save_inventory/save_tags_inventory_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) |
Description of problem: When label->tag mapping has assigned some tag(s) to an object, and a later refresh should remove them all, eg. because the the labels have changed, it doesn't. Version-Release number of selected component (if applicable): bug on master, 5.9, 5.8. (5.7 not affected) According to code, affects mapping for both openshift and amazon, but I only tested openshift. For openshift on master & 5.9, only affects the old inventory_object_refresh=false mode; tag mapping for graph refresh mode still WIP, but will not be affected. How reproducible: 100% Steps to Reproduce: 1. Top right menu ↓ Configuration -> Settings accordion -> Region -> Tags tab -> Map Tags subtab. Create a mapping: Entity: <All>, Label: foo, Category: Foo 2. Assign `foo` label to something in openshift, e.g.: oc label rc -n default router-1 foo=bar 3. Refresh the provider, wait for it to finish. 4. Find the entity you labelled in UI, confirm it got tagged: "My Company Tags | Foo: bar". 5. Unassign the label: oc label rc -n default router-1 foo- 6. Refresh the provider, wait for it to finish. Check tags again in UI. Actual results: It remains tagged "Foo: bar". Expected results: Should show "No My Company Tags have been assigned".