fabric8-services / fabric8-jenkins-proxy

Apache License 2.0
1 stars 16 forks source link

Fix #256 send only one request to get the status of Jenkins pod #273

Closed sthaha closed 6 years ago

sthaha commented 6 years ago

The patch also delays reloading the page so that Jenkins pods get some time after it boots to initialise properly.

centos-ci commented 6 years ago

Can one of the admins verify this patch?

kishansagathiya commented 6 years ago

@sthaha Not sure why we need this. 200 is seen only when jenkins is running, right? Then, on 200 can't we just proxy to jenkins?

kishansagathiya commented 6 years ago

https://github.com/fabric8-services/fabric8-jenkins-proxy/blob/d06f9df0c86558decf509886527023004328e21c/internal/proxy/ui_requests.go#L141-L158

If we get StatusOK, it mean jenkins is running. What's the point of waiting if it is running?

sthaha commented 6 years ago

@kishansagathiya

If we get StatusOK, it mean jenkins is running. What's the point of waiting if it is running?

Because running doesn't mean jenkins is really up and running :), It only means the login was successful and at which point, the numerous plugins are/maybe doing something CPU intensive (as observed) and Jenkins fails to load properly.

Note, this delay (loading page ...) is applied only when jenkins is idle.

kishansagathiya commented 6 years ago

@sthaha So, If Jenkins pod is up, doesn't mean Jenkins is running?

sthaha commented 6 years ago

@kishansagathiya

So, If Jenkins pod is up, doesn't mean Jenkins is running?

It is "running" but not fully operational yet i.e. ready to serve all requests; reached the conclusion based on my observation and also based on the 504 errors we get.