Configure glance disk-formats

Add root-tar to /etc/glance/glance-api.conf.

Change-Id: I74abd8007cfd2012e5a9ba942c80fc5a55a8aca7
Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
Chuck Short 2016-08-17 09:03:30 -04:00
parent b77d72f79c
commit 8c121daa83
1 changed files with 8 additions and 1 deletions

View File

@ -12,10 +12,14 @@ NOVA_DIR=${NOVA_DIR:-$DEST/nova}
NOVA_CONF_DIR=${NOVA_CONF_DIR:-/etc/nova}
NOVA_CONF=${NOVA_CONF:-NOVA_CONF_DIR/nova.conf}
# nova-powervm directories
# nova-lxd directories
NOVA_COMPUTE_LXD_DIR=${NOVA_COMPUTE_LXD_DIR:-${DEST}/nova-lxd}
NOVA_COMPUTE_LXD_PLUGIN_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
# glance directories
GLANCE_CONF_DIR=${GLANCE_CONF_DIR:-/etc/glance}
GLANCE_API_CONF=$GLANCE_CONF_DIR/glance-api.conf
source $NOVA_COMPUTE_LXD_PLUGIN_DIR/nova-lxd-functions.sh
function pre_install_nova-lxd() {
@ -34,6 +38,9 @@ function configure_nova-lxd() {
iniset $NOVA_CONF DEFAULT compute_driver lxd.LXDDriver
iniset $NOVA_CONF DEFAULT force_config_drive False
iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso,qcow2,root-tar"
iniset $GLANCE_API_CONF DEFAULT container_formats "ami,ari,aki,bare,ovf,tgz"
# Install the rootwrap
sudo install -o root -g root -m 644 $NOVA_COMPUTE_LXD_DIR/etc/nova/rootwrap.d/*.filters $NOVA_CONF_DIR/rootwrap.d
}