Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-576

Storage_Provider.OPENSTACK_SWIFT does not locate endpoints when regions have lowercase characters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage
    • Labels:
      None

      Description

      I kept getting

      libcloud.common.types.LibcloudError: <LibcloudError in None 'Could not find specified endpoint'>
      

      When trying to connect to my swift installation. I then discovered that lines 127 and 199 of libcloud/storage/drivers/cloudfiles.py indiscriminately convert the region to upper case. I will create a pull request for the trivial change to fix this.

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user zestrada opened a pull request:

        https://github.com/apache/libcloud/pull/311

        LIBCLOUD-576 SWIFT: removed superfulous call to upper() on service_region

        As stated in the jira ticket, OpenStack uses mixed-case regions, but rackspace only has uppercase regions. It seems that as a holdover from supporting cloudfiles all openstack regions were converted to upper, causing endpoint_get to fail.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/zestrada/libcloud LIBCLOUD-576

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/libcloud/pull/311.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #311


        commit b8d276edc4c6c6b9e304040f55ac575fb8551cef
        Author: Zak Estrada <zak@linux.com>
        Date: 2014-06-09T20:44:29Z

        SWIFT: removed superfulous call to upper() on service_region


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user zestrada opened a pull request: https://github.com/apache/libcloud/pull/311 LIBCLOUD-576 SWIFT: removed superfulous call to upper() on service_region As stated in the jira ticket, OpenStack uses mixed-case regions, but rackspace only has uppercase regions. It seems that as a holdover from supporting cloudfiles all openstack regions were converted to upper, causing endpoint_get to fail. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zestrada/libcloud LIBCLOUD-576 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/311.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #311 commit b8d276edc4c6c6b9e304040f55ac575fb8551cef Author: Zak Estrada <zak@linux.com> Date: 2014-06-09T20:44:29Z SWIFT: removed superfulous call to upper() on service_region
        Hide
        zestrada Zak Estrada added a comment - - edited

        The request only changes line 127 since apparently all rackspace regions are uppercase and changing that line breaks unit tests (and potentially users who rely on the automatic conversion).

        Show
        zestrada Zak Estrada added a comment - - edited The request only changes line 127 since apparently all rackspace regions are uppercase and changing that line breaks unit tests (and potentially users who rely on the automatic conversion).
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 2a42270d9548e03a2f98f8e178073fed9101edf1 in libcloud's branch refs/heads/trunk from Zak Estrada
        [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=2a42270 ]

        LIBCLOUD-576 SWIFT: removed superfulous call to upper() on service_region

        Closes #311

        Signed-off-by: Tomaz Muraus <tomaz@apache.org>

        Show
        jira-bot ASF subversion and git services added a comment - Commit 2a42270d9548e03a2f98f8e178073fed9101edf1 in libcloud's branch refs/heads/trunk from Zak Estrada [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=2a42270 ] LIBCLOUD-576 SWIFT: removed superfulous call to upper() on service_region Closes #311 Signed-off-by: Tomaz Muraus <tomaz@apache.org>
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/libcloud/pull/311

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/libcloud/pull/311
        Hide
        kami Tomaz Muraus added a comment -

        This has been merged into trunk.

        Thanks.

        Show
        kami Tomaz Muraus added a comment - This has been merged into trunk. Thanks.

          People

          • Assignee:
            Unassigned
            Reporter:
            zestrada Zak Estrada
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development