| Summary: | CLI - host create produces ISE on providing invalid environment-id | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Roman Plevka <rplevka> |
| Component: | Compute Resources | Assignee: | Shimon Shtein <sshtein> |
| Status: | CLOSED ERRATA | QA Contact: | Roman Plevka <rplevka> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2.0 | CC: | bbuckingham, bkearney, ehelms, inecas, rplevka |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-1.11.0.32-1 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-27 11:07:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 1343058 | ||
| Bug Blocks: | |||
|
Description
Roman Plevka
2016-05-03 16:21:33 UTC
Created redmine issue http://projects.theforeman.org/issues/15154 from this bug Upstream bug component is Compute Resources Moving to POST since upstream bug http://projects.theforeman.org/issues/15154 has been closed FAILED QA: on sat6.2.0 beta (GA14.0) - the patch fixed the 'no implicit conversion of nil into String' error. However the VM is now being created even if wrong Environment is specified and error returned. The VM exists on the Compute resource as shutoff and unmanaged, preventing the 2nd run (with corrected Environment ID) to pass (name already taken). - there should be no action taken until valid parameters are handed over. # hammer host create --name my-cli-host-1 --partition-table-id 61 --domain-id 1 --operatingsystem-id 3 --architecture-id 1 --compute-resource-id 1 --environment-id 999 --puppet-proxy-id 1 --location-id 1 --organization-id 1 --root-password changeme --medium-id 9 [Foreman] Password for admin: Could not create the host: ERROR: insert or update on table "hosts" violates foreign key constraint "hosts_environment_id_fk" DETAIL: Key (environment_id)=(999) is not present in table "environments". [root@sat6 dhcp]# [root@sat6 dhcp]# [root@sat6 dhcp]# hammer host create --name my-cli-host-1 --partition-table-id 61 --domain-id 1 --operatingsystem-id 3 --architecture-id 1 --compute-resource-id 1 --environment-id 999 --puppet-proxy-id 1 --location-id 1 --organization-id 1 --root-password changeme --medium-id 9 [Foreman] Password for admin: Could not create the host: Failed to create a compute my_libvirt_cr_1 (Libvirt) instance my-cli-host-1.domain.com: Error saving the server: Call to virDomainDefineXML failed: operation failed: domain 'my-cli-host-1.domain.com' already exists with uuid 3d1ac10d-fb73-fb16-a3a3-503d7625e042 Opened a separate issue for comment 10 (https://bugzilla.redhat.com/show_bug.cgi?id=1332652#c10) https://bugzilla.redhat.com/show_bug.cgi?id=1343058 MOving this back to ON_QA, Please test this piece and track the new issue in comment 10. VERIFIED on sat6.2.0 beta (GA14.2) 2nd run: hammer -v -u admin -p changeme --output=csv host create --medium-id="9" --root-pass="changeme" --organization-id="1" --location-id="2" --architecture-id="1" --puppet-proxy-id="1" --name="foo4" --environment-id="1" --compute-resource-id="1" --domain-id="1" --operatingsystem-id="3" --partition-table-id="61" [ERROR 2016-06-07 08:47:20 Exception] Failed to create a compute my_libvirt_cr_1 (Libvirt) instance my.sat6.server.com: Error saving the server: Call to virDomainDefineXML failed: operation failed: domain 'my.sat6.server.com' already exists with uuid 7d2711e5-51c4-4dc6-9918-629039a635f4 Could not create the host: Failed to create a compute my_libvirt_cr_1 (Libvirt) instance my.sat6.server.com: Error saving the server: Call to virDomainDefineXML failed: operation failed: domain 'my.sat6.server.com' already exists with uuid 7d2711e5-51c4-4dc6-9918-629039a635f4 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/RHBA-2016:1501 |