Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

k8s-autodiscover for elastic-agent fails #1992

@mdelapenya

Description

@mdelapenya

Steps to reproduce

Run this command from the root dir of the test framework:

TAGS="elastic-agent" TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE DEVELOPER_MODE=true ELASTIC_APM_ACTIVE=false PROVIDER=docker make -C e2e/_suites/kubernetes-autodiscover functional-test

Expected behaviour: the elastic-agent container is up and running
Current behaviour: the elastic-agent container cannot be found (see logs)

TRAC[2022-01-14T08:17:01+01:00] Binary is present                             binary=kubectl path=/usr/local/bin/kubectl
TRAC[2022-01-14T08:17:01+01:00] Executing command                             args="[--kubeconfig /var/folders/8h/pk8n63tn3px_tbs6_l862s_w0000gn/T/test-1862958236/kubeconfig --namespace test-3e9e36c8-6ad3-4af8-bea9-81af9fe9afa9 cp --no-preserve test-3e9e36c8-6ad3-4af8-bea9-81af9fe9afa9/elastic-agent-j78bv:/tmp/beats-events-20220114.ndjson /var/folders/8h/pk8n63tn3px_tbs6_l862s_w0000gn/T/test-686180914/events]" command=kubectl env="map[]"
ERRO[2022-01-14T08:17:01+01:00] Error executing command                       args="[--kubeconfig /var/folders/8h/pk8n63tn3px_tbs6_l862s_w0000gn/T/test-1862958236/kubeconfig --namespace test-3e9e36c8-6ad3-4af8-bea9-81af9fe9afa9 cp --no-preserve test-3e9e36c8-6ad3-4af8-bea9-81af9fe9afa9/elastic-agent-j78bv:/tmp/beats-events-20220114.ndjson /var/folders/8h/pk8n63tn3px_tbs6_l862s_w0000gn/T/test-686180914/events]" baseDir=. command=kubectl env="map[]" error="exit status 1" stderr="error: unable to upgrade connection: container not found (\"elastic-agent\")\n"
DEBU[2022-01-14T08:17:01+01:00] Failed to copy events from test-3e9e36c8-6ad3-4af8-bea9-81af9fe9afa9/elastic-agent-j78bv:/tmp/beats-events to /var/folders/8h/pk8n63tn3px_tbs6_l862s_w0000gn/T/test-686180914/events:

CI log

[2022-01-11T06:16:59.877Z] TRAC[2022-01-11T06:16:59Z] Binary is present                             binary=kubectl path=/usr/local/bin/kubectl
[2022-01-11T06:16:59.877Z] TRAC[2022-01-11T06:16:59Z] Executing command                             args="[--kubeconfig /tmp/test-3897598673/kubeconfig --namespace test-5601550b-715d-441b-a10c-90cb80e2634d cp --no-preserve test-5601550b-715d-441b-a10c-90cb80e2634d/elastic-agent-b4hxq:/tmp/beats-events-20220111.ndjson /tmp/test-1437408640/events]" command=kubectl env="map[]"
[2022-01-11T06:16:59.878Z] ERRO[2022-01-11T06:16:59Z] Error executing command                       args="[--kubeconfig /tmp/test-3897598673/kubeconfig --namespace test-5601550b-715d-441b-a10c-90cb80e2634d cp --no-preserve test-5601550b-715d-441b-a10c-90cb80e2634d/elastic-agent-b4hxq:/tmp/beats-events-20220111.ndjson /tmp/test-1437408640/events]" baseDir=. command=kubectl env="map[]" error="exit status 1" stderr="error: unable to upgrade connection: container not found (\"elastic-agent\")\n"
[2022-01-11T06:16:59.878Z] DEBU[2022-01-11T06:16:59Z] Failed to copy events from test-5601550b-715d-441b-a10c-90cb80e2634d/elastic-agent-b4hxq:/tmp/beats-events to /tmp/test-1437408640/events:

First error build: https://beats-ci.elastic.co/job/e2e-tests/job/e2e-testing-k8s-autodiscovery-daily-mbp/job/main/10/ (6 days ago)
Last successful build: https://beats-ci.elastic.co/job/e2e-tests/job/e2e-testing-k8s-autodiscovery-daily-mbp/job/main/9/ (6 days ago)

It seems the elastic-agent container is not there

Metadata

Metadata

Assignees

Labels

Team:Elastic-AgentLabel for the Agent teambugSomething isn't working

Type

No type
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