Bug 1658338
| Summary: | Not able to blacklist events for the Openshift Provider | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Satoe Imaishi <simaishi> |
| Component: | Providers | Assignee: | Adam Grare <agrare> |
| Status: | CLOSED ERRATA | QA Contact: | juwatts |
| Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> |
| Priority: | high | ||
| Version: | 5.9.3 | CC: | cpelland, jfrey, jhardy, juwatts, obarenbo |
| Target Milestone: | GA | Keywords: | ZStream |
| Target Release: | 5.9.7 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 5.9.7.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1653871 | Environment: | |
| Last Closed: | 2019-01-23 14:35:55 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | Container Management | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1653871 | ||
| Bug Blocks: | 1658378 | ||
|
Comment 2
CFME Bot
2018-12-14 18:07:00 UTC
Verified in 5.9.7.0.20181217174909_1f8a1d7
Verification Steps:
1) Added a OpenShift provider to the CloudForms appliance
2) On the CloudForms appliance CLI, navigated to /var/www/miq/vmdb/log and tailed evm.log
3) On the OpenShift provider, created a new pod
4) Verified in the evm log, the following message:
[----] I, [2018-12-18T15:32:17.466125 #2278:da910c] INFO -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::EventCatcher::Runner#queue_event) EMS [env-ocp-master-v1.cmqe.lab.eng.rdu2.redhat.com] as [] Queuing event [{:timestamp=>"2018-12-18T20:32:16Z", :kind=>"Pod", :name=>"hello-openshift", :namespace=>"juwatts-test", :reason=>"Created", :message=>"Created container", :uid=>"01d4749e-0304-11e9-b13b-001a4a520006", :event_uid=>"028573dd-0304-11e9-b13b-001a4a520006", :fieldpath=>"spec.containers{hello-openshift}", :container_name=>"hello-openshift", :container_group_name=>"hello-openshift", :container_namespace=>"juwatts-test", :event_type=>"POD_CREATED"}]
5) Verified the blacklisted_event table before adding an event:
irb(main):005:0> ManageIQ::Providers::Openshift::ContainerManager.first.blacklisted_event_names
=> []
irb(main):006:0>
6) On the CloudForms GUI, added POD_CREATED to ems.ems_openshift.blacklisted_event_names in the settings yaml.
:ems_openshift:
:blacklisted_event_names:
- POD_CREATED
:event_handling:
:event_groups:
7) Ran the following command on the CloudForms CLI: systemctl restart evmserverd
8) On the OpenShift provider, created a new pod
9) Verified that the POD_CREATED event in the log is no longer logged
10) Verified an entry is added in the blacklisted_event_names DB table:
irb(main):001:0> ManageIQ::Providers::Openshift::ContainerManager.first.blacklisted_event_names
PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0
=> ["POD_CREATED"]
irb(main):002:0>
11) Removed POD_CREATED from the settings yaml
12) Cleaned the blacklisted_event_name table:
BlacklistedEvent.last.destroy!
13) Ran the following command on the CloudForms CLI: systemctl restart evmserverd
14) Verified the DB has been cleared:
irb(main):001:0> ManageIQ::Providers::Openshift::ContainerManager.first.blacklisted_event_names
PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0
=> []
irb(main):002:0>
15) On the OpenShift provider, created a new pod
16) Verified POD_CREATED is now being displayed in the logs
[----] I, [2018-12-18T16:08:10.767225 #8244:39b110] INFO -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::EventCatcher::Runner#queue_event) EMS [env-ocp-master-v1.cmqe.lab.eng.rdu2.redhat.com] as [] Queuing event [{:timestamp=>"2018-12-18T21:08:10Z", :kind=>"Pod", :name=>"hello-openshift", :namespace=>"juwatts-test", :reason=>"Created", :message=>"Created container", :uid=>"0572e75c-0309-11e9-b13b-001a4a520006", :event_uid=>"0650c58c-0309-11e9-b13b-001a4a520006", :fieldpath=>"spec.containers{hello-openshift}", :container_name=>"hello-openshift", :container_group_name=>"hello-openshift", :container_namespace=>"juwatts-test", :event_type=>"POD_CREATED"}]
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/RHBA-2019:0110 |