Implement a near real-time refresh for ManageIQ that provides OpenStack #23589
Replies: 8 comments 27 replies
-
We are also facing a similar challenge with near real-time refresh, and I noticed that the current ManageIQ documentation does not specifically cover this use case. From earlier discussions with the MIQ team, my understanding is that if the Event Catcher is connected, enabled, and properly configured, any captured event should trigger a targeted refresh of the corresponding resource in the MIQ database. @ManageIQ Team — if possible, could you kindly list all the prerequisites and configuration steps required in MIQ to ensure immediate refresh for new resources? Many users seem to encounter similar issues, so it would be helpful to confirm whether this feature is working as designed and that our challenges are due to configuration mismatches — or if there are any known issues/bugs in this area. Having this documented in the official MIQ docs would be extremely valuable for the community. |
Beta Was this translation helpful? Give feedback.
-
Oh how strange - I wrote up a whole response here a few days ago on my phone and it's not here 😭 . Seems I never hit send 🤦 |
Beta Was this translation helpful? Give feedback.
-
Near real time is a function of what the provider itself supports. For example in VMware and Kubernetes they have an API where they stream changes to us, and those changes are very granular. There's are roughly 3 types of refreshes. The worst is just scheduled, which is we do a full refresh on a schedule. Next, a little better, if events are available we do event based refreshes, which could be full or targeted depending on the event content. The best is streaming is that API is available as described above. Right now open stack is the middle one (@agrare keep me honest here). You can see the refresh event handlers here. I'm not sure if openstack itself supports that kind of streaming API... If so, we can definitely move towards the streaming refresher which is the near real time one. If open stack does not have that kind of streaming API, that's probably what you'll have to implement first in upstream openstack. |
Beta Was this translation helpful? Give feedback.
-
Hi All, I’ve been working on enabling OpenStack events in my ManageIQ production environment. I followed the documented steps to configure the event catcher, and I can now see that events are being queued and processed. Here are some sample logs from my environment:
From what I can see: 1.) The event catcher (ManageIQ::Providers::Openstack::CloudManager::EventCatcher) is picking up the OpenStack events. 2.) Events are being queued (MiqQueue.put) and then dequeued for processing. 3.) EmsEventHelper#before_handle confirms that the event is being processed. So, it looks like the event pipeline is working in production. How can I enable targeted refresh for OpenStack in my production ManageIQ? I already have the OpenStack provider added and events seem to be coming in. Do I need to change any settings, or does targeted refresh work automatically once events are received? |
Beta Was this translation helpful? Give feedback.
-
Hi @agrare as per the discussion above, we merged the PR and tested the results, here the results are,
network_id key and values are added, but it isn't updated in the db entries. |
Beta Was this translation helpful? Give feedback.
-
Hi @agrare,
|
Beta Was this translation helpful? Give feedback.
-
Yes @agrare its working now, i modify the file little bit and now it's fine, file: app/models/manageiq/providers/openstack/network_manager/event_target_parser.rb
is this file is ok? And what we can do for the volumes? |
Beta Was this translation helpful? Give feedback.
-
Dear @agrare, I’m a colleague of @lucky-sideburn and I’d like to provide an update with some additional details from our side regarding our ManageIQ Radjabov-1 setup. We are currently running ManageIQ Radjabov-1, and OpenStack Epoxy, in a dedicated docker-compose environment used for testing and development. Environment DetailsOur setup includes the following core containers:
Provider ConfigurationBelow is our configuration for the OpenStack provider connection using RabbitMQ (AMQP) inside :workers:
:worker_base:
:event_catcher:
:defaults:
:poll: 0.5.seconds
:poll_method: normal
:ems_event_page_size: 200
:ems_event_thread_shutdown_timeout: 30.seconds
:memory_threshold: 3.gigabytes
:heartbeat_freq: 15.seconds
:event_catcher_openstack_service: "auto"
:event_catcher_openstack:
:count: 2
:poll: 0.3.seconds
:amqp_hostname: "dashboard.xaaslab.it"
:amqp_username: "manageiq_ro"
:amqp_password: "Password"
:amqp_port: 5672
:ems:
:ems_openstack:
:excon:
:omit_default_port: true
:read_timeout: 180
:ems_refresh:
:openstack:
:is_admin: true
:heat:
:is_global_admin: false
:inventory_object_refresh: true
:allow_targeted_refresh: true
:openstack_network:
:is_admin: true
:inventory_object_refresh: true
:allow_targeted_refresh: true
:cinder:
:is_admin: true
:inventory_object_refresh: true
:allow_targeted_refresh: true After configuring everything, I added the OpenStack provider in ManageIQ, validated both the provider and AMQP connection, and confirmed they were working correctly. Then I created a Cloud Tenant (with tenant mapping enabled) — the corresponding OpenStack Project was successfully created as expected. EventCatcher Issue and TroubleshootingThe EventCatcher worker doesn’t seem to function properly. We confirmed that the AMQP connection and event publishing from OpenStack are working correctly by successfully testing with a standalone Python consumer, ruling out any configuration issues on the OpenStack side. In the RabbitMQ logs, I can see it connects periodically and immediately disconnects, without transferring any data:
Furthermore, an analysis with tcpdump confirmed that traffic packets are only exchanged during the initial MIQ connection, validation, and provider addition. After that, we see no subsequent traffic, which strongly supports the theory that the EventCatcher worker is failing and closing the connection immediately. From the ManageIQ logs (
The error suggests the EventCatcher starts but fails because the The provider is correctly configured and visible from the Rails console: ManageIQ::Providers::Openstack::CloudManager.all
=> [#<ManageIQ::Providers::Openstack::CloudManager id: 12, name: "devstack", tenant_mapping_enabled: true, enabled: true>] However, the EventCatcher worker is not found when checking the workers table, confirming the immediate termination: MiqWorker.where(:type => "ManageIQ::Providers::Openstack::CloudManager::EventCatcher").pluck(:id, :status, :pid, :queue_name)
=> [] It looks like the worker cannot correctly fetch the OpenStack provider ID during startup. We can also provide screenshots of the Web GUI showing the data input for adding the provider and the provider status page, if that helps in the diagnosis. Could you please confirm whether this might be caused by a misconfiguration, or if there’s a known issue with the provider ID lookup in Radjabov-1, especially in a containerized/docker-compose environment? Thanks again for your help and time, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear ManageIQ Team,
I am working for an important customer in the telecom sector. We are currently using ManageIQ (Petrosian version, planning to upgrade to Radjabov) and OpenStack (Epoxy version).
Could you please advise on the best way to implement a near real-time refresh? We would like to minimize the delay for new resources created in OpenStack.
To clarify, at the moment we do not plan to have too many providers. We will have two OpenStack instances managed by ManageIQ, each with approximately 100 VMs (ranging from 1 to 10 VMs per instance).
Thank you in advance for your guidance.
Best Regards,
Eugenio M.
Beta Was this translation helpful? Give feedback.
All reactions