Skip to content

error creating training portal - secret already exists #1154

Description

@djschny

Describe the bug

  1. Delete training portal CRD
  2. Create training portal CRD with same name

Observe training portal does not start and there are errors in the session manager logs.

Additional information

Session Mananager logs:

INFO:educates.trainingportal:Training portal creation request for tanzu-snowflake being processed.
ERROR:educates.trainingportal:Unexpected error creating training portal tanzu-snowflake.
Traceback (most recent call last):
  File "/opt/app-root/venv/lib64/python3.13/site-packages/pykube/http.py", line 437, in raise_for_status
    resp.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/opt/app-root/venv/lib64/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: https://10.2.0.1:443/apis/secrets.educates.dev/v1beta1/secretcopiers

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/app-root/src/handlers/trainingportal.py", line 1043, in training_portal_create
    SecretCopier(api, ingress_secret_copier_body).create()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/opt/app-root/venv/lib64/python3.13/site-packages/pykube/objects.py", line 131, in create
    self.api.raise_for_status(r)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/opt/app-root/venv/lib64/python3.13/site-packages/pykube/http.py", line 444, in raise_for_status
    raise HTTPError(resp.status_code, payload["message"])
pykube.exceptions.HTTPError: object is being deleted: secretcopiers.secrets.educates.dev "educates-ingress-secret-tanzu-snowflake-ui" already exists

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions