Bug 1829239 - Creating invalid image within compute resource is possible
Summary: Creating invalid image within compute resource is possible
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.7.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-29 09:25 UTC by Radek Mynar
Modified: 2021-11-16 14:09 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:09:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 29702 0 Normal Closed Creating invalid image within compute resource is possible 2020-06-08 14:48:28 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:09:31 UTC

Description Radek Mynar 2020-04-29 09:25:16 UTC
Description of problem:

Hammer CLI allows to create invalid (nonexistent) image within compute resource

Version-Release number of selected component (if applicable): hammer (0.19.2.1), Red Hat Satellite (build: 6.7.0)


How reproducible:
always

Steps to Reproduce:
1. Create RHEV (Ovirt) compute resource or use existing 
2. Attempt to add non-existing (invalid) image using hammer CLI
i.e.:
hammer compute-resource image create --compute-resource '<valid cr name>' --name '<valid name>' --username 'valid username' --uuid '<INVALID UUID>' --operatingsystem '<valid os>' --architecture '<valid arch>'

Actual results:
"Image created."

Expected results:
Any reasonable error message is displayed and image not created.

Additional info:
In Sattelite WebUI, there's no UUID selection. But there's a combobox, which offers only available image templates.

Comment 3 Yifat Makias 2020-05-05 10:12:30 UTC
Created redmine issue https://projects.theforeman.org/issues/29702 from this bug

Comment 4 Bryan Kearney 2020-05-05 11:54:20 UTC
Upstream bug assigned to ymakias

Comment 5 Bryan Kearney 2020-05-05 11:54:23 UTC
Upstream bug assigned to ymakias

Comment 6 Bryan Kearney 2020-06-02 12:04:37 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29702 has been resolved.

Comment 8 Lukáš Hellebrandt 2021-07-14 14:07:46 UTC
Verified with Sat 6.10.0 snap 7.0.

# hammer compute-resource image create --compute-resource testrhev --name newimage1 --username root --uuid nonexistent-uuid --operatingsystem-id 1 --architecture x86_64
Could not create the image:
  UUID could not be found in testrhev
# hammer compute-resource image create --compute-resource testrhev --name newimage1 --username root --uuid <existing_uuid> --operatingsystem-id 1 --architecture x86_64
Image created.
# hammer compute-resource image list --compute-resource testrhev
---|-----------|------------------|----------|--------------------------------------|----------
ID | NAME      | OPERATING SYSTEM | USERNAME | UUID                                 | USER DATA
---|-----------|------------------|----------|--------------------------------------|----------
1  | newimage1 | RedHat 7.9       | root     | <existing_uuid>                      | false    
---|-----------|------------------|----------|--------------------------------------|----------

Comment 12 errata-xmlrpc 2021-11-16 14:09:12 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 (Moderate: Satellite 6.10 Release), 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-2021:4702


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