Set proper liveness/readiness probes
When instance is not responding anymore (e.g. because it can't access NFS) it stays around. We should add:
- livenessProbe to check that Jenkins can access NFS (e.g. timeout 10 stat /var/lib/jenkins/config.xml)
- readinessProbe to check whether Jenkins listens on its port
Also the preStop command should be adjusted to NOT sleep indefinitely if instance has no NFS access, so we don't keep an unhealthy instance running. Encapsulate health monitoring commands in a script (like wait_for_other_instances.sh) so we can use them in both health probe and preStop command.
Ref INC1197014