aboutsummaryrefslogtreecommitdiff
path: root/docker/nova/nova-compute
diff options
context:
space:
mode:
authorJeffrey Zhang <jeffrey.zhang@99cloud.net>2016-04-08 23:42:59 +0800
committerSteven Dake <stdake@cisco.com>2016-04-08 15:53:28 -0400
commitad1461f46d730ed0393ffcb16b866ed2e0f34943 (patch)
tree337efbcc4d4629e6274ce51b4c54845752fed431 /docker/nova/nova-compute
parentfda9444ea63ec436e7598ebb4ce221db0dd5d97d (diff)
downloadkolla-ad1461f46d730ed0393ffcb16b866ed2e0f34943.tar.gz
kolla-ad1461f46d730ed0393ffcb16b866ed2e0f34943.zip
Fix the qemu has nova permission in nova instances folder
Fix the permission issue on different distro * In CentOS, add the qemu to nova group in CentOS * In Ubuntu, add the nova to libvirtd group Co-Authored-By: Steven Dake <stdake@cisco.com> Change-Id: I1f4f9ce29abf0d788965fe94d8918b10a7169a75 Closes-Bug: #1568012
Diffstat (limited to 'docker/nova/nova-compute')
-rw-r--r--docker/nova/nova-compute/Dockerfile.j23
-rw-r--r--docker/nova/nova-compute/extend_start.sh5
-rw-r--r--docker/nova/nova-compute/nova_compute_sudoers1
3 files changed, 0 insertions, 9 deletions
diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2
index 48337e9da..7be99a12c 100644
--- a/docker/nova/nova-compute/Dockerfile.j2
+++ b/docker/nova/nova-compute/Dockerfile.j2
@@ -55,11 +55,8 @@ RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements
{% endif %}
-COPY nova_compute_sudoers /etc/sudoers.d/nova_compute_sudoers
COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
- && chmod 750 /etc/sudoers.d \
- && chmod 440 /etc/sudoers.d/nova_compute_sudoers \
&& rm -f /etc/machine-id
{{ include_footer }}
diff --git a/docker/nova/nova-compute/extend_start.sh b/docker/nova/nova-compute/extend_start.sh
index efe531ff9..76226cd90 100644
--- a/docker/nova/nova-compute/extend_start.sh
+++ b/docker/nova/nova-compute/extend_start.sh
@@ -3,11 +3,6 @@
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
- sudo chown nova: /var/lib/nova/
mkdir -p /var/lib/nova/instances
- # Only update permissions if permissions need to be updated
- if [[ $(stat -c %U:%G /var/lib/nova/instances) != "nova:nova" ]]; then
- sudo chown nova: /var/lib/nova/instances
- fi
exit 0
fi
diff --git a/docker/nova/nova-compute/nova_compute_sudoers b/docker/nova/nova-compute/nova_compute_sudoers
deleted file mode 100644
index a7fb7b864..000000000
--- a/docker/nova/nova-compute/nova_compute_sudoers
+++ /dev/null
@@ -1 +0,0 @@
-%kolla ALL=(root) NOPASSWD: /usr/bin/chown nova\: /var/lib/nova/, /bin/chown nova\: /var/lib/nova/