This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2024093 - Satellite shouldn't reject valid volume attributes with "VM volume attributes are not set properly"
Summary: Satellite shouldn't reject valid volume attributes with "VM volume attributes...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.9.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-17 10:04 UTC by Evgeni Golov
Modified: 2024-06-06 01:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 01:06:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33990 0 Normal New Satellite shouldn't reject valid volume attributes with "VM volume attributes are not set properly" 2021-11-24 07:50:37 UTC
Red Hat Issue Tracker   SAT-18136 0 None Migrated None 2024-06-06 01:06:08 UTC

Description Evgeni Golov 2021-11-17 10:04:29 UTC
Description of problem:
In BZ#1813986 it was reported, that passing "size_gb: <an array>" of volumes_attributes to the compute_resources API will lead to an ISE, and it was fixed by checking that all parameters in "volumes_attributes" are strings (see https://github.com/theforeman/foreman/pull/7873).

This breaks perfectly valid requests that pass "size_gb: 50" (so an Integer) instead of "size_gb: '50'".

Additionally, the request was for a "Meaningful error message, like "Incorrect value of argument 'size_gb'"", but the current implementation just throws "VM volume attributes are not set properly" which neither indicates *which* volume attribute is wrong, neither *what* is wrong about it.

I would consider this a (albeit small) regression in Satellite 6.9 (as this is the first version shipping this code change).

Version-Release number of selected component (if applicable):
Satellite 6.9.7 (but really, anything that's based on Foreman 2.3 or newer)

How reproducible:
100%

Steps to Reproduce:
1. run the following Ansible playbook:
---
- hosts: localhost
  tasks:
    - name: Create compute profiles
      redhat.satellite.compute_profile:
        username: "admin"
        password: "changeme"
        server_url: https://satellite.example.com
        name: test
        compute_attributes:
        - compute_resource: rhevm1
          vm_attrs:
            volumes_attributes:
              0:
                size_gb: 50


Actual results:
fatal: [satellite.example.com]: FAILED! => changed=false 
  error:
    message: 'ERF42-2471 [Foreman::Exception]: VM volume attributes are not set properly'
  msg: 'Error while performing create on compute_attributes: 500 Server Error: Internal Server Error'

Expected results:
It to work.
Or at least give a hint what's wrong.

Additional info:
- I think the API should accept both, Strings and Integers (and probably Booleans?), and only throw an error for *other* types. And then the error should say *which* entry is wrong and what it should look like to be valid.
- In a perfect world, this would be expressed an an Apipie validation in the APIdoc, but I think we don't document possible volumes_attributes at all in the apidoc :(

Comment 1 Evgeni Golov 2021-11-19 09:20:36 UTC
Oh, and throwing that as a 500 Server error is wrong too. It probably should be 422 :unprocessable_entity or something?

Comment 2 Tomer Brisker 2021-11-24 07:50:36 UTC
Created redmine issue https://projects.theforeman.org/issues/33990 from this bug

Comment 3 Brad Buckingham 2023-12-01 18:41:30 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 5 Brad Buckingham 2024-01-09 19:57:37 UTC
Based upon feedback during auto-closure, leaving this bugzilla open a while longer for additional investigation; however, it may be closed in a future iteration.

Comment 6 Eric Helms 2024-06-06 01:06:09 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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