opensearch-dashboards: Fix permissions

Since we moved to using rpm/deb packages, the user has changed.

Related-Bug: #2020152
Change-Id: I2a5a0d761223b4e99c8df59f80261108380d5038
(cherry picked from commit 6786e4384c)
This commit is contained in:
Michal Nasiadka 2023-05-23 16:14:21 +02:00
parent 23e0819d68
commit 7a30d4d768
3 changed files with 10 additions and 6 deletions

View File

@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %} {% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='opensearch', shell='/bin/bash', homedir='/usr/share/opensearch') }} {{ macros.configure_user(name='opensearch-dashboards', shell='/bin/bash', homedir='/usr/share/opensearch-dashboards') }}
{{ macros.enable_extra_repos(['opensearch-dashboards']) }} {{ macros.enable_extra_repos(['opensearch-dashboards']) }}
{% set opensearch_dashboards_packages = ['opensearch-dashboards'] %} {% set opensearch_dashboards_packages = ['opensearch-dashboards'] %}
@ -30,4 +30,4 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block opensearch_footer %}{% endblock %} {% block opensearch_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}
USER opensearch USER opensearch-dashboards

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
if [[ ! -d "/var/log/kolla/opensearch" ]]; then if [[ ! -d "/var/log/kolla/opensearch-dashboards" ]]; then
mkdir -p /var/log/kolla/opensearch mkdir -p /var/log/kolla/opensearch-dashboards
fi fi
if [[ $(stat -c %a /var/log/kolla/opensearch) != "755" ]]; then if [[ $(stat -c %a /var/log/kolla/opensearch-dashboards) != "755" ]]; then
chmod 755 /var/log/kolla/opensearch chmod 755 /var/log/kolla/opensearch-dashboards
fi fi
export DASHBOARDS_HOME=/usr/share/opensearch-dashboards export DASHBOARDS_HOME=/usr/share/opensearch-dashboards

View File

@ -960,6 +960,10 @@ USERS = {
'opensearch-user': { 'opensearch-user': {
'uid': 42490, 'uid': 42490,
'gid': 42490, 'gid': 42490,
},
'opensearch-dashboards-user': {
'uid': 42492,
'gid': 42492,
} }
} }