Project

General

Profile

Actions

Bug #12623

closed

CRs with integer UUIDs cause DB error on VM association: operator does not exist: character varying = integer

Added by Dominic Cleal over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by The Foreman Bot over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2940 added
Actions #2

Updated by Dominic Cleal over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Dominic Cleal over 8 years ago

  • translation missing: en.field_release set to 104
Actions

Also available in: Atom PDF