Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade el8/changes #5

Merged
merged 31 commits into from
Feb 9, 2023
Merged

Upgrade el8/changes #5

merged 31 commits into from
Feb 9, 2023

Conversation

widhalmt
Copy link
Member

@widhalmt widhalmt commented Jan 31, 2023

Minor fixes for problems that were found during tests of the collection (most were previously undetected in the separate roles). And fixes for a stable handling of Elastic Stack version 8.

ToDos

Here are some items we discovered during testing. They need to be addressed in one way or another. Either fix them here or create an issue to fix it. (Tick them off, when a fix is in this branch, in main or when an issue is open)

Tests

Every test is run with Elastic Stack version 8. oss variant is not supported in versions > 7 so no tests are neccessary.

  • Single node with default variables (as much as possible) on Ubuntu 22.04 LTS
  • Single node with default variables (as much as possible) on RedHat 8 (or similar)
  • Multinode cluster with default variables (as much as possible) on Ubuntu 22.04 LTS
  • Multinode cluster with default variables (as much as possible) on RedHat 8 (or similar)

Patrick Dolinic and others added 2 commits January 31, 2023 14:50
@widhalmt widhalmt added bug Something isn't working documentation Improvements or additions to documentation feature New feature or request labels Jan 31, 2023
widhalmt added a commit that referenced this pull request Feb 1, 2023
@widhalmt
Copy link
Member Author

widhalmt commented Feb 1, 2023

The PKCS8 key we create seems to look invalid to Logstash:

[2023-02-01T07:39:18,401][ERROR][logstash.inputs.beats    ][ansible-input] SSL configuration invalid {:exception=>Java::JavaLang::IllegalArgumentException, :message=>"File does not contain valid private key: /etc/logstash/certs/twidhalm-elasticcollection.novalocal-pkcs8.key", :cause=>{:exception=>Java::JavaSecurity::NoSuchAlgorithmException, :message=>"1.2.840.113549.1.5.13 SecretKeyFactory not available"}}
[2023-02-01T07:39:18,500][ERROR][logstash.javapipeline    ][ansible-input] Pipeline error {:pipeline_id=>"ansible-input", :exception=>#<LogStash::ConfigurationError: File does not contain valid private key: /etc/logstash/certs/twidhalm-elasticcollection.novalocal-pkcs8.key>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.2.6-java/lib/logstash/inputs/beats.rb:239:in `new_ssl_handshake_provider'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.2.6-java/lib/logstash/inputs/beats.rb:193:in `create_server'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.2.6-java/lib/logstash/inputs/beats.rb:178:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:233:in `block in register_plugins'", "org/jruby/RubyArray.java:1821:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:232:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:391:in `start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:316:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:190:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:142:in `block in start'"], "pipeline.sources"=>["/etc/logstash/conf.d/ansible-input/input.conf", "/etc/logstash/conf.d/ansible-input/output.conf"], :thread=>"#<Thread:0x1a3df954 run>"}
[2023-02-01T07:39:18,501][INFO ][logstash.javapipeline    ][ansible-input] Pipeline terminated {"pipeline.id"=>"ansible-input"}
[2023-02-01T07:39:18,511][ERROR][logstash.agent           ] Failed to execute action {:id=>:"ansible-input", :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<ansible-input>, action_result: false", :backtrace=>nil}

@widhalmt widhalmt added this to the 1.0.0 milestone Feb 2, 2023
@widhalmt
Copy link
Member Author

widhalmt commented Feb 2, 2023

I disabled a check for enabled security in https://github.com/NETWAYS/ansible-collection-elasticstack/pull/5/files#diff-4001bacb15c0da113993bf42c647ba9b0445d698d6a2b40733e0fbf2ed1c2397L2-R8 . Honestly, I don't know if this just works by accident, maybe only with single node clusters. It did work in my tests but we need to test more thoroughly before removing the code.

Some checks (esp. oss) force release 7 to be used. So they run two times
with hardcoded release 7. That's a waste of ressources. We can accept it
because they will all be removed as soon as 7 is out of support
@widhalmt widhalmt marked this pull request as draft February 3, 2023 13:15
@widhalmt
Copy link
Member Author

widhalmt commented Feb 8, 2023

I added a new milestone: https://github.com/NETWAYS/ansible-collection-elasticstack/milestone/4 . We can use it to keep track of things we stumble upon that only work with version 7. Thanks @danopt for the contribution.

@widhalmt widhalmt marked this pull request as ready for review February 8, 2023 12:14
@widhalmt widhalmt merged commit 63fda46 into main Feb 9, 2023
@widhalmt widhalmt deleted the upgradeEL8/changes branch February 9, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants