Actions
Bug #15306
closedOrchestration does not roll back queued actions if DB error occurs
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1343058
Description of problem:
If an SQL error occurs upon saving a host, the orchestration actions will still occur.
How reproducible:
Create a host with a missing foreign key (for example environment_id = 999), observe an exception thrown and orchestration leftovers.
Steps to Reproduce:
# 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
Expected results:
The second request succeeds.
Updated by Dominic Cleal almost 9 years ago
- Description updated (diff)
- Category set to Orchestration
- Status changed from New to Assigned
Updated by Dominic Cleal almost 9 years ago
- Status changed from Assigned to Need more information
Updated by Shimon Shtein almost 9 years ago
- Status changed from Need more information to Assigned
Updated by The Foreman Bot almost 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3574 added
Updated by Shimon Shtein almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Updated by Daniel Lobato Garcia almost 9 years ago
- Related to Bug #15644: import_facts assumes orchestration is available added
Updated by Lukas Zapletal almost 9 years ago
- Related to Bug #15645: Change in core leads to undefined method `enable_orchestration!' added
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release changed from 161 to 160
Updated by Timo Goebel over 8 years ago
- Related to Bug #17041: Orchestration not skipped when importing facts added
Updated by Dominic Cleal over 8 years ago
- Related to Bug #16866: Facts import doesn't work with unattended=false added
Updated by Lukas Zapletal about 5 years ago
- Related to Bug #12425: Fact import triggers ip conflicts checks, which drives cpu utilization to 100% on smart-proxy added
Actions