Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet] Deleting agent policy after unenrolling agents returns 404 Not Found #90544

Closed
axw opened this issue Feb 6, 2021 · 2 comments
Closed
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@axw
Copy link
Member

axw commented Feb 6, 2021

Kibana version:

8.0.0-SNAPSHOT (b058f78)

Elasticsearch version:

8.0.0-SNAPSHOT (elastic/elasticsearch@317448d)

Describe the bug:

Deleting an agent policy after unenrolling all assigned agents leads to a 404 response.

Steps to reproduce:

  1. Create a basic agent policy with the "system" integration.
  2. Enroll an Agent with said policy.
  3. Force unenroll the Agent. (Not sure if forcing is pertinent.)
  4. Delete the policy. Kibana responds with 404 Not Found. Policy is still deleted.

Expected behavior:

Response code for step 4 should be 200 OK.

Errors in browser console (if relevant):

Response from POST /api/fleet/agent_policies/delete:

{"statusCode":404,"error":"Not Found","message":"Saved object [ingest-agent-policies/60dd3230-6855-11eb-8a05-ad53c4cb6028] not found"}

Provide logs and/or server output (if relevant):

Last line in Kibana container log:

kibana_1            | {"type":"log","@timestamp":"2021-02-06T08:30:36+00:00","tags":["error","plugins","fleet"],"pid":6,"message":"Saved object [ingest-agent-policies/60dd3230-6855-11eb-8a05-ad53c4cb6028] not found"}
@axw axw added bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team labels Feb 6, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

axw added a commit to axw/apm-server that referenced this issue Feb 8, 2021
elastic/kibana#90544 is
causing the system test to respond with 404 Not Found,
despite the policy existing and being successfully
deleted.

Update the test to temporarily expect a 404 response to
avoid failing all our builds. Once the Kibana bug is
resolved this will start failing, and we can again check
that no error is returned.
axw added a commit to elastic/apm-server that referenced this issue Feb 8, 2021
* systemtest: compensate for Fleet API bug

elastic/kibana#90544 is
causing the system test to respond with 404 Not Found,
despite the policy existing and being successfully
deleted.

Update the test to temporarily expect a 404 response to
avoid failing all our builds. Once the Kibana bug is
resolved this will start failing, and we can again check
that no error is returned.
axw added a commit to axw/apm-server that referenced this issue Feb 19, 2021
* systemtest: compensate for Fleet API bug

elastic/kibana#90544 is
causing the system test to respond with 404 Not Found,
despite the policy existing and being successfully
deleted.

Update the test to temporarily expect a 404 response to
avoid failing all our builds. Once the Kibana bug is
resolved this will start failing, and we can again check
that no error is returned.
axw added a commit to axw/apm-server that referenced this issue Feb 19, 2021
* systemtest: compensate for Fleet API bug

elastic/kibana#90544 is
causing the system test to respond with 404 Not Found,
despite the policy existing and being successfully
deleted.

Update the test to temporarily expect a 404 response to
avoid failing all our builds. Once the Kibana bug is
resolved this will start failing, and we can again check
that no error is returned.
axw added a commit to elastic/apm-server that referenced this issue Feb 19, 2021
…: fix missing error check (#4683) | systemtest: compensate for Fleet API bug (#4693) (#4832)

* systemtest: test apm-server in Fleet mode (#4650)

* systemtest: test apm-server in Fleet mode

We run a custom package registry into which
the "apm" integration package is bind-mounted
from the tree, enabling us to test with
unreleased package changes.

Add a system test that runs Elastic Agent in
Fleet mode, with a locally built APM Server
binary injected into the container. The test
adds the "apm" integration package to a new
agent policy, waits for elastic-agent to start
apm-server, and verifies it is functional.
# Conflicts:
#	systemtest/elasticsearch.go

* systemtest: fix missing error check (#4683)

* systemtest: compensate for Fleet API bug (#4693)

* systemtest: compensate for Fleet API bug

elastic/kibana#90544 is
causing the system test to respond with 404 Not Found,
despite the policy existing and being successfully
deleted.

Update the test to temporarily expect a 404 response to
avoid failing all our builds. Once the Kibana bug is
resolved this will start failing, and we can again check
that no error is returned.
axw added a commit to elastic/apm-server that referenced this issue Feb 20, 2021
… fix missing error check (#4683) | systemtest: compensate for Fleet API bug (#4693) (#4831)

* systemtest: test apm-server in Fleet mode (#4650)

* systemtest: test apm-server in Fleet mode

We run a custom package registry into which
the "apm" integration package is bind-mounted
from the tree, enabling us to test with
unreleased package changes.

Add a system test that runs Elastic Agent in
Fleet mode, with a locally built APM Server
binary injected into the container. The test
adds the "apm" integration package to a new
agent policy, waits for elastic-agent to start
apm-server, and verifies it is functional.
# Conflicts:
#	systemtest/elasticsearch.go

* systemtest: fix missing error check (#4683)

* systemtest: compensate for Fleet API bug (#4693)

* systemtest: compensate for Fleet API bug

elastic/kibana#90544 is
causing the system test to respond with 404 Not Found,
despite the policy existing and being successfully
deleted.

Update the test to temporarily expect a 404 response to
avoid failing all our builds. Once the Kibana bug is
resolved this will start failing, and we can again check
that no error is returned.
@jen-huang
Copy link
Contributor

Closing, this was fixed by #94311.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

3 participants