Skip to content

[ws-manager-mk2] always update workspace pod ip #20830

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 21, 2025
Merged

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented May 21, 2025

Description

We should always synchronize the IP addresses, even if they have been set before.

Related Issue(s)

Related to CLC-1368

How to test

  1. start a workspace in preview env
  2. reboot the node
  3. use kubectl to get workspace crd info, the runtime->podIP should be cleanup
image

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@iQQBot
Copy link
Contributor Author

iQQBot commented May 21, 2025

/unhold

@kylos101
Copy link
Contributor

Testing now, will then review code

@kylos101
Copy link
Contributor

stop and restart are fine

@kylos101
Copy link
Contributor

We see after node start, the pod in fact lacks an IP:

gitpod /workspace/gitpod (pd/ws-sync-ip) $ kubectl get pod ws-5c2cfd17-0fbd-418d-aa02-585f95cfb22f -o wide
NAME                                      READY   STATUS    RESTARTS   AGE     IP       NODE                    NOMINATED NODE   READINESS GATES
ws-5c2cfd17-0fbd-418d-aa02-585f95cfb22f   0/1     Unknown   0          5m13s   <none>   preview-pd-ws-sync-ip   <none>           <none>
gitpod /workspace/gitpod (pd/ws-sync-ip) $ kubectl get pod ws-5c2cfd17-0fbd-418d-aa02-585f95cfb22f -o yaml | grep -i IP
    cni.projectcalico.org/podIP: ""
    cni.projectcalico.org/podIPs: ""
      value: https://pd-ws-sync-ip.preview.gitpod-dev.com
      value: https://gitpoddemos-votingapp-xh33h5xcve3.ws-dev.pd-ws-sync-ip.preview.gitpod-dev.com
      value: ws-dev.pd-ws-sync-ip.preview.gitpod-dev.com
      value: '{"id":"g1-standard","category":"GENERAL PURPOSE","displayName":"Standard","description":"Standard
      value: https://open-vsx.pd-ws-sync-ip.preview.gitpod-dev.com
    image: reg.pd-ws-sync-ip.preview.gitpod-dev.com:31750/remote/5c2cfd17-0fbd-418d-aa02-585f95cfb22f
  nodeName: preview-pd-ws-sync-ip
      localhostProfile: workspace_default_pd-ws-sync-ip-gha.32707.json
    image: reg.pd-ws-sync-ip.preview.gitpod-dev.com:31750/remote/51354184-4db2-41bf-b5e7-f392d8bdd56c:latest
    imageID: reg.pd-ws-sync-ip.preview.gitpod-dev.com:31750/remote/51354184-4db2-41bf-b5e7-f392d8bdd56c@sha256:00faa92d7741a4c15a0e37f911f527730f4ff5a1ad68621bbc5cf2b77f0272d6
  hostIP: 10.132.0.62

It does remain in the list of workspaces, however, that's resolved in #20829 .

@kylos101
Copy link
Contributor

And for a fresh workspace we start:

gitpod /workspace/gitpod (pd/ws-sync-ip) $ kubectl get pod ws-8f472742-c5b4-4baa-b0f0-c277f3af02d5 -o yaml | grep -i podIP
    cni.projectcalico.org/podIP: 192.168.198.159/32
    cni.projectcalico.org/podIPs: 192.168.198.159/32
  podIP: 192.168.198.159
  podIPs:

Copy link
Contributor

@kylos101 kylos101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 we'll be in a position to loadgen test tomorrow. Thanks, @iQQBot ! If you end up landing changes from both PRs, please do a loadgen against catfood.

@roboquat roboquat merged commit 2bce70b into main May 21, 2025
76 of 77 checks passed
@roboquat roboquat deleted the pd/ws-sync-ip branch May 21, 2025 20:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants