Bug 1765132
| Summary: | convert_string_to_bool doesn't deal with array type | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Shira Maximov <mshira> | ||||
| Component: | Compute Resources - RHEV | Assignee: | Shira Maximov <mshira> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Lukáš Hellebrandt <lhellebr> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.6.0 | CC: | egolov, inecas, lhellebr, mmccune, mshira, orabin, saydas, wclark | ||||
| Target Milestone: | 6.7.0 | Keywords: | Regression, Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | tfm-rubygem-fog-ovirt-1.2.3,foreman-1.24.1.9-1 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1814425 (view as bug list) | Environment: | |||||
| Last Closed: | 2020-04-14 13:39:01 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Shira Maximov
2019-10-24 12:24:36 UTC
Created from redmine issue https://projects.theforeman.org/issues/28121 Upstream bug assigned to mshira Adding steps to reproduce: running this following command ( use arrays inside volume, please notice this is not how we usually send our parameters, this is not a vaild input normally) hammer host create --hostgroup ovirt --location tlv --organization redhat --name deleteme1 --ip 192.168.122.78 --volume "capacity=[],wipe_after_delete=[bla]" I'm adding a comment for the steps to reproduce: the hostgroup should relay on an existing hostgroup of ovirt compute resource. Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28121 has been resolved. FailedQA with Sat 6.7 snap 15. These look OK: # hammer host create --hostgroup testgrp --location-id 2 --organization-id 1 --name lhellebr-delme-convert --ip 192.168.122.78 --volume "capacity=[],wipe_after_delete=[bla],storage_domain=<UUID>" Host created. # hammer host create --hostgroup testgrp --location-id 2 --organization-id 1 --name lhellebr-delme-convert5 --ip 192.168.122.81 --volume "size_gb=20,wipe_after_delete=1,storage_domain=c4fc24ba-651a-4db6-a137-c5ad8a4a921f" Also tested if it's possible to create a host through WebUI. It is. However, notice that "capacity" parameter used in the first command and in reproducer in comment 7 is incorrect - it should be "size_gb". When entering an array to "size_gb", I get an error: # hammer host create --hostgroup testgrp --location-id 2 --organization-id 1 --name lhellebr-delme-convert10 --ip 192.168.122.86 --volume "size_gb=[20],wipe_after_delete=[bla],storage_domain=<UUID>" Could not create the host: Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs. Traceback not useful but attached. Created attachment 1669656 [details]
foreman-tail
Hi Lukas, as I wrote in #comment 7, please notice this is not how we usually send our parameters, this is not a valid input normally this BZ only applies to the error: NoMethodError: undefined method `each' for #<Fog::Ovirt::Compute::Interface:0x007f0b76120628> and I gave an easy resporducer for it: hammer host create --hostgroup testgrp --location-id 2 --organization-id 1 --name lhellebr-delme-convert --ip 192.168.122.78 --volume "capacity=[],wipe_after_delete=[bla],storage_domain=<UUID>" but it's not a valid command !!! so, if this command is working properly (even though it's not valid) please verify this BZ. If you want, you can open a new BZ, but it would probably won't get accepted because this is not a valid input. moving back ON_QA for verification based on Shira's comments. If this is inaccurate and we need to keep this bug ASSIGNED, let us know but it does sound like we can file a more minor bug based on the comments above. This bugzilla is about Satellite incorrectly handling array type input where such an input is, itself, incorrect. Examples of such inputs are Shira's comment 7 or my comment 19. Both of those commands are invalid. In case of comment 7, the bug is fixed. In case of comment 19, the bug manifests by a different error message (ISE 500 which is definitely correct behavior). That's not a "fix" I'm willing to verify. I also don't think this should be a blocker. This probably happened because "capacity" is not a correct parameter name so its value was ignored - however, correct parameter name "size_gb" causes the bug to manifest. Maybe Shira forgot about fixing this one since she incorrectly used "capacity". s/definitely correct/definitely incorrect/ I understand the confusion, Please understand, we first found the issue in the UI (not in hammer), and in order to help you and others to review the fix, I created a hammer command reproducer. this hammer command will only be relevant in case we are not entering "size_gb", the reason is the when you enter size_gb it automatically will try to convert the input into int, and if the input is [], then it won't work: https://github.com/fog/fog-ovirt/blob/b676d73c1fce11c67a8dce46f9b5092073bf0dff/lib/fog/ovirt/requests/compute/v4/add_volume.rb that's why I requested to test it with capacity, (you can also test it with other staff, as long is it not on ovirt valid properties) also, this BZ was opened for a specific error message, that error message is not reproducible and you are getting a different one which should probably have it's own BZ. I and Lukas talked and we agreed that he will verify this BZ and open a different issue. thanks. Since Shira is both reporter and assignee of this BZ and she considers my reproducer to be out of scope of this BZ, I'm verifying this (Shira's reproducer doesn't manifest the bug, my reproducer shows different error message). I will report another BZ because ISE is not a correct way to handle incorrect user input. 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-2020:1454 |