1

My Zalenium is deployed in Kubernetes. I have set option desiredContainers = 2 and it's working. But sometimes desired containers are not available. Tests are working properly, even when desired containers not available. After "restart" containers appears, but I have no idea why they sometimes dissapears. Does anyone have idea what's going on?

kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: zalenium
  namespace: zalenium-omdc
  selfLink: /apis/extensions/v1beta1/namespaces/zalenium-omdc/deployments/zalenium
  uid: cbafe254-3e28-4889-a09e-ccfa500ff628
  resourceVersion: '25201258'
  generation: 24
  creationTimestamp: '2019-09-17T13:24:52Z'
  labels:
    app: zalenium
    instance: zalenium
  annotations:
    deployment.kubernetes.io/revision: '24'
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app":"zalenium","instance":"zalenium"},"name":"zalenium","namespace":"zalenium-omdc"},"spec":{"replicas":1,"selector":{"matchLabels":{"instance":"zalenium"}},"template":{"metadata":{"labels":{"app":"zalenium","instance":"zalenium"}},"spec":{"containers":[{"args":["start"],"env":[{"name":"ZALENIUM_KUBERNETES_CPU_REQUEST","value":"250m"},{"name":"ZALENIUM_KUBERNETES_CPU_LIMIT","value":"1000m"},{"name":"ZALENIUM_KUBERNETES_MEMORY_REQUEST","value":"500Mi"},{"name":"ZALENIUM_KUBERNETES_MEMORY_LIMIT","value":"2Gi"},{"name":"DESIRED_CONTAINERS","value":"2"},{"name":"MAX_DOCKER_SELENIUM_CONTAINERS","value":"16"},{"name":"SELENIUM_IMAGE_NAME","value":"elgalu/selenium"},{"name":"VIDEO_RECORDING_ENABLED","value":"true"},{"name":"SCREEN_WIDTH","value":"1440"},{"name":"SCREEN_HEIGHT","value":"900"},{"name":"MAX_TEST_SESSIONS","value":"1"},{"name":"NEW_SESSION_WAIT_TIMEOUT","value":"1800000"},{"name":"DEBUG_ENABLED","value":"false"},{"name":"SEND_ANONYMOUS_USAGE_INFO","value":"true"},{"name":"TZ","value":"UTC"},{"name":"KEEP_ONLY_FAILED_TESTS","value":"false"},{"name":"RETENTION_PERIOD","value":"3"}],"image":"dosel/zalenium:3","imagePullPolicy":"IfNotPresent","livenessProbe":{"httpGet":{"path":"/status","port":4444},"initialDelaySeconds":90,"periodSeconds":5,"timeoutSeconds":1},"name":"zalenium","ports":[{"containerPort":4444,"protocol":"TCP"}],"readinessProbe":{"httpGet":{"path":"/status","port":4444},"timeoutSeconds":1},"resources":{"requests":{"cpu":"500m","memory":"500Mi"}},"volumeMounts":[{"mountPath":"/home/seluser/videos","name":"zalenium-videos"},{"mountPath":"/tmp/mounted","name":"zalenium-data"}]}],"serviceAccountName":"zalenium","volumes":[{"emptyDir":{},"name":"zalenium-videos"},{"emptyDir":{},"name":"zalenium-data"}]}}}}
spec:
  replicas: 1
  selector:
    matchLabels:
      instance: zalenium
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: zalenium
        instance: zalenium
    spec:
      volumes:
        - name: zalenium-videos
          emptyDir: {}
        - name: zalenium-data
          emptyDir: {}
      containers:
        - name: zalenium
          image: 'dosel/zalenium:3'
          args:
            - start
          ports:
            - containerPort: 4444
              protocol: TCP
          env:
            - name: ZALENIUM_KUBERNETES_CPU_REQUEST
              value: 250m
            - name: ZALENIUM_KUBERNETES_CPU_LIMIT
              value: 1000m
            - name: ZALENIUM_KUBERNETES_MEMORY_REQUEST
              value: 500Mi
            - name: ZALENIUM_KUBERNETES_MEMORY_LIMIT
              value: 2Gi
            - name: DESIRED_CONTAINERS
              value: '2'
            - name: MAX_DOCKER_SELENIUM_CONTAINERS
              value: '16'
            - name: SELENIUM_IMAGE_NAME
              value: elgalu/selenium
            - name: VIDEO_RECORDING_ENABLED
              value: 'false'
            - name: SCREEN_WIDTH
              value: '1920'
            - name: SCREEN_HEIGHT
              value: '1080'
            - name: MAX_TEST_SESSIONS
              value: '1'
            - name: NEW_SESSION_WAIT_TIMEOUT
              value: '7200000'
            - name: DEBUG_ENABLED
              value: 'false'
            - name: SEND_ANONYMOUS_USAGE_INFO
              value: 'true'
            - name: TZ
              value: UTC
            - name: KEEP_ONLY_FAILED_TESTS
              value: 'false'
            - name: RETENTION_PERIOD
              value: '3'
            - name: SEL_BROWSER_TIMEOUT_SECS
              value: '7200'
            - name: BROWSER_STACK_WAIT_TIMEOUT
              value: 120m
          resources:
            limits:
              memory: 1Gi
            requests:
              cpu: 500m
              memory: 500Mi
          volumeMounts:
            - name: zalenium-videos
              mountPath: /home/seluser/videos
            - name: zalenium-data
              mountPath: /tmp/mounted
          livenessProbe:
            httpGet:
              path: /status
              port: 4444
              scheme: HTTP
            initialDelaySeconds: 90
            timeoutSeconds: 1
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /status
              port: 4444
              scheme: HTTP
            timeoutSeconds: 1
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      nodeSelector:
        dedicated: omdc
      serviceAccountName: zalenium
      serviceAccount: zalenium
      securityContext: {}
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: dedicated
                    operator: In
                    values:
                      - omdc
      schedulerName: default-scheduler
      tolerations:
        - key: dedicated
          operator: Equal
          value: omdc
          effect: NoSchedule
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600
status:
  observedGeneration: 24
  replicas: 1
  updatedReplicas: 1
  readyReplicas: 1
  availableReplicas: 1
  conditions:
    - type: Available
      status: 'True'
      lastUpdateTime: '2019-10-22T06:57:52Z'
      lastTransitionTime: '2019-10-22T06:57:52Z'
      reason: MinimumReplicasAvailable
      message: Deployment has minimum availability.
    - type: Progressing
      status: 'True'
      lastUpdateTime: '2019-10-31T09:14:01Z'
      lastTransitionTime: '2019-09-17T13:24:52Z'
      reason: NewReplicaSetAvailable
      message: ReplicaSet "zalenium-6df85c7f49" has successfully progressed.
sl0910
  • 11
  • 2
  • Could you post your yamls ? Without seeing your configuration it will be difficult to say anything. Any information from logs or `Pod` events ? – mario Oct 31 '19 at 12:26
  • can you share zalenium deployment YAML – P Ekambaram Oct 31 '19 at 12:46
  • It seems the description of the issue is incomplete, what is actually missing? `desiredContainers` is just a parameter, it is not clear how it can be missing. Also, please keep in mind that pods are created on demand, which is why you could not see pods running at a given point. – diemol Nov 05 '19 at 21:50
  • Yes, pods are created on demand, but because of `desiredContainers` parameter two containers should be always waiting. What is actually missing? Actually is missing one container. But sometimes two are ready, and sometimes none is ready. I'm saying about situation when none tests are running. – sl0910 Nov 06 '19 at 11:44
  • Are you sure **zalenium** makes use of `DESIRED_CONTAINERS` environment variable ? Can you point out the place in documentation where it is written that you can pass it to the container this way ? Do you observe any difference when you pass it to the `start` command as `--desiredContainers` flag ? Other thing that is not completely clear to me is the definition of this option. Here https://opensource.zalando.com/zalenium/ you can read that `--desiredContainers` defines `number of nodes/containers created on startup.`, so maybe this number isn't guaranteed to be up and running the whole time. – mario Nov 25 '19 at 18:08

0 Answers0