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

Unable to fetch images list in Google Compute Engine

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.14.0-beta3
    • Fix Version/s: None
    • Component/s: Compute
    • Labels:
    • Environment:

      Ubuntu 14.04

      Description

      I have followed the documentation to create a driver for gce with the required pem files and email id, but I am unable to specifically run gce.list_images() for some reason.

      Every other command works fine.

        Activity

        Hide
        kami Tomaz Muraus added a comment -

        Might be a permissions issue.

        What exception do you get? Can you please also gist the debug output as described at https://libcloud.readthedocs.org/en/latest/troubleshooting.html#debugging ?

        /cc Eric Johnson

        Show
        kami Tomaz Muraus added a comment - Might be a permissions issue. What exception do you get? Can you please also gist the debug output as described at https://libcloud.readthedocs.org/en/latest/troubleshooting.html#debugging ? /cc Eric Johnson
        Hide
        siimphh Siim Põder added a comment -

        I probably had the same problem and I think it's a documentation problem. gce.list_images() will return an empty list unless you have created images specifically in this project - the "global" images are not listed. You need to know and list specific other project names to find the public images.

        gcloud/gcutil take care of this and the docs mention this only in passing, but see:
        https://cloud.google.com/compute/docs/operating-systems

        The projects (such as debian-cloud) that gce.list_images() needs to be called fro are listed in the resource urls.

        Show
        siimphh Siim Põder added a comment - I probably had the same problem and I think it's a documentation problem. gce.list_images() will return an empty list unless you have created images specifically in this project - the "global" images are not listed. You need to know and list specific other project names to find the public images. gcloud/gcutil take care of this and the docs mention this only in passing, but see: https://cloud.google.com/compute/docs/operating-systems The projects (such as debian-cloud) that gce.list_images() needs to be called fro are listed in the resource urls.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user erjohnso opened a pull request:

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

        LIBCLOUD-602 improve gce.image_list()

        Improves the GCE driver's `list_images()` method to actually return what the user would expect; a list of vendor supported operating system images including what they have on their own project. The default behavior now returns on non-deprectated images, but a full list can be returned using the `ex_include_deprecated` param.

        Although this changes the behavior of `list_images()`, it more closely matches the behavior of GCE's command-line utility `gcloud compute` that is part of the Cloud SDK package[1]. It is also more likely what the user wants to see anyway.

        [1] https://cloud.google.com/sdk/

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

        $ git pull https://github.com/erjohnso/libcloud LIBCLOUD_602_gce_list_images

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

        https://github.com/apache/libcloud/pull/423.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 #423


        commit 1204039941ce8aa81e4b50d686e679c05287b6f1
        Author: Eric Johnson <erjohnso@google.com>
        Date: 2014-12-30T20:04:52Z

        LIBCLOUD-602 improve gce.image_list()


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user erjohnso opened a pull request: https://github.com/apache/libcloud/pull/423 LIBCLOUD-602 improve gce.image_list() Improves the GCE driver's `list_images()` method to actually return what the user would expect; a list of vendor supported operating system images including what they have on their own project. The default behavior now returns on non-deprectated images, but a full list can be returned using the `ex_include_deprecated` param. Although this changes the behavior of `list_images()`, it more closely matches the behavior of GCE's command-line utility `gcloud compute` that is part of the Cloud SDK package [1] . It is also more likely what the user wants to see anyway. [1] https://cloud.google.com/sdk/ You can merge this pull request into a Git repository by running: $ git pull https://github.com/erjohnso/libcloud LIBCLOUD_602_gce_list_images Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/423.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 #423 commit 1204039941ce8aa81e4b50d686e679c05287b6f1 Author: Eric Johnson <erjohnso@google.com> Date: 2014-12-30T20:04:52Z LIBCLOUD-602 improve gce.image_list()
        Hide
        erjohnso Eric Johnson added a comment -

        Sorry for the long delay / silence.

        Having time to really look into it more, I've put together https://github.com/apache/libcloud/pull/423 to make `list_images` more useful and consistent with Google's Cloud SDK utility. After this PR is merged, calls to `list_images` will return the list of supported vendor images (debian-cloud, ubuntu-os-cloud, centos-cloud, etc) along with any images the user has on their own project. Be default, only "current" images are returned, but the user can pass in True for `ex_include_deprecated` to get a full list.

        Show
        erjohnso Eric Johnson added a comment - Sorry for the long delay / silence. Having time to really look into it more, I've put together https://github.com/apache/libcloud/pull/423 to make `list_images` more useful and consistent with Google's Cloud SDK utility. After this PR is merged, calls to `list_images` will return the list of supported vendor images (debian-cloud, ubuntu-os-cloud, centos-cloud, etc) along with any images the user has on their own project. Be default, only "current" images are returned, but the user can pass in True for `ex_include_deprecated` to get a full list.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 71e38407e485d743074982488587680faad9bb1a in libcloud's branch refs/heads/trunk from Eric Johnson
        [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=71e3840 ]

        [google compute] list_images() returns all non-deprecated images by default

        Closes LIBCLOUD-602
        Closes #423

        Signed-off-by: Eric Johnson <erjohnso@google.com>

        Show
        jira-bot ASF subversion and git services added a comment - Commit 71e38407e485d743074982488587680faad9bb1a in libcloud's branch refs/heads/trunk from Eric Johnson [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=71e3840 ] [google compute] list_images() returns all non-deprecated images by default Closes LIBCLOUD-602 Closes #423 Signed-off-by: Eric Johnson <erjohnso@google.com>
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

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

          People

          • Assignee:
            erjohnso Eric Johnson
            Reporter:
            ajatix Ajay Viswanathan
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development