-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix disable CloudTenant Vm targeted refresh #213
Conversation
@aufi thanks for the fix! also the targeted refresh vcr needs to be updated :) |
539c2cf
to
0152f96
Compare
Vm tagreted refresh queued related Cloud Tenant refresh, that could fail due to keystone v3 backend in fog or an issue in fog/openstack method get_project_by_id. Adding custom method to get_project derived from list_project. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538741
0152f96
to
34de6c3
Compare
Checked commit aufi@34de6c3 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb
|
@mansam Yes, thanks, based on @Ladas feedback, I trying find a way with performing custom get_project query, but didn't reach working auth (still getting 403 with https://gist.github.com/aufi/d014cc327081a709fcdef328b3444cb7). So decided to use list_projects and filter it in ruby, planning to fix it in more nice way updating fog with fog/fog-openstack#358 |
@@ -254,7 +254,7 @@ def infer_related_cloud_tenant_ems_refs_db! | |||
|
|||
def infer_related_cloud_tenant_ems_refs_api! | |||
tenants.each do |tenant| | |||
add_simple_target(:cloud_tenants, tenant.try(:parent_id)) unless tenant.try(:parent_id).blank? | |||
add_simple_target!(:cloud_tenants, tenant.try(:parent_id)) unless tenant.try(:parent_id).blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mansam I've got error here without exclamation mark, so added it, is it ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aufi yep!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, we can't have a better fix now, since it;s broken inside fog-openstack
Fix disable CloudTenant Vm targeted refresh (cherry picked from commit e34789f) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1539874
Gaprindashvili backport details:
|
Vm targeted refresh queued related Cloud Tenant refresh, that could fail due to
keystone v3 backend in fog or an issue in fog/openstack method get_project_by_id.
Queueing CloudTenant doesn't seem to be actually needed - disabled now and we should
make a cleanup in ongoing PR.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538741