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 1622989 - APIv4 provisioning through Hammer: "Cannot add VM. Quota is not valid."
Summary: APIv4 provisioning through Hammer: "Cannot add VM. Quota is not valid."
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: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On: 1613740
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-28 10:39 UTC by Lukáš Hellebrandt
Modified: 2019-11-05 23:33 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-fog-ovirt-1.1.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:02:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lukáš Hellebrandt 2018-08-28 10:39:28 UTC
Description of problem:
When creating a new VM on RHEV through Hammer using CR with APIv4=true, the following error occurs:

Could not create the host:
  Failed to create a compute rhev-4 (RHV) instance lh-host-hammer-image-based-apiv3-8.example.com: Fault reason is "Operation Failed". Fault detail is "[Cannot add VM. Quota is not valid.]". HTTP response code is 400.

This happens with both image based and network based provisioning.

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

How reproducible:
Deterministic

Steps to Reproduce:
# hammer host create --architecture ... --compute-prile-id ... --compute-resource-id ... --content-source-id ... --content-view-id ... --domain-id ... --environment-id ... --interface compute_network=<rhev_network_uuid>,ip=...,managed=true,primary=true,provision=true --ip ... --lifecycle-environment-id ... --location-id ... --name ... --operatingsystem-id ... --organization-id ... --partition-table-id ... --product-id ... --provision-method image --root-password ... --subnet-id ... --image-id ... --compute-attributes start=1


Actual results:
Could not create the host:
  Failed to create a compute rhev-4 (RHV) instance lh-host-hammer-image-based-apiv3-8.example.com: Fault reason is "Operation Failed". Fault detail is "[Cannot add VM. Quota is not valid.]". HTTP response code is 400.

Expected results:
No error, VM successfully created and provisioned

Additional info:
There are also other open BZs related to Quotas in Hammer.

Comment 2 orabin 2018-08-28 18:01:48 UTC
Was the CR created from hammer?

If so it's because of: https://bugzilla.redhat.com/show_bug.cgi?id=1583242.
If that's the case the CR needs to be edited from the UI, click "Test Connection" and save. After that please try to create the host again.

Comment 3 Lukáš Hellebrandt 2018-08-29 07:49:06 UTC
The CR has NOT been created through Hammer. Also, when I just switch it to v3 and change nothing else, it works. When I switch it back to v4, it does not again.

Comment 4 orabin 2018-08-29 21:39:11 UTC
I was able to reproduce and what I saw is that the cluster selected was in a different datacenter then the quota.
The error is because of the mismatch between the quota and the cluster's datacenter.

This is caused by: https://bugzilla.redhat.com/show_bug.cgi?id=1613740 which has a suggested fix open and under review.

I'm adding that bug to the "depends on" field and this can be moved to on_qa once the other bug is solved.

Comment 5 Ivan Necas 2018-09-04 10:49:01 UTC
Based on https://bugzilla.redhat.com/show_bug.cgi?id=1620094, I'm moving this to Modified, as https://bugzilla.redhat.com/show_bug.cgi?id=1613740 is getting modified as well

Comment 6 Lukáš Hellebrandt 2018-09-13 10:03:09 UTC
Verified with Sat 6.4 snap 21 with both image based and network based provisioning. The VMs got created successfully.

Comment 7 Bryan Kearney 2018-10-16 19:02:30 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.