puppet-elasticsearch: Elsticsearch 6.3 Upgrade Broken (in Debian based Systems)
- Module version: 6.3.1
- Puppet version: 4.10.12 and 5.5.4
- OS and version: Debian 9 and Ubuntu 18.04
Bug description
Install any old version of elasticsearch before 6.3.0 e.g.
include ::java
class { 'elasticsearch':
version => '6.2.0'
}
elasticsearch::instance { 'es-01': }
Then try to upgrade Elasticsearch to version 6.3.x. The upgrade will fail because it will try to create an initial keystore (this feature was introduced in version 6.3.0 https://github.com/elastic/elasticsearch/pull/28928 ). The creating of the keystore will fail because elasticsearch-keystore doesn’t find ES_PATH_CONF and exists with an errorcode.
==> puppet-test01.local: ES_PATH_CONF must be set to the configuration path
==> puppet-test01.local: dpkg: error processing package elasticsearch (--configure):
==> puppet-test01.local: installed elasticsearch package post-installation script subprocess returned error exit status 1
The problem does not happen if the initial version is already 6.3.x because then the keystore is created before ES_PATH_CONF is removed from /etc/default/elasticsearch.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 7
- Comments: 22 (10 by maintainers)
Based upon the feedback here, my hunch is that taking the approach of:
/etc/environment
value as a short-term fix, andIs probably the best approach. I’ve discussed the potential of removing multiple-instance support in the module with people both inside and outside Elastic, and it seems like doing so is really the only way to keep the module highly stable and reliable for people (there’s so many issues that it causes - this is just one, but out-of-date logging config files, jvm options, init scripts, and so many more are also plagued by this).
Okay, new ElasticSearch update today, explicitly setting
ES_PATH_CONF
in the environment, and all went well.This is probably the simplest workaround 🎉.
Puppet still fixes a lot of things after the update.
same issue.
I used to for work-around global env:
At least for 6.6 just
still worked fine for me, as reported in https://github.com/elastic/puppet-elasticsearch/issues/977#issuecomment-425073134
I just checked the postinstall script again and in 6.4.x, it looks like this: 6.4
It ssems that it would also be sufficient to have the puppet module create an empty file at
/etc/elasticsearch/elasticsearch.keystore
to fix the issue.