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

Dev Workspace Controller Loop with Identical Endpoint Names on DevWorkspace #23231

Open
eye0fra opened this issue Nov 4, 2024 · 2 comments
Open
Assignees
Labels
area/devworkspace-operator kind/bug Outline of a bug - must adhere to the bug report template.

Comments

@eye0fra
Copy link

eye0fra commented Nov 4, 2024

Describe the bug

If I start two workspaces containing an endpoint with the same name, the dev workspace controller enters a loop. As a result, both namespaces do not start and remain stuck on "Preparing Service".

sample devfile

schemaVersion: 2.3.0
metadata:
  name: endpoints-issue
components:
  - name: tools
    container:
      image: quay.io/devfile/universal-developer-image:ubi8-latest
      memoryRequest: 1G
      memoryLimit: 4G
      cpuRequest: '1'
      cpuLimit: '2'
  - name: data
    volume:
      size: 256Mi
  - name: postgresql
    container:
      image: quay.io/fedora/postgresql-12:latest
      cpuLimit: "1"
      cpuRequest: 50m
      memoryLimit: 512Mi
      memoryRequest: 64Mi
      endpoints:
        - exposure: internal
          targetPort: 5432
          name: postgresql
          protocol: tcp
          attributes:
            discoverable: true
      env:
        - name: POSTGRESQL_USER
          value: user
        - name: POSTGRESQL_PASSWORD
          value: pass
        - name: POSTGRESQL_ROOT_PASSWORD
          value: root
        - name: POSTGRESQL_DATABASE
          value: db
      volumeMounts:
        - name: data
          path: /var/lib/pgsql/data

Che version

7.93@latest

Steps to reproduce

  1. Create two workspaces with endpoints having the same name.
  2. Start both workspaces.
  3. Observe that the dev workspace controller goes into a loop and both namespaces remain stuck on "Preparing Service".

Expected behavior

Both workspaces should start without any issues

Runtime

OpenShift

Screenshots

Screenshot 2024-11-04 at 15 15 26 Screenshot 2024-11-04 at 15 16 28 Screenshot 2024-10-31 at 11 44 26

Installation method

OperatorHub

Environment

other (please specify in additional context)

Eclipse Che Logs

No response

Additional context

Environment:
DevSpaces Version: 3.16.1
DevWorkspaces Operator Version: 0.30.2

@eye0fra eye0fra added the kind/bug Outline of a bug - must adhere to the bug report template. label Nov 4, 2024
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 4, 2024
@ibuziuk ibuziuk moved this to 📅 Planned for this Sprint in Eclipse Che Team B Backlog Nov 4, 2024
@AObuchow
Copy link

AObuchow commented Nov 4, 2024

@eye0fra Thank you for reporting this. For what its worth, this is an internally known DWO issue that's currently only documented as a TODO.

I'm not sure if there's any effective way for us to solve this: discoverable endpoints are intended to have services with a static, predefined name so that you can predict what the service will be called. If we add some level of randomization to the service's name, then it will no longer have a static name.

When starting up a workspace, we might be able to check if another workspace defines a service with the same name and fail the workspace if so, to alert the user that they need to use a different discoverable endpoint name?

Additionally, it should be documented that different devfiles used by the same user cannot define discoverable endpoints with the same name.

@eye0fra
Copy link
Author

eye0fra commented Nov 4, 2024

Hi @AObuchow ,

I agree that notifying the user is the best approach for now. This way, they can make the necessary edits to the DW/devfile accordingly.

@AObuchow AObuchow removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 5, 2024
@dkwon17 dkwon17 self-assigned this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devworkspace-operator kind/bug Outline of a bug - must adhere to the bug report template.
Projects
Status: 📅 Planned for this Sprint
Development

No branches or pull requests

4 participants