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

remove zookeeper config requirement #5375

Merged

Conversation

bdoyle0182
Copy link
Contributor

Description

First step to getting rid of the zookeeper dependency on the invokers. Invokers currently can already be started without the zookeeper config if --id flag is set which is already the case in ansible. The only case that needs to be covered still before removing the dependency is adding support for kubernetes deployment. If started without config and need to connect to zookeeper still, the invoker will fail and shut down anyways from failing to connect to zookeeper in the instance id assigner on startup so this shouldn't be a breaking change.

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Scheduler
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

@codecov-commenter
Copy link

Codecov Report

Merging #5375 (703c3a8) into master (096dba4) will decrease coverage by 61.94%.
The diff coverage is n/a.

❗ Current head 703c3a8 differs from pull request most recent head 3a3407b. Consider uploading reports for the commit 3a3407b to get more accurate results

@@            Coverage Diff             @@
##           master   #5375       +/-   ##
==========================================
- Coverage   66.46%   4.53%   -61.94%     
==========================================
  Files         240     240               
  Lines       14569   14567        -2     
  Branches      642     647        +5     
==========================================
- Hits         9684     660     -9024     
- Misses       4885   13907     +9022     
Impacted Files Coverage Δ
...la/org/apache/openwhisk/core/invoker/Invoker.scala 0.00% <ø> (-72.50%) ⬇️
...rg/apache/openwhisk/core/scheduler/Scheduler.scala 0.00% <ø> (-1.90%) ⬇️
...ain/scala/org/apache/openwhisk/spi/SpiLoader.scala 0.00% <0.00%> (-100.00%) ⬇️
...n/scala/org/apache/openwhisk/utils/JsHelpers.scala 0.00% <0.00%> (-100.00%) ⬇️
...scala/org/apache/openwhisk/common/Prometheus.scala 0.00% <0.00%> (-100.00%) ⬇️
...scala/org/apache/openwhisk/core/FeatureFlags.scala 0.00% <0.00%> (-100.00%) ⬇️
...scala/org/apache/openwhisk/http/CorsSettings.scala 0.00% <0.00%> (-100.00%) ⬇️
...ala/org/apache/openwhisk/common/ConfigMXBean.scala 0.00% <0.00%> (-100.00%) ⬇️
...la/org/apache/openwhisk/http/BasicRasService.scala 0.00% <0.00%> (-100.00%) ⬇️
...a/org/apache/openwhisk/common/ConfigMapValue.scala 0.00% <0.00%> (-100.00%) ⬇️
... and 184 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -91,7 +91,6 @@ object Invoker {
Map(servicePort -> 8080.toString) ++
ExecManifest.requiredProperties ++
kafkaHosts ++
zookeeperHosts ++
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this configuration, a k8s deployment can still take advantage of the zookeeper?
I think we need to handle the zookeeper dependency in the k8s deployment first.

Copy link
Contributor Author

@bdoyle0182 bdoyle0182 Feb 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this just makes it such that you can start the invoker without having the config set. If you try to do that right now it will fail, but this doesn't remove the config from existing just the requirement. Just that you don't need it to start.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't have it set but need it based on the arguments you passed to the invoker, it will hit this same case where the invoker errors out and stops:

// --uniqueName is defined with a valid value, id is empty, assign an id via zookeeper case CmdLineArgs(Some(unique), None, _, overwriteId) => if (config.zookeeperHosts.startsWith(":") || config.zookeeperHosts.endsWith(":")) { abort(s"Must provide valid zookeeper host and port to use dynamicId assignment (${config.zookeeperHosts})") }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I got the intention, this is just to remove the zookeeper hosts from the required configs.
It does not block adding zookeeper hosts if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants