Cannot launch an instance via Horizon and not via microstack command

Bug #1951958 reported by David mourereau
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
MicroStack
In Progress
Medium
Billy Olsen

Bug Description

Once microstack --devmode installed and init.

I can easily create my instance via microstack launch crrros.

But when using horizon igot the following error:

Error: Failed to perform requested operation on instance "test2", the instance has an error status: Please try again later [Error: Build of instance 3548b840-fa73-430b-85f7-c965364ad2fc aborted: Invalid input received: Invalid image identifier or unable to access requested image. (HTTP 400) (Request-ID: req-421c545d-59ea-4f00-8fa1-ec375962b86c)].

Thank you for your support,

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Not sure what's going on here. Can you provide some of the nova and glance logs involved here?

journalctl -u snap.microstack.nova-compute -u snap.microstack.nova-api -u snap.microstack.glance-api

Additionally, a microstack.openstack image list would be helpful

Changed in microstack:
status: New → Incomplete
Revision history for this message
Lasse Gustafsson (klicken) wrote :
Download full text (38.6 KiB)

I have the exact same problem.
This is the logs from when I try to launch a instance from the dashboard.
Works ok with the cli

+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| a866d0d6-52d7-4cc2-b67d-f2659d9527a3 | cirros | active |
| 615ed9b1-a17c-4d16-bb7c-c6cdc29f0e15 | focal | active |
+--------------------------------------+--------+--------+

Dec 12 18:06:24 nuc-1 nova-api-os-compute[71719]: 2021-12-12 18:06:24.742 71719 INFO nova.osapi_compute.wsgi.server [-] 192.168.72.14,127.0.0.1 "GET /v2.1 HTTP/1.0" status: 200 len: 777 time: 0.0009298
Dec 12 18:06:25 nuc-1 nova-api-os-compute[71719]: 2021-12-12 18:06:25.498 71719 INFO nova.osapi_compute.wsgi.server [req-5c7112ba-b3a3-4d0a-974a-795b9bcebf4b a96ca30e7a794c62a4da99373b6ad0e6 16169bd039ec4df3b8ed9174936df683 - default default] 192.168.72.14,127.0.0.1 "GET /v2.1/os-simple-tenant-usage/16169bd039ec4df3b8ed9174936df683?start=2021-12-11T00:00:00&end=2021-12-12T23:59:59 HTTP/1.0" status: 200 len: 1353 time: 0.6528597
Dec 12 18:06:25 nuc-1 nova-api-os-compute[71719]: 2021-12-12 18:06:25.570 71719 INFO nova.osapi_compute.wsgi.server [req-a8153e70-220d-4b58-99c2-e15103ca57e5 a96ca30e7a794c62a4da99373b6ad0e6 16169bd039ec4df3b8ed9174936df683 - default default] 192.168.72.14,127.0.0.1 "GET /v2.1/os-simple-tenant-usage/16169bd039ec4df3b8ed9174936df683?start=2021-12-11T00:00:00&end=2021-12-12T23:59:59&marker=bdc4b42f-c152-414f-8a87-29aa85f85dce HTTP/1.0" status: 200 len: 415 time: 0.0686216
Dec 12 18:06:26 nuc-1 nova-api-os-compute[71720]: 2021-12-12 18:06:26.346 71720 INFO nova.osapi_compute.wsgi.server [req-8de5f6e2-6dee-4694-a5aa-406acdb6a95f a96ca30e7a794c62a4da99373b6ad0e6 16169bd039ec4df3b8ed9174936df683 - default default] 192.168.72.14,127.0.0.1 "GET /v2.1/limits?reserved=1 HTTP/1.0" status: 200 len: 908 time: 0.5313892
Dec 12 18:06:33 nuc-1 glance-api[71696]: 2021-12-12 18:06:33.424 71696 INFO eventlet.wsgi.server [req-ed41e6ed-e8d6-45f3-8dda-2455ba661db3 a96ca30e7a794c62a4da99373b6ad0e6 16169bd039ec4df3b8ed9174936df683 - default default] 192.168.72.14,127.0.0.1 - - [12/Dec/2021 18:06:33] "GET /v2/images?limit=1000&sort_key=created_at&sort_dir=desc HTTP/1.0" 200 2095 0.023446
Dec 12 18:06:33 nuc-1 glance-api[71699]: 2021-12-12 18:06:33.431 71699 INFO eventlet.wsgi.server [req-83dd5fa2-73e8-458f-9fe2-36536da092f5 a96ca30e7a794c62a4da99373b6ad0e6 16169bd039ec4df3b8ed9174936df683 - default default] 192.168.72.14,127.0.0.1 - - [12/Dec/2021 18:06:33] "GET /v2/schemas/image HTTP/1.0" 200 6278 0.003382
Dec 12 18:06:33 nuc-1 glance-api[71696]: 2021-12-12 18:06:33.454 71696 INFO eventlet.wsgi.server [req-60bb9f0f-445f-4051-ba67-233b98037958 a96ca30e7a794c62a4da99373b6ad0e6 16169bd039ec4df3b8ed9174936df683 - default default] 192.168.72.14,127.0.0.1 - - [12/Dec/2021 18:06:33] "GET /v2/images?visibility=community&limit=1000&sort_key=created_at&sort_dir=desc HTTP/1.0" 200 329 0.014500
Dec 12 18:06:33 nuc-1 nova-api-os-compute[71720]: 2021-12-12 18:06:33.805 71720 INFO nova.osapi_compute.wsgi.server [req-88bfcabc-0c4c-40b7-ab85-b243500a58b3 a96ca30e7a794c62a4da99373b6ad0e6 ...

Revision history for this message
Bibmaster (bibmaster) wrote :

Getting the exact same issue. Couldn't launch instance and create volume from Horizon web UI, but using CLI I could do that.

Error: Failed to perform requested operation on instance "12", the instance has an error status: Please try again later [Error: Build of instance 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47 aborted: Invalid input received: Invalid image identifier or unable to access requested image. (HTTP 400) (Request-ID: req-01a25693-8cf4-4ce5-b56b-bcef896088fe)].

CLI:

microstack launch ubuntu_20.04.2 -n ubuntu -f m1.medium
Launching server ...
Allocating floating ip ...
Server ubuntu launched! (status is BUILD)

Access it with `ssh -i /home/bibmaster/snap/microstack/common/.ssh/id_microstack ubuntu@10.20.20.202`
You can also visit the OpenStack dashboard at https://10.20.20.1:443

I had the same problem about one year ago I installed OpenStack and I find the solution and fixed it, now I couldn't remember that solution.

Revision history for this message
Bibmaster (bibmaster) wrote :
Download full text (7.7 KiB)

2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] res = method(self, ctx, *args, **kwargs)
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] res = method(self, ctx, size, *args, **kwargs)
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] item = client.volumes.create(size, **kwargs)
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] return self._create('/volumes', body, 'volume')
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] resp, body = self.api.client.post(url, body=body)
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] return self._cs_request(url, 'POST', **kwargs)
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] return self.request(url, method, **kwargs)
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] File "/snap/microstack/244/lib/python3.8/site-packag>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] raise exceptions.from_response(resp, body)
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] cinderclient.exceptions.BadRequest: Invalid image iden>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47]
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] During handling of the above exception, another except>
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47]
2022-01-13 00:33:15.119 1016 ERROR nova.compute.manager [instance: 6233e0ae-37a2-4bc2-bd9d-c47dff9cce47] Traceback (most recent call last):
2022...

Read more...

Revision history for this message
Billy Olsen (billy-olsen) wrote :

@Bibmaster - when you are creating an instance via Horizon, are you creating the instance with a volume attached? Default option is to create a volume and boot the instance from the volume. However, when creating the instance through the commandline the instance is not created to boot from a volume.

Revision history for this message
Bibmaster (bibmaster) wrote :

@Billy If I try to create a volume from the existing image I'm getting an error too (in web UI)
 There just a string "Unable to create the volume"
but it allows to create an empty volume

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Sorry, I don't think I was clear. When using the Horizon Web Interface to launch an instance, on the source tab there's a dropdown that says "Select Boot Source". Next to it is a toggle that says "Create New Volume". When you launch the instance is the "Create New Volume" selector toggled to Yes or No? You should select No and try it

Revision history for this message
Bibmaster (bibmaster) wrote :

Thank you, I tried this option but in this case the instance unreachable from any device. I think it launches an empty instance and I couldn't reach it using ping or ssh. BTW I'm able to login on instances created from CLI
 On Microstack I unfortunately deleted today without saving configs I was able to launch volumes from images but as I told it didn't work by default too. There was an issue I couldn't remember and seems it's not fixed yet

Revision history for this message
Bibmaster (bibmaster) wrote :

@Billy if you have a chance, I could provide you a direct access to the device using ssh and 443 port to see whats going on there.

Revision history for this message
Billy Olsen (billy-olsen) wrote :

I won't access your device, but you are welcome to reach out in the #openstack-snaps channel on oftc irc for some live chat if that helps.

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Another thing to note is that the microstack.launch command will allocate and assign a floating ip to the instance. If the instance is launched via the horizon GUI, you'll need to make sure you assign a floating IP address and use that to access as the default tenant network that it launches on is a private network.

Changed in microstack:
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
Billy Olsen (billy-olsen) wrote :

I was able to recreate the same symptoms as reported in the description by launching an instance and choosing to create a volume. However, I did not install Microstack with the experimental volume support and so the creation of the volume actually fails.

It turns out that the cinder services are enabled and configured within Keystone catalog, which causes Horizon to offer options around booting from volume etc. I think the crux of the problem here is that the cinder service is enabled by default, and should actually only be enabled when the experimental volume support is enabled.

Alternatively, one could change the default value for LAUNCH_INSTANCE_DEFAULTS to hide the create volume and set the create_volume by default to False (note, REST_API_REQUIRED_SETTINGS is required to have LAUNCH_INSTANCE_DEFAULTS exposed). However, its better to not configure the cinder service when its guaranteed to lead to problems such as this.

Revision history for this message
Bibmaster (bibmaster) wrote :

I reinstalled snap and launched
microstack init --auto --control . Symptoms are the same.
Here is the resume of the issue:
  1. Unable to create instance from the image using create volume option from GUI (getting 400 error during the Block device mapping)
  2. Unable to create volume from image using GUI (getting an error)

Revision history for this message