Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Not given an option to recover the app when created with invalid creds . #11

Open
sangee2004 opened this issue Dec 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sangee2004
Copy link

Steps to reproduce the problem:

  1. Deploy mongodb-atlas service (along with consuming app) - acorn run -n myaltas .
  2. When prompted for entering "Mongo Atlas credentials" , enter invalid creds.

App fails to deploy successfully.

NAME         IMAGE          COMMIT         CREATED     ENDPOINTS                                     MESSAGE
myaltas.db   f022f1a7529e   aec31c70c9bf   5m38s ago                                                 (job: create-cluster): Error: Exit Code 1, 5 failed attempts; (service: atlas): pending
myaltas      e5edf60f1b91   aec31c70c9bf   5m43s ago   https://myaltas-9d7065b9.wcovwb.on-acorn.io   (container: app): waiting for service to be created [db], waiting for service to be ready [db]; (service: db): acorn [myaltas.db] is not ready
  1. Try to update the app to see if we can correct the creds .

acorn run --update -n myaltas .

User is not prompted to enter the creds.

  1. Should we be deleting the invalid creds that has been created in this case ?
 acorn secrets
NAME                TYPE                                 KEYS                                  CREATED
atlas-creds-rm4b5   credential.cloud.mongodb.com/atlas   [private_key project_id public_key]   7m58s ago
@sangee2004 sangee2004 added the bug Something isn't working label Dec 12, 2023
@sangee2004
Copy link
Author

@cloudnautique I am able to edit the secrets and set the correct values and see the app recover automatically.

But there is no easy way for users to tell which secret is bound to this app.

acorn apps
NAME       IMAGE          COMMIT         CREATED   ENDPOINTS                                      MESSAGE
myaltas2   e5edf60f1b91   aec31c70c9bf   15m ago   https://myaltas2-8bc26899.wcovwb.on-acorn.io   OK
myaltas1   e5edf60f1b91   aec31c70c9bf   20m ago   https://myaltas1-82db6c84.wcovwb.on-acorn.io   OK
myaltas    e5edf60f1b91   aec31c70c9bf   33m ago   https://myaltas-9d7065b9.wcovwb.on-acorn.io    OK

acorn secrets
NAME                TYPE                                 KEYS                                  CREATED
atlas-creds-f5wdg   credential.cloud.mongodb.com/atlas   [private_key project_id public_key]   9m57s ago
myaltas2.db.admin   basic                                [password username]                   13m ago
myaltas2.db.user    basic                                [password username]                   13m ago
atlas-creds-czhnk   credential.cloud.mongodb.com/atlas   [private_key project_id public_key]   14m ago
myaltas1.db.admin   basic                                [password username]                   17m ago
myaltas1.db.user    basic                                [password username]                   17m ago
atlas-creds-rm4b5   credential.cloud.mongodb.com/atlas   [private_key project_id public_key]   29m ago
myaltas.db.admin    basic                                [password username]                   30m ago
myaltas.db.user     basic                                [password username]          

@cloudnautique
Copy link
Member

@sangee2004 in the initial scenario, can you do acorn login [APPNAME]

@sangee2004 sangee2004 changed the title Not able to recover the app when created with invalid creds. Not given an option to recover the app when created with invalid creds . Dec 12, 2023
@sangee2004
Copy link
Author

Able to use acorn login <app name> and create a new credential to be bound to the app.

We should be able to provide an error message that login creds failed and can be altered using acorn login <app-name.

Leaving this issue open for providing an error message in this case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants