netgroup-polito / CrownLabs

Kubernetes-based Remote Laboratories
https://crownlabs.polito.it
Apache License 2.0
105 stars 41 forks source link

LabInstance does not become green (ready) on the dashboard, even if VM is ready #126

Closed palexster closed 3 years ago

palexster commented 4 years ago

After creating the VM, the dashboard leaves the VM as "In progress", even if the VM is correctly ready and accessible:

apiVersion: instance.crown.team.com/v1
kind: LabInstance
metadata:
  creationTimestamp: "2020-03-30T13:19:01Z"
  generation: 1
  name: landc-lab1-alex.palesandro-5877
  namespace: tenant-alex-palesandro
  resourceVersion: "17484434"
  selfLink: /apis/instance.crown.team.com/v1/namespaces/tenant-alex-palesandro/labinstances/landc-lab1-alex.palesandro-5877
  uid: c930f429-a7ae-42f8-97c3-b46307ff9e4a
spec:
  labTemplateName: landc-lab1
  labTemplateNamespace: course-landc
  studentId: alex.palesandro
status:
  observedGeneration: 1
  phase: VmiReady
  url: apiVersion: instance.crown.team.com/v1
kind: LabInstance
metadata:
  creationTimestamp: "2020-03-30T13:19:01Z"
  generation: 1
  name: landc-lab1-alex.palesandro-5877
  namespace: tenant-alex-palesandro
  resourceVersion: "17484434"
  selfLink: /apis/instance.crown.team.com/v1/namespaces/tenant-alex-palesandro/labinstances/landc-lab1-alex.palesandro-5877
  uid: c930f429-a7ae-42f8-97c3-b46307ff9e4a
spec:
  labTemplateName: landc-lab1
  labTemplateNamespace: course-landc
  studentId: alex.palesandro
status:
  observedGeneration: 1
  phase: VmiReady
  url: https://crownlabs.polito.it/aa4b6712-63d4-41c9-9cd0-ff67ad5f7b77

bugreport

I would expect that after the login, the VM becomes green.

palexster commented 4 years ago
GabriFila commented 4 years ago

With @giorio94 we discovered that setting the HTTP header cache-control to no-cache in the watch request avoids this issue in Firefox This behavior can be emulated by setting the "disable cache" in the browser development tools

frisso commented 4 years ago

Hence, is the issue still present on Firefox? Should we label as "good 1st issue"?

GabriFila commented 4 years ago

Yes sadly it is still present, I tried to change the kubernetes client library to add custom headers to the watcher request (this line in this branch) but it didn't work.

In Firefox it actually works when the disable cache toggle is active in the browser devtools. So now I would start by understanding what actually happens in the browser when that toggle is on.

Since it is related to some elements from the backend and the frontend, I don't know if it could be classified as a good first issue

GabriFila commented 3 years ago

Closing due to liqo dashboard usage