gitpod icon indicating copy to clipboard operation
gitpod copied to clipboard

[ws-manager-bridge] cannot use `gpctl clusters update <command>` in preview environment with empty short name

Open kylos101 opened this issue 3 years ago • 1 comments

Bug description

--name is required with gpctl, but, shortname is empty, "" in the database and preview config, I think shortName used to be "default".

The ws-manager-bridge API requires name, too.

We need the ability to use gpctl command more easily in preview environments. For this to happen, the Gitpod cluster name must be set.

Steps to reproduce

# the cluster name is not set
gpctl clusters list
NAME        URL                           STATIC        STATE            SCORE        GOVERNED        ADMISSION CONSTRAINTS
            dns:///ws-manager:8080        true          AVAILABLE        50           true            []

# cannot use without name value
gpctl clusters update score 00 --name
Error: flag needs an argument: --name

# cannot pass in an empty cluster name
gpctl clusters update score 00 --name " "
FATA[0001] rpc error: code = Unknown desc = a WorkspaceCluster with name   does not exist in the DB! 

Workspace affected

n/a

Expected behavior

Cluster name in preview environments should be an actual value (not empty string). For example, this way, we can set the score to 0, or cordon it, to observe that workspaces do not even get set to Pending.

Example repository

No response

Anything else?

No response

kylos101 avatar Sep 21 '22 01:09 kylos101

@geropl @meysholdt heads up, I'm not sure why the name for preview environments when we use gpctl clusters list is empty, but it appears to prevent us from using gpctl clusters update commands. For example, I'd like to update the score to zero or cordon the cluster, so that we cannot start workspaces. Why? This is a test, but, would also give customers in single cluster environments the ability to prevent workspace starts during outage windows where they are updating clusters.

cc: @lucasvaltl @corneliusludmann

kylos101 avatar Sep 21 '22 01:09 kylos101

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 20 '22 20:12 stale[bot]