acorn-io / runtime

A simple application deployment framework built on Kubernetes

Home Page:https://docs.acorn.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to login to orphaned nested service acorns that are in "login required" state resulting in not able to remove this orphaned service.

sangee2004 opened this issue · comments

acorn version - v0.10.1-rc1-8-gce008aeb+ce008aeb

Steps to reproduce the problem:

  1. Deploy app from https://github.com/acorn-io/mongodb-atlas/tree/main/examples
  2. When prompted for entering credentials , quit the deployment process which will result in app and nested service get to "login required" state.
acorn apps
NAME                IMAGE                          COMMIT         CREATED     ENDPOINTS                                               MESSAGE
mytestmongo1.db     966bf6a20cf6                   6f25ec5470da   43s ago                                                             "acorn login mytestmongo1.db" required
mytestmongo1        cec9c0f2b9d1                   6f25ec5470da   49s ago     https://mytestmongo1-004066b4.8w80e0.on-acorn.io        "acorn login mytestmongo1" required
  1. Remove mytestmongo1 using acorn rm mytestmongo1 . This leaves behind nested service acorn in "login required" state.
mytestmongo1.db     966bf6a20cf6                   6f25ec5470da   30m ago                                                             "acorn login mytestmongo1.db" required
  1. Trying to remove mytestmongo1.db using acorn rm results in the app getting stuck in "removing" state.
                    "state": "removing",
                    "transitioningMessages": [
                        "(job: delete-cluster): waiting for secret to be created [atlas-creds]",
                        "(secret: admin): waiting: [job not complete]; (secret: atlas-creds): missing: \"acorn login mytestmongo1.db\" required; (secret: user): waiting: [job not complete]",
                        "(service: atlas): pending"
                    ]
                }

  1. Trying to login fails:
acorn login mytestmongo1.db
? Choose an existing credential or enter a new one for [mytestmongo1.db.atlas-creds] Existing: atlas-creds-sqfmf (Keys: [private_key, project_id, public_key], Created: [2024-01-24 11:27:50 -0800 PST])
  ✗  ERROR:  apps.api.acorn.io "mytestmongo1" not found

The only way to delete this service is by using "--ignore-cleanup" flag.

Expected Behavior:
Do we expect acorn login mytestmongo1.db to succeed in this case even when it is orphaned ?