You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2022/04/26 20:54:28 UTC

[GitHub] [openwhisk] bdoyle0182 opened a new pull request, #5226: add zookeeper storage prefixing to support multi-cluster

bdoyle0182 opened a new pull request, #5226:
URL: https://github.com/apache/openwhisk/pull/5226

   ## Description
   Similar to the recent kafka topic prefixing addition, we would like to be able to use the same zookeeper cluster for multiple openwhisk clusters without having the potential for invoker id clashes.
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [X] Scheduler
   - [X] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [X] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
   
   - [X] I signed an [Apache CLA](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md).
   - [X] I reviewed the [style guides](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md#coding-standards) 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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk] codecov-commenter commented on pull request #5226: add zookeeper storage prefixing to support multi-cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #5226:
URL: https://github.com/apache/openwhisk/pull/5226#issuecomment-1110331627

   # [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5226?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#5226](https://codecov.io/gh/apache/openwhisk/pull/5226?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e11ea4d) into [master](https://codecov.io/gh/apache/openwhisk/commit/3e3414ced7fb6e6d85b95f0f9cdd43a0a68da4fd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3e3414c) will **decrease** coverage by `3.59%`.
   > The diff coverage is `25.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #5226      +/-   ##
   ==========================================
   - Coverage   44.49%   40.89%   -3.60%     
   ==========================================
     Files         238      238              
     Lines       13957    13959       +2     
     Branches      570      556      -14     
   ==========================================
   - Hits         6210     5709     -501     
   - Misses       7747     8250     +503     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5226?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...he/openwhisk/core/invoker/InstanceIdAssigner.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnN0YW5jZUlkQXNzaWduZXIuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
   | [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `95.78% <100.00%> (+0.02%)` | :arrow_up: |
   | [...pache/openwhisk/http/LenientSprayJsonSupport.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2h0dHAvTGVuaWVudFNwcmF5SnNvblN1cHBvcnQuc2NhbGE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...g/apache/openwhisk/common/ResizableSemaphore.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9SZXNpemFibGVTZW1hcGhvcmUuc2NhbGE=) | `0.00% <0.00%> (-88.47%)` | :arrow_down: |
   | [...ache/openwhisk/utils/ExecutionContextFactory.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL3V0aWxzL0V4ZWN1dGlvbkNvbnRleHRGYWN0b3J5LnNjYWxh) | `7.69% <0.00%> (-76.93%)` | :arrow_down: |
   | [...n/scala/org/apache/openwhisk/utils/JsHelpers.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL3V0aWxzL0pzSGVscGVycy5zY2FsYQ==) | `0.00% <0.00%> (-55.56%)` | :arrow_down: |
   | [.../org/apache/openwhisk/common/NestedSemaphore.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9OZXN0ZWRTZW1hcGhvcmUuc2NhbGE=) | `27.27% <0.00%> (-54.55%)` | :arrow_down: |
   | [...a/org/apache/openwhisk/core/entity/WhiskRule.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L1doaXNrUnVsZS5zY2FsYQ==) | `17.64% <0.00%> (-45.10%)` | :arrow_down: |
   | [...org/apache/openwhisk/core/entity/WhiskEntity.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L1doaXNrRW50aXR5LnNjYWxh) | `49.23% <0.00%> (-30.77%)` | :arrow_down: |
   | [...rg/apache/openwhisk/core/entity/WhiskTrigger.scala](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L1doaXNrVHJpZ2dlci5zY2FsYQ==) | `64.28% <0.00%> (-28.58%)` | :arrow_down: |
   | ... and [46 more](https://codecov.io/gh/apache/openwhisk/pull/5226/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5226?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5226?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [3e3414c...e11ea4d](https://codecov.io/gh/apache/openwhisk/pull/5226?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk] style95 commented on a diff in pull request #5226: add zookeeper storage prefixing to support multi-cluster

Posted by GitBox <gi...@apache.org>.
style95 commented on code in PR #5226:
URL: https://github.com/apache/openwhisk/pull/5226#discussion_r861478781


##########
common/scala/src/main/resources/application.conf:
##########
@@ -128,6 +128,10 @@ whisk {
         logs-enabled       = ${?METRICS_LOG}
     }
 
+    zookeeper {
+        prefix = ""

Review Comment:
   How about adding a comment to describe it should start without `/` and end with `/`?
   



##########
core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InstanceIdAssigner.scala:
##########
@@ -39,7 +41,8 @@ private[invoker] class InstanceIdAssigner(connectionString: String)(implicit log
     zkClient.blockUntilConnected()
     logger.info(this, "invokerReg: connected to zookeeper")
 
-    val rootPath = "/invokers/idAssignment/mapping"
+    val zookeeperPrefix = loadConfigOrThrow[String](ConfigKeys.zookeeperStoragePrefix)
+    val rootPath = s"/${zookeeperPrefix}invokers/idAssignment/mapping"

Review Comment:
   👍 
   If nothing specified, it would work as-is.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk] bdoyle0182 closed pull request #5226: add zookeeper storage prefixing to support multi-cluster

Posted by "bdoyle0182 (via GitHub)" <gi...@apache.org>.
bdoyle0182 closed pull request #5226: add zookeeper storage prefixing to support multi-cluster
URL: https://github.com/apache/openwhisk/pull/5226


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk] jiangpengcheng commented on a diff in pull request #5226: add zookeeper storage prefixing to support multi-cluster

Posted by GitBox <gi...@apache.org>.
jiangpengcheng commented on code in PR #5226:
URL: https://github.com/apache/openwhisk/pull/5226#discussion_r867314282


##########
common/scala/src/main/scala/org/apache/openwhisk/core/WhiskConfig.scala:
##########
@@ -216,6 +216,7 @@ object ConfigKeys {
   val kafkaTopics = s"$kafka.topics"
   val kafkaTopicsPrefix = s"$kafkaTopics.prefix"
   val kafkaTopicsUserEventPrefix = s"$kafkaTopics.user-event.prefix"
+  val zookeeperStoragePrefix = s"zookeeper.prefix"

Review Comment:
   should be `whisk.zookeeper.prefix`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org