Cannot launch an instance via Horizon and not via microstack command
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-
Thank you for your support,
Billy Olsen (billy-olsen) wrote : | #1 |
Changed in microstack: | |
status: | New → Incomplete |
Lasse Gustafsson (klicken) wrote : | #2 |
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-
| 615ed9b1-
+------
Dec 12 18:06:24 nuc-1 nova-api-
Dec 12 18:06:25 nuc-1 nova-api-
Dec 12 18:06:25 nuc-1 nova-api-
Dec 12 18:06:26 nuc-1 nova-api-
Dec 12 18:06:33 nuc-1 glance-api[71696]: 2021-12-12 18:06:33.424 71696 INFO eventlet.
Dec 12 18:06:33 nuc-1 glance-api[71699]: 2021-12-12 18:06:33.431 71699 INFO eventlet.
Dec 12 18:06:33 nuc-1 glance-api[71696]: 2021-12-12 18:06:33.454 71696 INFO eventlet.
Dec 12 18:06:33 nuc-1 nova-api-
Bibmaster (bibmaster) wrote : | #3 |
- error2.JPG Edit (37.9 KiB, image/jpeg)
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-
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
You can also visit the OpenStack dashboard at https:/
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.
Bibmaster (bibmaster) wrote : | #4 |
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022-01-13 00:33:15.119 1016 ERROR nova.compute.
2022...
Billy Olsen (billy-olsen) wrote : | #5 |
@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.
Bibmaster (bibmaster) wrote : | #6 |
@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
Billy Olsen (billy-olsen) wrote : | #7 |
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
Bibmaster (bibmaster) wrote : | #8 |
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
Bibmaster (bibmaster) wrote : | #9 |
@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.
Billy Olsen (billy-olsen) wrote : | #10 |
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.
Billy Olsen (billy-olsen) wrote : | #11 |
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 |
Billy Olsen (billy-olsen) wrote : | #12 |
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_
Bibmaster (bibmaster) wrote : | #13 |
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)
Billy Olsen (billy-olsen) wrote : | #14 |
@Bibmaster you do *not* want to use volumes as that is not enabled. The parameters you have provided do not have backing storage support which means the cinder volumes that would be provisioned have no backend to provision from.
To make it a bit easier, let’s just remove the cinder service from your service catalog. To do this,run:
microstack.
microstack.
Log out of horizon interface
sudo snap restart microstack.
Log back into horizon. There should not be any volume options available.
Now you can create an instance and it should spawn. If you can’t access, you’ll want to check to make sure you provided ssh keys when you launched it and it has a floating up assigned. You access it via the floating up.
Bibmaster (bibmaster) wrote : | #15 |
@Billy Thank you for detailed answer! But my Q is, how did I create volumes from .iso on previous releases of Microstack? Was this option enabled and is it deprecated now? How could I set up some kind of software to enable this option, and what do I need to do? Are there any plans to enable it in the future?
Thank you!
Billy Olsen (billy-olsen) wrote : | #16 |
@Bibmaster - you must have run microstack.init with --setup-
e.g. the following creates a 50G loop device and configures Cinder LVM
sudo microstack.init --auto --control --setup-
Bibmaster (bibmaster) wrote : | #17 |
@Billy I did it with the exact command you mentioned (I googled it before), but it still fails during the mapping the block device with HTTP 400
here is the cinder-snap.conf
[DEFAULT]
# Set state path to writable directory
state_path = /var/snap/
resource_
# Set volume configuration file storage directory
volumes_dir = /var/snap/
my_ip = 192.168.11.33
rootwrap_config = /var/snap/
enabled_backends = lvm-loop-
[lvm-loop-
volume_driver = cinder.
iscsi_protocol = iscsi
target_helper = lioadm
volume_group = cinder-volumes
volume_
log_file = /var/snap/
debug = False
[oslo_concurrency]
# Oslo Concurrency lock path
lock_path = /var/snap/
Bibmaster (bibmaster) wrote (last edit ): | #18 |
@Billy
BTW in config file there is a string
# Set volume configuration file storage directory
volumes_dir = /var/snap/
But I don't see this dir ( I created it but it didn't help)
root@openstack:
total 68
drwxr-xr-x 17 root root 4096 Jan 13 04:06 .
drwxr-xr-x 11 root root 4096 Jan 13 03:55 ..
drwxr-xr-x 3 root root 4096 Jan 13 04:06 external
drwxr-xr-x 2 root root 4096 Jan 13 03:55 groups
drwxr-x--- 2 root root 4096 Jan 13 14:01 images
drwxr-x--- 7 root root 4096 Jan 13 14:02 instances
drwxr-xr-x 3 root root 4096 Jan 13 03:43 libvirt
srw-r--r-- 1 root root 0 Jan 13 03:57 metadata_proxy
drwxr-xr-x 14 root root 4096 Jan 13 03:56 mysql
drwx------ 2 root root 4096 Jan 13 03:45 mysql-files
drwx------ 2 snap_daemon root 4096 Jan 13 14:01 nginx_client_body
drwx------ 2 snap_daemon root 4096 Jan 13 03:46 nginx_fastcgi
drwx------ 2 snap_daemon root 4096 Jan 13 03:46 nginx_proxy
drwx------ 2 snap_daemon root 4096 Jan 13 03:46 nginx_scgi
drwx------ 7 snap_daemon root 4096 Jan 13 04:02 nginx_uwsgi
drwxr-xr-x 2 root root 4096 Jan 13 13:50 ovn-metadata-proxy
drwx------ 3 root root 4096 Jan 13 03:45 rabbitmq
drwxr-xr-x 2 root root 4096 Jan 13 03:55 tmp
Bibmaster (bibmaster) wrote : | #19 |
Bibmaster (bibmaster) wrote : | #21 |
Billy Olsen (billy-olsen) wrote (last edit ): | #22 |
With the experimental volume support enabled, this doesn't work due to the certificate not being configured for glance in the cinder service. The following work around should work for now:
$ sudo tee /var/snap/
[DEFAULT]
glance_
EOF
$ sudo snap restart microstack.
Changed in microstack: | |
status: | Triaged → In Progress |
assignee: | nobody → Billy Olsen (billy-olsen) |
Bibmaster (bibmaster) wrote : | #23 |
Thank you @Billy! This fix works for me!
OpenStack Infra (hudson-openstack) wrote : Fix proposed to microstack (master) | #24 |
Fix proposed to branch: master
Review: https:/
Lucca Jiménez Könings (jimkoen) wrote : | #25 |
For me the bug does not seem to be resolved.
I have followed this report, setting up Microstack with a Cinder Loop Device with
sudo microstack.init --auto --control --setup-
and have additionally added the certificates as described in #22.
However, I still cannot start instances with the "Create New Volume" slider enabled.
I can create volumes under Project -> Volumes just fine. But booting instances with an automatically created volume via the slider (see pic) fails with an error in the webui:
Error: Failed to perform requested operation on instance "asd", the instance has an error status: Please try again later [Error: Build of instance 3bd9a8d4-
The error it fails on is the block device mapping step.
Any help would be appreciated. If you tell me where to look, I can provide log-output, screenshots etc.
Lucca Jiménez Könings (jimkoen) wrote : | #26 |
To clarify: I can create volumes that aren't attached to an image. Creating volumes from images is not possible.
Lucca Jiménez Könings (jimkoen) wrote : | #27 |
@billy-olsen I have no experience with Openstack, but are you sure the tee call should look like this?
$ sudo tee /var/snap/
[DEFAULT]
glance_
EOF
Removing the '2' on ".../cinder.
$ sudo tee /var/snap/
[DEFAULT]
glance_
EOF
$ sudo snap restart microstack.
Billy Olsen (billy-olsen) wrote : | #28 |
@Lucca - yes, you are correct - apologies. I was running the tests against a secondary file and the .2 should not be there. I will adjust my comment to reflect the correct command
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