Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1620094 - 'Associate VM' works but 'Associate VMs' does not
Summary: 'Associate VM' works but 'Associate VMs' does not
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.4.0
Assignee: orabin
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-22 12:48 UTC by Lukáš Hellebrandt
Modified: 2019-11-05 23:33 UTC (History)
8 users (show)

Fixed In Version: tfm-rubygem-fog-ovirt-1.1.2,foreman-1.18.0.19-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 18:55:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24746 0 Normal Closed 'Associate VM' works but 'Associate VMs' does not 2020-05-07 19:20:32 UTC

Description Lukáš Hellebrandt 2018-08-22 12:48:25 UTC
Description of problem:
It is possible to associate certain VM from a CR by going to VMS, opening VM details and clicking 'Associate VM'. However, clicking 'Associate VMs' on a VM list doesn't associate anything and says 'No VMs matched any host.' even when there is a matching Foreman host.

Version-Release number of selected component (if applicable):
Tested with Sat 6.4 snap 18 with RHEV CR.

How reproducible:
Deterministic

Steps to Reproduce:
1. Have a VM on CR
2. Create a Host in Foreman with MAC == VM_mac
3. Infrastructure -> Compute Resources -> <CR> -> Virtual Machines -> Associate VMs
4. "No VMs matched any host." green pop-up
5. Open the VM and click 'Associate VM', it gets associated

Actual results:
VM only gets associated when attempting to associate that certain VM as opposed to trying all the VMs

Expected results:
The VM should have been associated at step 3

Additional info:
In /usr/share/foreman/app/services/compute_resource_host_associator.rb , line 13, compute_resource.vms(:eager_loading => true) returns []

Comment 2 Lukáš Hellebrandt 2018-08-27 10:40:27 UTC
Yes, this is a regression. Tried with Sat 6.3.3.

Comment 5 Ivan Necas 2018-08-29 17:00:18 UTC
@Lukas: is this happening with RHV API v3 as well as v4?

Comment 6 orabin 2018-08-29 18:22:57 UTC
Created redmine issue https://projects.theforeman.org/issues/24746 from this bug

Comment 7 Satellite Program 2018-08-29 20:13:33 UTC
Upstream bug assigned to orabin

Comment 8 Satellite Program 2018-08-29 20:13:37 UTC
Upstream bug assigned to orabin

Comment 9 Lukáš Hellebrandt 2018-08-30 08:32:24 UTC
Ivan, I thought so but now I tested again to make sure and it only happens with v4 (I had my "rhev-v3" CR set to use v4...)

That means this bug is still valid, but only for v4 and is NOT a regression.

Comment 10 Satellite Program 2018-08-30 18:13:31 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24746 has been resolved.

Comment 13 Lukáš Hellebrandt 2018-09-12 12:14:18 UTC
Verified with Sat 6.4 snap 21.

Used reproducer from OP with both APIv3 and APIv4. Also verified that listing VMs isn't broken and associating a specific VM isn't broken.

Comment 14 Bryan Kearney 2018-10-16 18:55:00 UTC
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-2018:2927


Note You need to log in before you can comment on or make changes to this bug.