<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Done<br>
    <br>
    Regards,<br>
    Vasco Rodrigues<br>
    <br>
    <div class="moz-cite-prefix">On 02-06-2015 03:02, Huang Zhiteng
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAE7zfpPM_EPysSL2-AGqnyrLXyUtb5Sj2VzBbPvZ+kHUh-71Hw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Not a DB expert but looks like a valid bug.  Do you
        mind file a bug on this?<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Jun 1, 2015 at 5:43 PM, Vasco
          Rodrigues <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:v@vvro.net" target="_blank">v@vvro.net</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Running
            Cinder on postgresql, i get the following error:<br>
            <br>
            2015-06-02 01:21:27.471 32698 DEBUG cinder.api.v2.volumes<br>
            [req-a0a15e07-2a86-4f98-a371-2f7203706b9f<br>
            e8bd9bfef65c4def9d3977993c56b9b0
            9dbebc529a0a469cb4574c3f9c0d86f7 - - -]<br>
            Could not evaluate value 1, assuming string _get_volumes<br>
/usr/lib/python2.7/dist-packages/cinder/api/v2/volumes.py:238<br>
            2015-06-02 01:21:27.471 32698 DEBUG cinder.volume.api<br>
            [req-a0a15e07-2a86-4f98-a371-2f7203706b9f<br>
            e8bd9bfef65c4def9d3977993c56b9b0
            9dbebc529a0a469cb4574c3f9c0d86f7 - - -]<br>
            Searching by: MultiDict([(u'status', u'available'),
            (u'bootable', 1)]).<br>
            get_all
            /usr/lib/python2.7/dist-packages/cinder/volume/api.py:421<br>
            2015-06-02 01:21:27.486 32698 ERROR
            oslo_db.sqlalchemy.exc_filters<br>
            [req-a0a15e07-2a86-4f98-a371-2f7203706b9f<br>
            e8bd9bfef65c4def9d3977993c56b9b0
            9dbebc529a0a469cb4574c3f9c0d86f7 - - -]<br>
            DBAPIError exception wrapped from
            (psycopg2.ProgrammingError) operator<br>
            does not exist: boolean = integer<br>
            LINE 3: ...volumes.status = 'available' AND volumes.bootable
            = 1 AND vo...<br>
                                                                       
             ^<br>
            HINT:  No operator matches the given name and argument
            type(s). You<br>
            might need to add explicit type casts.<br>
            <br>
            <br>
            I think it's because postgresql doesn't allow comparing
            integer to boolean.<br>
            <br>
            Which I fixed by adding:<br>
            <br>
            if 'bootable' in filters:<br>
                       filters['bootable'] = bool(filters['bootable'])<br>
            <br>
            <br>
            to VolumeController._get_volumes<br>
            <br>
            <br>
            Regards,<br>
            Vasco Rodrigues<br>
            <br>
__________________________________________________________________________<br>
            OpenStack Development Mailing List (not for usage questions)<br>
            Unsubscribe: <a moz-do-not-send="true"
href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe"
              target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
            <a moz-do-not-send="true"
              href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
              target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div class="gmail_signature">Regards<br>
          Huang Zhiteng</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>