deis / controller

Deis Workflow Controller (API)
https://deis.com
MIT License
41 stars 53 forks source link

DEIS_DEPLOY_PROCFILE_MISSING_REMOVE broken #1320

Closed Cryptophobia closed 6 years ago

Cryptophobia commented 6 years ago

DEIS_DEPLOY_PROCFILE_MISSING_REMOVE was set to true in our controller (quay.io/deis/controller:v2.16.0) and it does not seem to clean up the Procfile processes from the deis api structure object.

After removing the process types from the Procfile and redeploying we still see them in the structure object:

...
    "structure": {
        "web2": 0,
        "worker": 2,
        "web": 1,
        "worker-two": 0
    },
...

EDIT: We tested it 4 times and deployed 4 times to make sure this was so.

Cryptophobia commented 6 years ago

Is there another way to remove the procfile types?

bacongobbler commented 6 years ago

That is intended behaviour. The behaviour is you should not see any pods running in the cluster.

It's merely a scale-down operation. We keep it around so users can scale up those processes if desired.

Cryptophobia commented 6 years ago

I see. Thanks!

We were thinking the processes should disappear from the API. What is the best way to remove those zombie processes from the deis-controller API then? Let's say we will never use web2 ever again. Is there a way we can make it disappear from the deis app api structure completely?

Cryptophobia commented 6 years ago

So the problem is that, the structure (processes) are not removed from the app object API call.

This is a problem because if you try to use structure object to send a subsequent API call to /scale endpoint, you would not be able to do it...

{    "detail": "Container type web2 does not exist in application" }

In the above scenario, we are using an API output from one API endpoint to feed into another dependent endpoint and it does not work. Thus, the Procfile variable should remove the process_types from the structure object of app if possible.