puppet-elasticsearch icon indicating copy to clipboard operation
puppet-elasticsearch copied to clipboard

Fix more providers

Open Kidswiss opened this issue 4 years ago • 8 comments

In https://github.com/elastic/puppet-elasticsearch/pull/1036 you fixed the autoload issue for some provider types. While testing today I found that there were still some providers that can fail to autoload.

How to reproduce:

  • Use puppet-elasticsearch 6.4.0
  • Restart puppetmaster
  • Run puppet on an agent

Result:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/elasticsearch_user: Could not autoload puppet/provider/elasticsearch_user/users: no such file to load -- puppet/provider/elastic_user_command (file: /etc/puppetlabs/code/modules/elasticsearch/manifests/init.pp, line: 554, column: 3) on node agent1.vagrant.test
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Applying the same fix as in https://github.com/elastic/puppet-elasticsearch/pull/1036 to these types/providers fixed the issue.

Maybe it would make sense to change the imports for all the types/providers?

Pull request acceptance prerequisites:

  • [x] Signed the CLA (if not already signed)
  • [x] Rebased/up-to-date with base branch
  • [x] Tests pass
  • [x] Updated CHANGELOG.md with patch notes (if necessary)
  • [ ] Updated CONTRIBUTORS (if attribution is requested)

Kidswiss avatar Nov 28 '19 14:11 Kidswiss

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

elasticmachine avatar Nov 28 '19 14:11 elasticmachine

Author of the following commits did not sign a Contributor Agreement: 0156185578a81abbb09e6ac77c7118d44aa03f7e

Please, read and sign the above mentioned agreement if you want to contribute to this project

I would like to weigh in and confirm that we're encountering this issue as well, and need this PR to get resolved somehow.

root@lvlslogp01:~$ puppet agent --test
Info: Certificate revocation is disabled, skipping CRL download
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/elasticsearch_user_file: Could not autoload puppet/provider/elasticsearch_user_file/oss_xpack: no such file to load -- puppet/provider/elastic_parsedfile (file: /etc/puppetlabs/code/environments/production/community-modules/elasticsearch/manifests/init.pp, line: 567, column: 6) on node lvlslogp01.lightningsource.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

It can clear after subsequent runs, but this can be a major problem when you've enabled max-requests-per-instance to combat memory leaks in other modules.

abaddononion avatar Jan 30 '20 17:01 abaddononion

Hi there,

Firstly, thank you for taking the time to contribute, and apologies for the radio silence from Elastic on this PR.

I'm going to be working on this module over the next few weeks, with an ultimate aim of updating the module to support the elasticsearch 7.x and simplifying the module to make it easier to use.

I'll be reviewing all the open issues and PRs over the next few days, and will merge or provide feedback where appropriate.

So please hang in there whilst we give this module some TLC.

Thanks again.

fatmcgav avatar Feb 04 '20 13:02 fatmcgav

@Kidswiss The changes look sensible.

Would you be able to sign the CLA as noted in https://github.com/elastic/puppet-elasticsearch/pull/1062#issuecomment-559518902?

fatmcgav avatar Feb 04 '20 15:02 fatmcgav

Running octocatalog-diff causes similar issues:

Error: Could not autoload puppet/provider/elasticsearch_user_file/shield: cannot load such file -- puppet/provider/elastic_parsedfile
Error: Could not autoload puppet/type/elasticsearch_user_file: Could not autoload puppet/provider/elasticsearch_user_file/shield: cannot load such file -- puppet/provider/elastic_parsedfile
Error: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/elasticsearch_user_file: Could not autoload puppet/provider/elasticsearch_user_file/shield: cannot load such file -- puppet/provider/elastic_parsedfile (file: /tmp/ocd-ipc-20200310-16487-i2apg8/ocd-builddir-20200310-16602-1krbujk/environments/production/modules/elasticsearch/manifests/init.pp, line: 567, column: 6) on node test.es.local
Error: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/elasticsearch_user_file: Could not autoload puppet/provider/elasticsearch_user_file/shield: cannot load such file -- puppet/provider/elastic_parsedfile (file: /tmp/ocd-ipc-20200310-16487-i2apg8/ocd-builddir-20200310-16602-1krbujk/environments/production/modules/elasticsearch/manifests/init.pp, line: 567, column: 6) on node test.es.local
Error: Failed to compile catalog for node test.es.local: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/elasticsearch_user_file: Could not autoload puppet/provider/elasticsearch_user_file/shield: cannot load such file -- puppet/provider/elastic_parsedfile (file: /tmp/ocd-ipc-20200310-16487-i2apg8/ocd-builddir-20200310-16602-1krbujk/environments/production/modules/elasticsearch/manifests/init.pp, line: 567, column: 6) on node test.es.local

I was not able to fix the issue in about 1 hour and decided to wait if this gets fixed due to the changes in the upcoming release. But I'll be happy to help if i can get a understanding what changes are planned for the whole lib layout in this module.

crigertg avatar Mar 10 '20 10:03 crigertg

Dear @Kidswiss, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs? If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com. You can find my sourcecode at voxpupuli/vox-pupuli-tasks

vox-pupuli-tasks[bot] avatar Jun 21 '22 19:06 vox-pupuli-tasks[bot]

Dear @Kidswiss, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

vox-pupuli-tasks[bot] avatar Jun 21 '22 19:06 vox-pupuli-tasks[bot]