Skip to content

NRI Flex dynamic config fails with “stat … no such file or directory” on Kubernetes Helm deployment #636

Description

@haani-niyaz

Description

The Infrastructure agent fails while attempting to load a dynamically discovered Flex configuration file. The agent reports that the file does not exist, even though it is present on the container filesystem.
As a result, no Flex integrations run and custom application events are not ingested.

Expected Behavior

NRI Flex dynamically discovered integration configs should be successfully read and executed by the Infrastructure agent.
Custom events (for example, vaultMetrics, vaultHealth) should be ingested and visible in New Relic, consistent with behavior in other clusters used in a prior version.

Troubleshooting or NR Diag results

Observed agent logs after updating the nri-nrk8s-integrations-cfg ConfigMap:

integration exited with error state
integration_name=nri-flex
error="exit status 1"
err="stat /tmp/discovered2f18ec8f1efb3d5191897c39f24163dc: no such file or directory"

Followed by:

HeartBeat timeout exceeded after 120 seconds
can't remove temporary integration config file

Inspection of the running container filesystem shows that the referenced file does exist:

$ ls /etc/newrelic-infra/integrations.d/nri-flex.yml
$ ls -la /tmp/
-rw-r--r-- 1 root root 1885 May  4 discovered2f18ec8f1efb3d5191897c39f24163dc

The file contents match the expected Flex configuration.
Debug logging is enabled on the nri-nrk8s-kubelet DaemonSet, but no additional diagnostics related to this failure are emitted.

Steps to Reproduce

  • Deploy New Relic Infrastructure using the Helm bundle in a Kubernetes cluster.
  • Apply a working NRI Flex configuration via nri-nrk8s-integrations-cfg.
  • Trigger a ConfigMap update so the agent dynamically discovers the Flex config.
  • Observe agent logs showing failure to stat a dynamically created temp config file.
  • Verify that the referenced file exists on disk inside the container.
  • Confirm that no Flex-related events are ingested.

Your Environment

Kubernetes cluster v1.34.3

New Relic Infrastructure Helm deployment:

Chart: nri-bundle
Version: 5.0.124

Integration:

NRI Flex via dynamic integration discovery

nrdiag-output.zip

nri-nrk8s-integrations-cfg.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions