Fix log directory of Elasticsearch
Logs should be stored in /var/log/kolla/elasticsearch. Change-Id: If3ba4ec6ce2dbe9859ca604f0ee2df7fc4d15bd9 Closes-bug: #1634046
This commit is contained in:
parent
fbdcf34db7
commit
4223fdfbeb
@ -13,6 +13,11 @@
|
|||||||
"path": "/var/lib/elasticsearch",
|
"path": "/var/lib/elasticsearch",
|
||||||
"owner": "elasticsearch:elasticsearch",
|
"owner": "elasticsearch:elasticsearch",
|
||||||
"recurse": true
|
"recurse": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/var/log/kolla/elasticsearch",
|
||||||
|
"owner": "elasticsearch:elasticsearch",
|
||||||
|
"recurse": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -15,5 +15,5 @@ gateway.recover_after_time: "5m"
|
|||||||
gateway.recover_after_nodes: {{ recover_after_nodes }}
|
gateway.recover_after_nodes: {{ recover_after_nodes }}
|
||||||
path.conf: "/etc/elasticsearch"
|
path.conf: "/etc/elasticsearch"
|
||||||
path.data: "/var/lib/elasticsearch/data"
|
path.data: "/var/lib/elasticsearch/data"
|
||||||
path.logs: "/var/log/elasticsearch"
|
path.logs: "/var/log/kolla/elasticsearch"
|
||||||
path.scripts: "/etc/elasticsearch/scripts"
|
path.scripts: "/etc/elasticsearch/scripts"
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -d "/var/log/kolla/elasticsearch" ]]; then
|
||||||
|
mkdir -p /var/log/kolla/elasticsearch
|
||||||
|
fi
|
||||||
|
if [[ $(stat -c %a /var/log/kolla/elasticsearch) != "755" ]]; then
|
||||||
|
chmod 755 /var/log/kolla/elasticsearch
|
||||||
|
fi
|
||||||
|
|
||||||
# Only update permissions if permissions need to be updated
|
# Only update permissions if permissions need to be updated
|
||||||
if [[ $(stat -c %U:%G /var/lib/elasticsearch/data) != "elasticsearch:elasticsearch" ]]; then
|
if [[ $(stat -c %U:%G /var/lib/elasticsearch/data) != "elasticsearch:elasticsearch" ]]; then
|
||||||
sudo chown elasticsearch: /var/lib/elasticsearch/data
|
sudo chown elasticsearch: /var/lib/elasticsearch/data
|
||||||
|
Loading…
Reference in New Issue
Block a user