You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by "KeonHee (Confluence)" <no...@apache.org> on 2021/05/06 07:32:27 UTC

[CONF] OpenWhisk > ContainerManager

|
[![](cid:avatar_28855ef39c6d72ce993aded2e21d1a4b)](https://cwiki.apache.org/confluence/display/~keonhee?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6) | KeonHee
**created** a page  
---|---  
|  
---  
|  | [![page icon](cid:page-
icon)](https://cwiki.apache.org/confluence/display/OPENWHISK/ContainerManager?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"page icon")  
---  
[ContainerManager](https://cwiki.apache.org/confluence/display/OPENWHISK/ContainerManager?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"ContainerManager")  
|

#  **1\. Introduction**

ContainerManager acts as a scheduler to decide which invoker to create a
container based on etcd data. It also deletes containers that have actions
other than the current version.

Therefore, it knows the information of all invokers registered in etcd, and
saves it in in-memory in the form of a map.

#  **2\. Architecture Diagram**

ContainerManager is an Actor component and handles two main messages of
container **creation** and **deletion**.

##  **2-1. Creation**

When the ContainerCreation message is received, ContainerManager determines
the invoker to create the container. When It decide Invoker, It register for
the CreationJobManager to wait for the creation of the container. At the same
time, send a CreationMessage to Kafka to pass the container creation message
to Invoker.

  

![](https://cwiki.apache.org/confluence/download/attachments/embedded-
page/OPENWHISK/ContainerManager/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202021-05-06%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%203.54.21.png?api=v2)

  

##  **2-2. Deletion**

It may receive a deletion message for deletion of containers generated by
previous versions of the current version. When the ContainerManager receive
this message, it query the Invoker that has an old version container in the
ETCD and then sends a ContainerDeletion message to that Invoker through Kafka.

**![](https://cwiki.apache.org/confluence/download/attachments/embedded-
page/OPENWHISK/ContainerManager/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202021-05-06%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%203.54.26.png?api=v2)**

  
  
  
---  
|  | [![View page Icon](cid:com.atlassian.confluence.plugins.confluence-email-
resources_view-page-email-adg-footer-
item_icon)](https://cwiki.apache.org/confluence/display/OPENWHISK/ContainerManager?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"View page Icon") | [View
page](https://cwiki.apache.org/confluence/display/OPENWHISK/ContainerManager?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"View page") |  •  
---|---|---  
[![Like Icon](cid:com.atlassian.confluence.plugins.confluence-like_view-email-
adg-content-
item_icon)](https://cwiki.apache.org/confluence/plugins/likes/like.action?contentId=181305649&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=like&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDg3NWJmMjQ2MzUwMTVjOTI2N2JjOGUwMmY2IiwicXNoIjoiY2E0ZWIyMzBlMDA3OTg4ZGY4ZGRiYzAzNjBjZWIxZDE0NTEyYjNlN2YxOTg2ODA3ZDZjNTVjMGEwODViN2ZkZiIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE2MjA4OTExNDcsImlhdCI6MTYyMDI4NjM0N30.bO3qkUT42-34G99DhaTR0H_XsBBWfAH2jTCpB0Q4zHY
"Like Icon") |
[Like](https://cwiki.apache.org/confluence/plugins/likes/like.action?contentId=181305649&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=like&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDg3NWJmMjQ2MzUwMTVjOTI2N2JjOGUwMmY2IiwicXNoIjoiY2E0ZWIyMzBlMDA3OTg4ZGY4ZGRiYzAzNjBjZWIxZDE0NTEyYjNlN2YxOTg2ODA3ZDZjNTVjMGEwODViN2ZkZiIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE2MjA4OTExNDcsImlhdCI6MTYyMDI4NjM0N30.bO3qkUT42-34G99DhaTR0H_XsBBWfAH2jTCpB0Q4zHY
"Like")  
---|---  
  
|  | [Stop watching
space](https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=OPENWHISK&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=stop-
watching&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDg3NWJmMjQ2MzUwMTVjOTI2N2JjOGUwMmY2IiwicXNoIjoiMTAzNDMxZGE2MmY3YjAyNGM0YzI0NGM2ZjU2MzZiNzM1ODJkNzcwYmU2YzAxODY4NGYzNjgzMDU0YjYzYzAwNSIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE2MjA4OTExNDcsImlhdCI6MTYyMDI4NjM0N30.zLoc0Uskg_V2VCH4W312laV4qI9pqRIZu6POUhGybLg)
| •  
---|---  
[Manage
notifications](https://cwiki.apache.org/confluence/users/editmyemailsettings.action?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1620286347208&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=manage)  
---  
| ![Confluence logo big](cid:footer-desktop-logo)  
---  
This message was sent by Atlassian Confluence 7.5.0  
![](cid:footer-mobile-logo)  
---