opentelemetry-collector-contrib
opentelemetry-collector-contrib copied to clipboard
[receiver/podman] do not skip lifecycle checks
This test should not be skipped.
add issue to not skip lifecycle checks
Originally posted by @codeboten in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/29957#discussion_r1429195847
Pinging code owners:
- receiver/podman: @rogercoll
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Pinging code owners for receiver/podman: @rogercoll. See Adding Labels via Comments if you do not have permissions to add labels yourself.
@codeboten is this issue still open?
@hamzmu yup, tests are still skipped: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/5965ee64e4e45476beb71b8e2a7eb6116a09a9a0/receiver/podmanreceiver/metadata.yaml#L13
can you assign this issue to me?
Done!
can I take this one?
here also if you run the Lifecycle test for podmanreceiver it will fail
Error - permission denied
@codeboten @rogercoll any idea how to run the tests? This is one of my first prs and a similar issue suggested to ran the following:
make generate, make -C receiver/podmanreceiver test
giving me the following error/message:
Is there anything else I need to validate the tests?
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
- receiver/podman: @rogercoll
See Adding Labels via Comments if you do not have permissions to add labels yourself.
WIP
The current lifecycle of the podman's receiver (also the docker one) depends on the start scraper's functionality. On start, it tries to get all the healthy containers so it does not need to fetch them all on every scrape. The lifecycle checks fail, as it requires a Podman's socket on startup (unix:///run/podman/podman.sock) to fetch all the containers: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/podmanreceiver/receiver.go#L72
I think for the dockerstats receiver works because the socket is available on the CI. It fails on my local environment (docker disabled):
=== RUN TestComponentLifecycle/metrics-lifecycle
generated_component_test.go:62:
Error Trace: /opentelemetry-collector-contrib/receiver/dockerstatsreceiver/generated_component_test.go:62
Error: Received unexpected error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Test: TestComponentLifecycle/metrics-lifecycle
--- FAIL: TestComponentLifecycle (0.01s)
--- PASS: TestComponentLifecycle/metrics-shutdown (0.00s)
--- FAIL: TestComponentLifecycle/metrics-lifecycle (0.00s)
@codeboten Do you know how this issue is approach by other components? Should we change the scraper start logic? It seems to me, that enabling the socket on the CI is more an integration test.
For the moment, I create PR to align the shutdown method with the dockestats receiver.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
- receiver/podman: @rogercoll
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been closed as inactive because it has been stale for 120 days with no activity.