简体   繁体   中英

Creating octavia Loadbalancer fails with “Nova failed to build the instance due to: Invalid key_name provided”

I'm trying out an installation of OpenStack via kolla-ansible. Cluster with 3 controlplane nodes and 2 compute nodes is up and running. I now added octavia LBaaS and ran into an issue. When I try to create a loadbalancer in the horizon GUI, this fails with the following error in /var/log/kolla/octavia/octavia-worker.log:

2019-10-22 14:39:35.969 24 INFO octavia.controller.queue.endpoint [-] Creating load balancer '8789f171-3a40-40dd-bcf3-f0ab02844eba'...
2019-10-22 14:39:36.204 24 INFO octavia.network.drivers.neutron.allowed_address_pairs [-] Port 5bc14530-cbd9-4937-8263-864d8375967e already exists. Nothing to be done.
2019-10-22 14:39:37.265 24 INFO octavia.controller.worker.tasks.database_tasks [-] Created Amphora in DB with id f16f47ac-27fa-44a3-a896-a2c436baf0fe
2019-10-22 14:39:37.428 24 INFO octavia.certificates.generator.local [-] Signing a certificate request using OpenSSL locally.
2019-10-22 14:39:37.428 24 INFO octavia.certificates.generator.local [-] Using CA Certificate from config.
2019-10-22 14:39:37.428 24 INFO octavia.certificates.generator.local [-] Using CA Private Key from config.
2019-10-22 14:39:37.429 24 INFO octavia.certificates.generator.local [-] Using CA Private Key Passphrase from config.
2019-10-22 14:39:38.905 24 ERROR octavia.compute.drivers.nova_driver [-] Nova failed to build the instance due to: Invalid key_name provided. (HTTP 400) (Request-ID: req-76427fa0-ea35-4d4b-8173-f72d0c6355aa): BadRequest: Invalid key_name provided. (HTTP 400) (Request-ID: req-76427fa0-ea35-4d4b-8173-f72d0c6355aa)

In the /etc/octavia/octavia.conf keyname is set like this:

[controller_worker]
amp_ssh_key_name = octavia_ssh_key
amp_boot_network_list = 92df8748-2dfc-4270-8fef-d5163ef7ee56
amp_image_tag = amphora
amp_secgroup_list = a818a8c8-d8df-4886-a62a-dbcf29aa7e79
amp_flavor_id = 805ec684-b560-476e-938b-32b0fa4e6d16
...

An openstack keypair list yields:

+-----------------+-------------------------------------------------+
| Name            | Fingerprint                                     |
+-----------------+-------------------------------------------------+
| user1           | aa:aa:aa:aa:85:2e:0d:b7:35:0a:c5:7e:3f:67:e5:a5 |
| user2           | aa:aa:aa:aa:fc:67:12:c6:20:3e:3b:bc:7a:75:35:cc |
| octavia_ssh_key | 28:b2:83:b1:e2:ee:c7:72:dc:bc:2e:3f:6e:ac:e2:61 |
+-----------------+-------------------------------------------------+

As the keyname is set to "octavia_ssh_key" in octavia.conf and the keypair is listed under that name in openstack, I`m not sure what is causing the error. Why is nova unable to find the correct keypair to build the ampora image?

Any ideas on where else I could debug or what else needs to be configured to make the octavia LBaaS work would be greatly appreciated.

kolla-ansible vererion: stable/stein

All the best and thanks for reading this!

Björn

I suppose you have created the keypair "octavia_ssh_key" with the admin user.

You could try to recreate this one with the octavia user;)

openstack keypair create octavia_ssh_key \
  --os-username octavia \
  --os-password "$(cat /etc/kolla/passwords.yml | grep octavia_keystone_password | awk '{ print $2 }')"

Try creating key using Octavia user...it will work absolutely fine

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM