diff options
| author | Steven Dake <stdake@cisco.com> | 2015-08-27 18:54:29 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-08-28 00:50:29 -0700 |
| commit | 9fe28bd22018bc140b5202786a3cecd6337ca973 (patch) | |
| tree | 2c82ceeecd4f21ddf3736ab5b46b153a9615383b /docker_templates/nova/nova-libvirt | |
| parent | ce86de9915d24f3a3dc7688ff66a536b6adb780b (diff) | |
| download | kolla-9fe28bd22018bc140b5202786a3cecd6337ca973.tar.gz kolla-9fe28bd22018bc140b5202786a3cecd6337ca973.zip | |
Move scripts for nova to docker_templates
Change-Id: If00f0f2e3258b7b2876b42b4fbda3681c49c8127
Partially-Implements: blueprint remove-docker-dir
Diffstat (limited to 'docker_templates/nova/nova-libvirt')
| -rwxr-xr-x[l---------] | docker_templates/nova/nova-libvirt/config-external.sh | 11 | ||||
| -rwxr-xr-x[l---------] | docker_templates/nova/nova-libvirt/start.sh | 21 |
2 files changed, 30 insertions, 2 deletions
diff --git a/docker_templates/nova/nova-libvirt/config-external.sh b/docker_templates/nova/nova-libvirt/config-external.sh index cdcc6cc68..acc1c5473 120000..100755 --- a/docker_templates/nova/nova-libvirt/config-external.sh +++ b/docker_templates/nova/nova-libvirt/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-libvirt/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/libvirt/libvirtd.conf" +TARGET="/etc/libvirt/libvirtd.conf" +OWNER="libvirt" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-libvirt/start.sh b/docker_templates/nova/nova-libvirt/start.sh index 8188547e1..ae0de867b 120000..100755 --- a/docker_templates/nova/nova-libvirt/start.sh +++ b/docker_templates/nova/nova-libvirt/start.sh @@ -1 +1,20 @@ -../../../docker/common/nova/nova-libvirt/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/sbin/libvirtd" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# TODO(SamYaple): Tweak libvirt.conf rather than change permissions. +# Fix permissions for libvirt +if [[ -c /dev/kvm ]]; then + chmod 660 /dev/kvm + chown root:kvm /dev/kvm +fi + +exec $CMD $ARGS |
