Tyson Norris <[email protected]> wrote on 03/27/2018 06:25:59 PM: > > Do you have an example of the labels working? I guess the labels are > changed over time through the lifecycle of the container? >
Apologies for brutally chopping the email chain; my mail client made a horrible hash of it. Right now, all we are doing with Kube labels is to label each action container with its owning invoker on startup. This lets us delete orphaned containers if the invoker crashes and needs to be restarted. The labeling happens at [1] and the removal of orphans using the labels at [2]. I think the Kube-native version of part of what you are doing with the DistributedData for Mesos would be to add and remove additional labels to give us the option of attaching a new invoker instance to orphaned containers instead of just destroying them. Interacting with the Kubernetes API server to do a labeling operation takes around 10ms, so we couldn't do this on a truly hot path. But we could probably afford to update container labels in parallel with pause/unpause operations, which could enable re-attachment to any paused containers. --dave [1] https://github.com/apache/incubator-openwhisk/blob/0b20df0f725a671f8e51c9e8793116476fd22f76/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala#L81 [2] https://github.com/apache/incubator-openwhisk/blob/0b20df0f725a671f8e51c9e8793116476fd22f76/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala#L57
