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.
Created redmine issue https://projects.theforeman.org/issues/29702 from this bug
Upstream bug assigned to ymakias
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29702 has been resolved.
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 ---|-----------|------------------|----------|--------------------------------------|----------
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