Ephemeral storage encryption is broken with interface mismatch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Kaitlin Farr | ||
Newton |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Ocata |
Fix Committed
|
Medium
|
Kaitlin Farr |
Bug Description
Description
===========
Ephemeral storage encryption is broken because of interface mismatch. The default key manager (Castellan with Barbican)'s create_key() interface required at least 4 arguments. See
https:/
However, Nova is only passing in 3. Looks like the 'algorithm' argument is missing. See
https:/
This will result in "TypeError: create_key() takes exactly 4 arguments (3 given)" on server create.
Steps to reproduce
==================
1. Install devstack with Barbican plugin enabled. i.e.
cat local.conf
[[local|localrc]]
enable_plugin barbican https:/
2. After devstack is installed, enable ephemeral storage encryption in nova.conf. i.e.
[libvirt]
images_type = lvm
images_volume_group = vg-comp
[ephemeral_
key_size = 256
cipher = aes-xts-plain64
enabled = True
3. restart nova-api
4. using the nova user account, try to create a server. i.e.
gyee@abacus:~$ env | grep OS_
OS_PROJECT_
OS_USER_
OS_PROJECT_
OS_IDENTITY_
OS_PASSWORD=secrete
OS_AUTH_URL=http://
OS_USERNAME=nova
gyee@abacus:~$ openstack flavor list
+----+-
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+-
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True |
| 2 | m1.small | 2048 | 20 | 0 | 1 | True |
| 3 | m1.medium | 4096 | 40 | 0 | 2 | True |
| 4 | m1.large | 8192 | 80 | 0 | 4 | True |
| 42 | m1.nano | 64 | 0 | 0 | 1 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True |
| 84 | m1.micro | 128 | 0 | 0 | 1 | True |
| c1 | cirros256 | 256 | 0 | 0 | 1 | True |
| d1 | ds512M | 512 | 5 | 0 | 1 | True |
| d2 | ds1G | 1024 | 10 | 0 | 1 | True |
| d3 | ds2G | 2048 | 10 | 0 | 2 | True |
| d4 | ds4G | 4096 | 20 | 0 | 4 | True |
+----+-
gyee@abacus:~$ openstack image list
+------
| ID | Name | Status |
+------
| da447cd9-619a- | cirros-
| 41b3-9772-
| 718fff25-
| 570a | | |
| 91c06518-
| 3c0ad020d9a4 | | |
+------
gyee@abacus:~$ openstack server create --image 91c06518-
Unexpected API Error. Please report this at http://
<type 'exceptions.
5. And you'll see a traceback similiar to this.
2016-12-21 14:04:40.903 ERROR nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.905 INFO nova.api.
<type 'exceptions.
Expected result
===============
server should be successfully created
Actual result
=============
HTTP 500, with the following traceback in the log.
2016-12-21 14:04:40.903 ERROR nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.903 TRACE nova.api.
2016-12-21 14:04:40.905 INFO nova.api.
<type 'exceptions.
Environment
===========
1. Ubuntu 16.04
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
2. Devstack + Barbican plugin, both on stable/newton
Changed in nova: | |
status: | New → Confirmed |
assignee: | nobody → int32bit (int32bit) |
Changed in nova: | |
importance: | Undecided → Medium |
tags: | added: newton-backport-potential ocata-backport-potential |
Fix proposed to branch: master /review. openstack. org/414233
Review: https:/