opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[receiver/podman] do not skip lifecycle checks

Open codeboten opened this issue 1 year ago • 11 comments

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

codeboten avatar Dec 17 '23 15:12 codeboten

Pinging code owners:

  • receiver/podman: @rogercoll

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Dec 17 '23 15:12 github-actions[bot]

Pinging code owners for receiver/podman: @rogercoll. See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Dec 17 '23 15:12 github-actions[bot]

@codeboten is this issue still open?

hamzmu avatar Jan 11 '24 04:01 hamzmu

@hamzmu yup, tests are still skipped: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/5965ee64e4e45476beb71b8e2a7eb6116a09a9a0/receiver/podmanreceiver/metadata.yaml#L13

codeboten avatar Jan 11 '24 23:01 codeboten

can you assign this issue to me?

hamzmu avatar Jan 16 '24 13:01 hamzmu

Done!

atoulme avatar Jan 20 '24 06:01 atoulme

can I take this one?

Sanket-0510 avatar Mar 03 '24 08:03 Sanket-0510

here also if you run the Lifecycle test for podmanreceiver it will fail Screenshot from 2024-03-03 18-09-25

Error - permission denied

Sanket-0510 avatar Mar 03 '24 12:03 Sanket-0510

@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: Screen Shot 2024-03-09 at 12 08 28 AM Is there anything else I need to validate the tests?

hamzmu avatar Mar 09 '24 05:03 hamzmu

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.

github-actions[bot] avatar May 09 '24 03:05 github-actions[bot]

WIP

rogercoll avatar May 09 '24 05:05 rogercoll

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.

rogercoll avatar May 10 '24 12:05 rogercoll

For the moment, I create PR to align the shutdown method with the dockestats receiver.

rogercoll avatar May 10 '24 12:05 rogercoll

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.

github-actions[bot] avatar Jul 10 '24 03:07 github-actions[bot]

This issue has been closed as inactive because it has been stale for 120 days with no activity.

github-actions[bot] avatar Sep 08 '24 05:09 github-actions[bot]