Uploaded image for project: 'Distributed Tracing'
  1. Distributed Tracing
  2. TRACING-5422

Security config issues when using FileLog receiver

XMLWordPrintable

    • Tracing Sprint # 273
    • Moderate

      Description of problem:

      By default otel collector pod starts up with restricted-v2 SCC.

      Version-Release number of selected component (if applicable):

      tempo-operator.v0.15.4-1
      opentelemetry-operator.v0.119.0-2

      How reproducible:

      100%

      Steps to Reproduce:

      1. Install and configure TempoStack
      
      2. Setup OpenTelemetryCollector to use FileLog receiver using documentation:
         [-] https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/red_hat_build_of_opentelemetry/configuring-the-collector#filelog-receiver_otel-collector-receivers
      
      3. The pod doesn't initialize because of below event:
      
      6s          Warning   FailedCreate        replicaset/dev-collector-6d7766cf95   Error creating: pods "dev-collector-6d7766cf95-" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, spec.volumes[1]: Invalid value: "hostPath": hostPath volumes are not allowed to be used, provider "restricted": Forbidden: not usable by user or serviceaccount, provider "nonroot-v2": Forbidden: not usable by user or serviceaccount, provider "nonroot": Forbidden: not usable by user or serviceaccount, provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount, provider "logging-scc": Forbidden: not usable by user or serviceaccount, provider "machine-api-termination-handler": Forbidden: not usable by user or serviceaccount, provider "hostnetwork-v2": Forbidden: not usable by user or serviceaccount, provider "hostnetwork": Forbidden: not usable by user or serviceaccount, provider "hostaccess": Forbidden: not usable by user or serviceaccount, provider "node-exporter": Forbidden: not usable by user or serviceaccount, provider "privileged": Forbidden: not usable by user or serviceaccount]

      Actual results:

      Pod doesn't initialize because of SCC restrictions.

      Expected results:

      Enabling filelog receiver should configure OpenTelemetryCollector with correct security configs.

      Additional info:

      To workaround the problem, bind the serviceaccount used by OpenTelemetryCollector with privileged SCC:
      $ oc adm policy add-scc-to-user privileged -z <otel-collector-serviceaccount> -n <otel-collector-namespace>

              agerstma@redhat.com Andreas Gerstmayr
              rhn-support-dgautam Dhruv Gautam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: