openshift / openshift/installer

OpenStack: Re-enable glance image import

Open
#3,403 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lifecycle/frozen platform/openstack
Dominant language
Go
Stars
1.6k
Forks
1.5k
Avg merge
5d 5h
Merged PRs (30d)
39

Description

We've seen on a few clouds that glance image import is enabled but configured improperly, leading the installer to block on image import.

When trying to create glance image via import, the image gets stuck in the uploading status and doesn't move to importing and then active as it should.

$ glance import-info
+----------------+----------------------------------------------------------------------------------+
| Property       | Value                                                                            |
+----------------+----------------------------------------------------------------------------------+
| import-methods | {"type": "array", "description": "Import methods available.", "value": ["glance- |
|                | direct", "web-download"]}                                                        |
+----------------+----------------------------------------------------------------------------------+

$ glance image-create-via-import --container-format=bare --disk-format=qcow2 --file /home/centos/rhcos.qcow2 --name rhcos-imported

$ openstack image show rhcos-imported
+------------------+------------------------------------------------------------------+
| Field            | Value                                                            |
+------------------+------------------------------------------------------------------+
| checksum         | None                                                             |
| container_format | bare                                                             |
| created_at       | 2020-04-02T08:00:56Z                                             |
| disk_format      | qcow2                                                            |
| file             | /v2/images/8307a69e-650b-41e8-a622-1969a2f9d95e/file             |
| id               | 8307a69e-650b-41e8-a622-1969a2f9d95e                             |
| min_disk         | 0                                                                |
| min_ram          | 0                                                                |
| name             | rhcos-imported                                                   |
| owner            | ef5bc5a705ee4a33acf95fbd6ca10d8f                                 |
| properties       | locations='[]', os_hash_algo=, os_hash_value=, os_hidden='False' |
| protected        | False                                                            |
| schema           | /v2/schemas/image                                                |
| size             | None                                                             |
| status           | uploading                                                        |
| tags             |                                                                  |
| updated_at       | 2020-04-02T08:00:56Z                                             |
| virtual_size     | None                                                             |
| visibility       | shared                                                           |
+------------------+------------------------------------------------------------------+

Everything seems to point to a misconfiguration of glance. This wouldn't work for example if glance was running behind httpd, or could also be an issue with multiple stores.

However, since we had multiple report of such issue, we decided to switch back to the usual image upload until we're able to detect if the cloud really supports glance direct image import: openshift/installer#3394

This issue tracks re-enabling glance image import.

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with openshift/installer#3394 and the Glance import behavior described here, including the linked Apache HTTPD and multiple-stores documentation. Determine how the installer can detect whether image import is actually supported; done means re-enabling import only for compatible clouds without blocking on images stuck in uploading.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.