Bug 1693722
Summary: | Warn when custom attributes contain spaces in their names - they will not work properly in all of reporting | ||
---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Satoe Imaishi <simaishi> |
Component: | Reporting | Assignee: | Joe Rafaniello <jrafanie> |
Status: | CLOSED ERRATA | QA Contact: | Parthvi Vala <pvala> |
Severity: | medium | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> |
Priority: | high | ||
Version: | unspecified | CC: | agrare, dmetzger, fdewaley, gmccullo, jocarter, jprause, jrafanie, lavenel, lsmola, mfeifer, obarenbo, pvala, simaishi |
Target Milestone: | GA | Keywords: | FutureFeature, RFE, ZStream |
Target Release: | 5.10.3 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | 5.10.3.0 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | 1662319 | Environment: | |
Last Closed: | 2019-04-23 07:46:25 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | CFME Core | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1662319 | ||
Bug Blocks: |
Comment 2
CFME Bot
2019-03-29 17:31:22 UTC
Hey Joe, From what I make of the comments on PR(https://github.com/ManageIQ/manageiq/pull/18538), the problem has not been completely fixed, but a warning is logged somewhere when a custom attribute is created with an invalid name. I was able to reproduce this BZ, I tested it by creating CA via both REST API and rails console, but I could not see warning anywhere in any of the logs. Can you tell me which log am I supposed to check? Thanks, Parthvi Parthvi, how are you creating the custom attributes? The methods that are currently raising a deprecation are the common ones used to do this via the custom attribute mixin. If you bypass the mixin and create the custom attribute directly, it will not log a deprecation warning. I created them via REST API and rails console. 1) via REST API POST /api/vms/:id/custom_attributes Query: { "action" : "add", "resources" : [ { "name" : "CA with space API", "value" : "value not displayed API" }, { "name" : "CAwithoutspaceAPI", "value" : "value displayed API" } ] } 2) via Rails Console: $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new) vm = $evm.vmdb('vm').find_by_name(:vm_name) vm.custom_set(key, value) I am not sure if any of these used custom attribute mixin. If they did not, can you tell me how to create the custom attribute via mixin? Forgot to do it in the last comment #5, so adding a needinfo here. !) this will not raise a deprecation yet 2) this will raise a deprecation config.active_support.deprecation in vmdb/config/environments/production.rb is set to :notify by default. Change it to :log to see the deprecations in the rails log, matching the environment, probably production.log. When people develop their automate code in development mode, this is the default and it will be seen without changing anything. FIXED. Verified the fix for BZ on 5.10.3. The production log logs warning when invalid CA name is set. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:0796 |