Defer handling of /var/lib/neutron/kolla to kolla API
neutron-metadata-agent image expected the /var/lib/neutron/kolla directory to be present but it was not created as part of the image building. As a result, the extend_start.sh script fails with: stat: cannot stat '/var/lib/neutron/kolla': No such file or directory This commit defers setting the right ownership for files and directories to the kolla config API via a config.json file. Kolla-ansible already mounts the directory as the neutron_metadata_socket named volume and uses kolla API to set the ownership and permissions [1]. [1] https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/neutron/templates/neutron-metadata-agent.json.j2 Closes-Bug: #1669487 Change-Id: Ib521b0fc69ab6a72295a2fde3309a001bc3063c2
This commit is contained in:
parent
2c801637e6
commit
0c6f5d2074
docker/neutron/neutron-metadata-agent
@ -17,12 +17,6 @@ MAINTAINER {{ maintainer }}
|
||||
|
||||
{{ macros.install_packages(neutron_metadata_agent_packages | customizable("packages")) }}
|
||||
|
||||
COPY neutron_sudoers /etc/sudoers.d/kolla_neutron_metadata_sudoers
|
||||
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
|
||||
&& chmod 750 /etc/sudoers.d \
|
||||
&& chmod 440 /etc/sudoers.d/kolla_neutron_metadata_sudoers
|
||||
|
||||
{% block neutron_metadata_agent_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Only update permissions if permissions need to be updated
|
||||
if [[ $(stat -c %U:%G /var/lib/neutron/kolla) != "neutron:neutron" ]]; then
|
||||
sudo chown neutron: /var/lib/neutron/kolla
|
||||
fi
|
@ -1 +0,0 @@
|
||||
%kolla ALL=(root) NOPASSWD: /bin/chown neutron\: /var/lib/neutron/kolla, /usr/bin/chown neutron\: /var/lib/neutron/kolla
|
Loading…
x
Reference in New Issue
Block a user