← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1452888] Re: Postgresql volume.bootable integer boolean operator error

 

I'm encountering the same issue on Kilo. For me the workaround is to
make cinderclient convert types from int to sql boolean for the
'bootable' parameter:

    def populate_volume_snapshot_id_choices(self, request, context):

        # ...

        if marker:
            qparams['marker'] = marker

        if limit:
            qparams['limit'] = limit

        # ''bootable = 1' workaround
        if 'bootable' in qparams and isinstance(qparams['bootable'], int):
            qparams['bootable'] = 'true' if qparams['bootable'] else 'false'
                                                                                                                        if sort_key is not None:
            if sort_key in SORT_KEY_VALUES:                                                                                     qparams['sort_key'] = sort_key
            else:                                                                                                               raise ValueError('sort_key must be one of the following: %s.'
                                 % ', '.join(SORT_KEY_VALUES))
       # ...

I'm sure the type conversion is not in the right place here but I wasn't
able to find where it should be.

** Also affects: horizon
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1452888

Title:
  Postgresql volume.bootable integer boolean operator error

Status in Cinder:
  New
Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Caught error: (ProgrammingError) operator does not exist: boolean = integer
  LINE 3:  ...volumes.status = 'available' AND volumes.bootable = 1 AND vo...
                                                               
  HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
  SELECT volumes.created_at AS v....

  When navigating to the new instance of a project at horizon

  Openstack Kilo and 14.04 utopic

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1452888/+subscriptions