Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenStack: Re-enable glance image import #3403

Open
mandre opened this issue Apr 3, 2020 · 5 comments
Open

OpenStack: Re-enable glance image import #3403

mandre opened this issue Apr 3, 2020 · 5 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. platform/openstack

Comments

@mandre
Copy link
Member

mandre commented Apr 3, 2020

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: #3394

This issue tracks re-enabling glance image import.

References

@mandre
Copy link
Member Author

mandre commented Apr 3, 2020

/label platform/openstack

mandre added a commit to mandre/installer that referenced this issue Apr 3, 2020
Add link to the github issue tracking re-enabling of glance image
import:

openshift#3403
vrutkovs pushed a commit to vrutkovs/installer that referenced this issue Apr 13, 2020
Add link to the github issue tracking re-enabling of glance image
import:

openshift#3403
patrickdillon pushed a commit to patrickdillon/installer that referenced this issue Apr 13, 2020
Add link to the github issue tracking re-enabling of glance image
import:

openshift#3403
@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 2, 2020
@mandre
Copy link
Member Author

mandre commented Jul 2, 2020

/lifecycle frozen

@openshift-ci-robot openshift-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 2, 2020
@EmilienM
Copy link
Member

I randomly came across this one and I confirm that if Glance API is not configured with "glance-direct" in enabled_import_methods, the Glance API will reject the request and the image will be queued forever.
Indeed this is not a feature that all clouds offer for various reasons (security mainly?) so at this point it's safe to not rely on it.

@clnperez
Copy link
Contributor

Do we not know what is misconfigured, iow, a way to reliable check? The summary sounds like the presence of glance-direct isn't a guarantee this will work. The last comment has me a bit confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. platform/openstack
Projects
None yet
Development

No branches or pull requests

5 participants