-
Notifications
You must be signed in to change notification settings - Fork 573
Dashboard is not showing - k8s #631
Comments
Anyone else who experience this issue with dashboard? |
Port On startup, it automatically tries to copy the dashboard files to the /home/seluser/videos mount. Maybe look for copy errors on zalenium pod start, maybe you have some sort of permissions issues on your volume mount. |
@pearj Thanks for reply. Well, ignore the parts with ports, my bad. Volume is provisioned as EBS on AWS, I am not mounting it at all, k8s do that.
Script that copies this files should have also, I have RBAC enabled cluster and I created roles:
then, I got this in logs:
Why it needs permission to delete pods? |
Created pull request #635 for changing this. |
How did you configure your kubernetes cluster? It sounds broken to me, something seems broken with your ebs-provisioner. I've run an OpenShift cluster in AWS backed by EBS with each pod running without root privileges, and I've never needed to chown the volume before use. |
provisioned with kops on aws, 3 masters + 3 nodes. |
It needs to delete pods because once it has finished with a selenium container it deletes it unless you've configured it with maxTestSessions. How come the ebs provisioner is mounting the volume at the node at |
I just left another comment on #635, I think you can just fix your problem with an init container. You could even use the same zalenium image since it needs to exist anyway, but just put the |
Okay. Then, call it OpenShift example, not k8s. They're everything but not same product. Vanila k8s obviously has different behaviour. |
Can you show me the zalenium PVC and related PV kubernetes objects? Also the zalenium pod object. |
Sure, of course. Here are some info:
PVC:
PV:
deployment:
$
ClusterRole and ClusterRoleBinding:
$
$
$
|
Ahh hostpath as expected:
Oh, when you say volume is provisioned as EBS on AWS. Did you manually provision that? You aren't using the kubernetes dynamic volume provisioning? Even without the automatic provisioning, you can specify https://kubernetes.io/docs/concepts/storage/volumes/#awselasticblockstore |
If you're interested in enabling the EBS auto provisioning, you need to setup a storage class and potentially a few other things. But this is a starting point: Some other resources: Apparently, you need |
hm, to be honest I don't get it. When I say it's automatically provisioned by k8s, then it's provisioed by k8s. My cluster is provisioned by kops on AWS and when I am requesting resources, then nodes/masters are able to do that because of IAM roles. I removed hostPath from Persistent Volume, PV is provisied as 80Gi EBS partition on AWS.
and:
when I enter in Zalenium container:
and
So, partition is mounted I would say. But permissions are still wrong. |
That new pv is using auto provisioning now which is good. Not sure why it doesn’t mount the volume with open permissions. Are running zalenium in priveleged mode by any chance? Anyway you can always using an init container to fix the permissions. |
I am having a similar problem. The videos directory is mounted and files are copied. Is the group of the
|
@pearj I think you're wrong, this with init container will not work because in the moment of executing init container nothing from zalenium container will exist. We need a line in script which will adjuct ownership. Sorry :) @matthew-horrocks which k8s version are you using? |
@dusansusic 1.10.3 in Azure (AKS) |
I have a VM and k8s both running Zalenium. I've ensured that the k8s permissions on the What logs are available? I'm not too familiar with how the routing etc. works for the grid / console / dashboard. |
@dusansusic when you mount an empty volume to /home/seluser/videos nothing will exist in that directory anyway. So I’m not sure what you’re getting at. You would probably need to use the zalenium container as the init container so that when the chown command is run the right uid is used for seluser. Your fix in #635 relied on nothing from the zalenium container except the seluser user and group existing. |
@matthew-horrocks the fact that files exist in the videos directory means that zalenium was able to copy the files over, so I think you are getting further than @dusansusic. Also, it looks likes you’ve named your mounts backwards for what it’s worth, according to the df command you posted. Shared is mounted at videos and videos is mounted at /tmp/mounted. |
Then I am making something on top (or below this). Problem exist, that's a fact and you cannot decline it. |
I’m not saying that there isn’t a problem for you. All I’m saying is that your problem can be solved by an Init Container without the need changing the behaviour for everyone else. I presume you have not yet tried the Init Container? There is a working example of this here: |
yeah, I noticed the mounts, too. I've redeployed the containers a few time since and the mounts have been correctly setup... I've not changed anything 😆 |
Thinking about it. I think I know the cause of your problem. Because zalenium by default runs as root and then switches to seluser (in OpenShift it never runs as root) then your implementation of kubernetes must restrict the permissions to the root user by default because it thinks that’s the user for the container. |
Tried with init but it says that seluser:seluser is not available. |
Can you paste your zalenium pod please? |
Did you use busybox for the init container? If so that would explain why it couldn’t find the user. In that case we’d need to find out what the uid/gid is since it wouldn’t know the same. Otherwise using zalenium as the init container will know about seluser. I did a bit of research on the problem and it looks like it’s actually a pretty common problem with kubernetes: kubernetes/kubernetes#2630 So I apologise for thinking it was a cluster setup problem. One of the solutions people are using is Init containers. Other potential solution is using supplemental groups, but it wasn’t clear to me if it was fully implemented or not. I’m not exactly sure how to reproduce it, as I don’t think minikube is affected. |
@pearj I tried it with busybox. I tried dosel/zalenium:latest image. none is working.
As I said, initContainer will not work. I would appreciate if you reconsider chowning videos folder before mounting. I didn't try this stuff with minikube or minishift because I am using real HA cluster where everything works but this. |
@dusansusic it sounds like you didn’t actually mount the volume into the init container. Each container in the pod is allowed to mount any of the volumes, but you still need to specifically mount them. All the volumes are configured before the init containers are started, so it should work once the syntax is right. |
Works.
|
Ahh good to know. The following is more for my reference: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#podsecuritycontext-v1-core
|
OK, I'm confused. In order for the dashboard to load, do the following files need to be in
I've started up a k8s cluster and deployed Zalenium without mounting anything in Lines 401 to 404 in af665ec
and the dashboard still does not load; I get the Does the |
@matthew-horrocks Ahh that means you're accessing zalenium on the wrong port, you must be hitting the selenium grid port instead of the nginx port. Nginx is configured to serve the dashboard, not the selenuim grid as seen here: Lines 35 to 39 in af665ec
You have probably used the 4445 port in your kubernetes service, you need to use the 4444 port instead. |
Based on this comment #631 (comment), I think the issue has been solved. If any other issue pops up, please open a new one with detailed information. |
Zalenium Image Version(s):
3.12e
Docker Version:
17.3.2
OS:
ubuntu 16.04
I found an issue here: #353 and it aims that's solved but it's not.
When i deployed zalenium to the k8s, dashboard si not available till I log in into container:
kubectl exec -it zalenium-799b7bff48-45ktv bash -n infra
and execute:
sudo cp * videos/
it will work.
I am using k8s 1.10.3 accessing to dashboard:
http://IP:PORT/dashboard
or
http://IP:PORT/dashboard/
- problem exists on both waysShould we use
/home/seluser
, instead of/home/seluser/videos
?Also, Service is not accessible at:
http://IP:4444
buthttp://IP:PORT
, eg.http://IP:32152
Service definition is identical to your:
The text was updated successfully, but these errors were encountered: