Actions
Bug #12623
closedCRs with integer UUIDs cause DB error on VM association: operator does not exist: character varying = integer
Description
Compute resources that return integers from the #identity method of Fog server objects throw an error during VM/host association as Rails tries to compare an integer to a string column.
PGError: ERROR: operator does not exist: character varying = integer LINE 1: ..."hosts"."compute_resource_id" = 1 AND "hosts"."uuid" IN (21) ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. : SELECT COUNT(*) FROM "hosts" WHERE "hosts"."organization_id" IN (1) AND "hosts"."location_id" IN (2) AND "hosts"."type" IN ('Host::Managed') AND "hosts"."compute_resource_id" = 1 AND "hosts"."uuid" IN (21)
This is called from the Host::Managed.for_vm scope.
Reported at https://github.com/theforeman/foreman-one/issues/8 and I suspect it may also affect foreman-digitalocean whose Fog server does the same.
Updated by The Foreman Bot about 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2940 added
Updated by Dominic Cleal about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 3ef29ca2220ee77f77ec50326e330e0c671341e5.
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release set to 104
Actions