Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-4754

[test-operator] Tobiko can't use tcpdump inside test pod

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • test-operator
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • No

      Tobiko test test_ping_dscp needs to execute tcpdump locally inside the test-pod spawned by the test-operator. As of now the test pod that executes the tobiko tests does not have sufficient privileges to run tcpdump. One possible fix is to add correct securityContext as here:

      ---
      apiVersion: v1
      kind: Pod
      metadata:
        name: tobiko
      spec:
        containers:
        - name: tobiko
          image: quay.io/lpiwowar0/experiment-openstack-tobiko:experiment-42
          command: ["/bin/sh", "-c", "--"]
          args: ["tcpdump -i eth0"]
          securityContext:
            runAsUser: 0
            capabilities:
              add: ["NET_ADMIN", "NET_RAW"] 

      DoD:

      • We can execute tcpdump from within the tobiko test pod spawned by the test operator.

      PR:

              lpiwowar Lukáš Piwowarski
              lpiwowar Lukáš Piwowarski
              rhos-tempest
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: