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

Executor: Inconsistent behavior in pod reaper and executor backend #1010

Open
life1347 opened this issue Nov 30, 2018 · 0 comments
Open

Executor: Inconsistent behavior in pod reaper and executor backend #1010

life1347 opened this issue Nov 30, 2018 · 0 comments

Comments

@life1347
Copy link
Member

Currently, the environment metadata UID is cached in service function cache entry.
For a scenario like following

  1. A user create an environment, which's UID is ooo-xxx
  2. Create a function with that environment.
  3. Delete the environment
  4. Create a same name environment (but k8s assign different UID).

This scenario make behavior inconsistent in idle pod reaper and function pod scaling.

Use UID in pod reaper.

if _, ok := envList[fsvc.Environment.Metadata.UID]; !ok {
log.Printf("Environment %v for function %v no longer exists",
fsvc.Environment.Metadata.Name, fsvc.Name)
}

Use env name to get env obj when scale pod deployment.

env, err := deploy.fissionClient.
Environments(fn.Spec.Environment.Namespace).
Get(fn.Spec.Environment.Name)
if err != nil {
return fsvc, err
}

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

No branches or pull requests

2 participants