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

Dedicated Invokers #5292

Merged
merged 2 commits into from
Jul 24, 2022
Merged

Dedicated Invokers #5292

merged 2 commits into from
Jul 24, 2022

Conversation

style95
Copy link
Member

@style95 style95 commented Jul 22, 2022

Description

Actions run on any invokers in OpenWhisk. But users may want to run their actions on a certain invoker(s) for some reason such as IP-based ACL.
This is to provide dedicated invokers for a namespace. Operators can configure a dedicated namespace for invokers and all activations from the namespace will be delivered to the dedicated invokers only.

invoker0 ansible_host=${INVOKER01} tags="['dedicated']" dedicatedNamespaces="['namespace1']"
invoker1 ansible_host=${INVOKER02} tags="['dedicated']" dedicatedNamespaces="['namespace2']"

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.

This is to provide dedicated invokers for a namespace. Operators can configure a dedicated namespace for invokers and all activations from the namespace will be delivered to the dedicated invokers only.
@style95
Copy link
Member Author

style95 commented Jul 22, 2022

@style95 style95 changed the title Dedicated namespace Dedicated Invokers Jul 22, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2022

Codecov Report

Merging #5292 (108ffff) into master (d55d8fe) will decrease coverage by 16.98%.
The diff coverage is 16.66%.

@@             Coverage Diff             @@
##           master    #5292       +/-   ##
===========================================
- Coverage   79.91%   62.92%   -16.99%     
===========================================
  Files         238      238               
  Lines       14172    14178        +6     
  Branches      624      624               
===========================================
- Hits        11325     8921     -2404     
- Misses       2847     5257     +2410     
Impacted Files Coverage Δ
...la/org/apache/openwhisk/core/invoker/Invoker.scala 7.50% <0.00%> (-65.84%) ⬇️
.../scala/org/apache/openwhisk/core/WhiskConfig.scala 94.28% <100.00%> (-1.70%) ⬇️
...che/openwhisk/core/invoker/LogStoreCollector.scala 0.00% <0.00%> (-100.00%) ⬇️
...nwhisk/core/scheduler/queue/ContainerCounter.scala 0.00% <0.00%> (-100.00%) ⬇️
...hisk/core/scheduler/message/ContainerMessage.scala 0.00% <0.00%> (-100.00%) ⬇️
...core/database/cosmosdb/RxObservableImplicits.scala 0.00% <0.00%> (-100.00%) ⬇️
...ore/database/cosmosdb/cache/CacheInvalidator.scala 0.00% <0.00%> (-100.00%) ⬇️
...e/database/cosmosdb/cache/ChangeFeedConsumer.scala 0.00% <0.00%> (-100.00%) ⬇️
...core/scheduler/queue/SchedulingDecisionMaker.scala 0.00% <0.00%> (-98.80%) ⬇️
...sk/core/scheduler/container/ContainerManager.scala 0.00% <0.00%> (-96.90%) ⬇️
... and 62 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@style95
Copy link
Member Author

style95 commented Jul 22, 2022

I confirmed it's working as expected.

I configured invokers like this.

whisk/invokers/0/0
{"busyMemory":0,"dedicatedNamespaces":["guest"],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":["dedicated"]}
whisk/invokers/1/1
{"busyMemory":0,"dedicatedNamespaces":["whisk.system"],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":["dedicated"]}
whisk/invokers/2/2
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
whisk/invokers/3/3
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
whisk/invokers/4/4
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
whisk/invokers/5/5
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
whisk/invokers/6/6
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
whisk/invokers/7/7
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
whisk/invokers/8/8
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
whisk/invokers/9/9
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}

And created 10 actions in guest and whisk.system namespace.

create.sh

#!/bin/bash

for i in {1..10}
do
    wsk action update params$i tests/dat/actions/params.js -i -a invoker-resources '["dedicated"]'
done

And invoked them respectively.

#!/bin/bash

for i in {1..10}
do
    wsk action invoke params$i -r -i
done

I confirmed all 10 actions only run on dedicated invokers respectively.

guest(invoker0)

whisk/namespace/guest/guest/params1/1-6051ac947a45aac1627d5de78744b6b4/invoker0/container/10afecfc5997f5af8d01717776fcd61b1f612a6669f2c7caf09fa3bab7c73b5d

whisk/namespace/guest/guest/params10/1-6123264a86af64c59273d4574fb773a8/invoker0/container/f24cbb3efd9b35cb80d1e0387b0cdd303aa15620773d278c5648014838f464a2

whisk/namespace/guest/guest/params2/1-f2568bab66da5aff45198b56397d1f32/invoker0/container/cae4c20e986e2b2019f05cf814f6ac9237a6739b75f93e438a0474ceee826890

whisk/namespace/guest/guest/params3/1-f9f5c689e9cac2fe61264cdf452f3469/invoker0/container/1b28fa7938695c28bef57c8ba5bc18aecd37534a195e591608c34984e3da7051

whisk/namespace/guest/guest/params3/1-f9f5c689e9cac2fe61264cdf452f3469/invoker0/container/6ef46b360e230fc6d9f3a4983d33f0453aa91f4fce3e9efab98525c0adad45e8

whisk/namespace/guest/guest/params4/1-49de0656975aa70be55adf6ecb53e9e7/invoker0/container/e342cddb78bbce8e3b4e24a1d6ca635e428490af2f6258f2d5d45cbf1e6ceafc

whisk/namespace/guest/guest/params5/1-40da6ab764bdd001c41a4db58c32be3e/invoker0/container/5c030a90c145145b291753fad934362c333b4e3ad123c69a8ef109c111b22a06

whisk/namespace/guest/guest/params6/1-4833318bd255ca08dbe0077b7e4e3cdc/invoker0/container/d202a3f52cb58b6dd465d49aadf531bef45d528bcad92b468f2deafb05305f4f

whisk/namespace/guest/guest/params7/1-80cdba467ff2c9e1cc71400735da4a41/invoker0/container/9f4ffe1d26eef147f49b52aca7a57e1f4bf6eb8ce6e98b94f6574ac283f7906e

whisk/namespace/guest/guest/params8/1-a32c872006ed9bf74816d7da4ca50fcd/invoker0/container/107570e5f27f5d36ee95daa0e0ca454173bd35617da510e3f28d5429072e9dfc

whisk/namespace/guest/guest/params9/1-0dfe91b13a09edba88324e46f7db887b/invoker0/container/b15cdf83cec6a680df4c1069a62673b835ee7d69afee65b9bd7fbf90632d2471

whisk.system(invoker1)

whisk/namespace/whisk.system/whisk.system/params1/1-3c9802cb7b3e8edd4d693c9ced357017/invoker1/container/a3c1de2727b4d64d993e968572e6e64c6e2da42e33079654e65d53b905b48156

whisk/namespace/whisk.system/whisk.system/params10/1-83364b391c341bd9a1f2f0ab7c54d513/invoker1/container/17c5cc9e2cb00f2d21b5943a0443d7d4f4dd6ed071977dfe46a892328a8159f3

whisk/namespace/whisk.system/whisk.system/params2/1-e057dc813043dc9e6129caf0cfe56c1f/invoker1/container/1adaa49a1f7e57d7f8780dd520e86bda5b07bacb7a97aca6e92d1888fd7684a7

whisk/namespace/whisk.system/whisk.system/params3/1-97842714bc91c90c857b9a101a4653b2/invoker1/container/577bf150ca48a3f1f6e31ed2dd2865d7c781cc0aa8389d93262c109430dc54f7

whisk/namespace/whisk.system/whisk.system/params4/1-b2b6491ba4777317faa82e09c173df1c/invoker1/container/5be71130c1b30b2320693ffabfec22931fec247bbc38dfe4ff9537fabc1095bc

whisk/namespace/whisk.system/whisk.system/params4/1-b2b6491ba4777317faa82e09c173df1c/invoker1/container/8132c0d4c5aea7f2085b022b91e437c8bae9884dbedf7b86998622aa80fce4c3

whisk/namespace/whisk.system/whisk.system/params5/1-4c7102162a9c6cd366deed9a70bb2518/invoker1/container/39f85c9330a77fe1114bf0d30178c56e2e0e16eb80cc8c6e961ff8310597a0db

whisk/namespace/whisk.system/whisk.system/params5/1-4c7102162a9c6cd366deed9a70bb2518/invoker1/container/781064d31396f62d350cb19a845a69e48c9702b7eb60bf367f496778edf31e93

whisk/namespace/whisk.system/whisk.system/params6/1-9bd24d443546fba82d4550a987140b72/invoker1/container/10c6ba1fc407436b627d1bbd12591893b937601c8576acf51e0d8b788aa7537e

whisk/namespace/whisk.system/whisk.system/params6/1-9bd24d443546fba82d4550a987140b72/invoker1/container/5f8a718926fc2738ce4a4ee7b52f6540d5e659106e6bc1e76884a24d70db43a1

whisk/namespace/whisk.system/whisk.system/params7/1-ab315bc8abdf341a03c6575a5bbdb951/invoker1/container/95bed4d7083375985c7d7b04822354cd3fc2eeddaeedb165b2c1aa93145f5f39

whisk/namespace/whisk.system/whisk.system/params8/1-ced39b1ad93a1fe360e9a21d47667710/invoker1/container/55eaa9f2789e1eebf3ff293e0f717e83879d223c17d10fc93976525bd9b8dffa

whisk/namespace/whisk.system/whisk.system/params9/1-f6dd155337373ba37aef4b93b1cccbee/invoker1/container/009f2762b5b9c4ce92f403c5c2a6c96357f25613f5c363701ae102f98b1ddc31

@ningyougang
Copy link
Contributor

The pr titile may changed from Dedicated Invokers to Dedicated namespace ?

@ningyougang
Copy link
Contributor

ningyougang commented Jul 22, 2022

LGTM with small suggestion

@style95
Copy link
Member Author

style95 commented Jul 22, 2022

The pr titile may changed from Dedicated Invokers to Dedicated namespace ?

It was Dedicated namespace but I changed to Dedicated Invokers as the invoker is dedicated to a certain namespace.
image

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

4 participants