fleet icon indicating copy to clipboard operation
fleet copied to clipboard

My device page: Policies don't load

Open mikermcneil opened this issue 1 year ago • 15 comments

Fleet version: Dave Herder's environment from the URL bar in the screenshot as of Aug 21, 2024 at 12:44

{
  "version": "4.55.0",
  "branch": "HEAD",
  "revision": "11aaa4fed9082aefd905d5872a49c53a7824c74e",
  "go_version": "go1.22.4",
  "build_date": "2024-08-09",
  "build_user": "runner"
}

Web browser and operating system:


💥  Actual behavior

image

🧑‍💻  Steps to reproduce

  1. Visit "My device" page in Dave Herder's environment
  2. TODO

🕯️ More info (optional)

N/A

QA notes

Below are the steps I used to reproduce this issue, "issue" being policy failure count not clearing on host details page.

Given that the original reports for this issue do not have steps to reproduce there may be other ways to end up with these counts not clearing for devices (I just happened to one way this could happen).

Steps to reproduce:

  1. Configure a host to run policies, and have some of the policies fail (so you should see the policy failure counts set in "red").
  2. Delete ALL policies that this host was running (so that the host is now configured to run no policies).
  3. Before this fix the policy failure counts were not clearing, now they should be cleared after refetching the host.

Dogfood

In dogfood we can see this issue in hosts with id 905 and 909. Once this fix is released, refetching the hosts should clear the failing counts.

mikermcneil avatar Aug 21 '24 17:08 mikermcneil

@dherder

  • Were policies edited during the demo?
  • Was the host transfered from team to team during the demo?
  • GitOps?
  • Does the admin view of the host show the same issue?
  • Are there policies in the API response? (network requests / command+option+i in chrome)

lucasmrod avatar Aug 22 '24 12:08 lucasmrod

@lucasmrod

  • policies were not edited
  • the host was not transferred during the demo, but could have been transferred at some point in the past
  • no gitops
  • yes, admin shows the same issue
  • the policies are not in the host endpoint, but the failing count is "5", same as what the UI shows.

I've added you to the demo1 environment (check your spam) so you can check out host 102, the one exhibiting the issue.

dherder avatar Aug 26 '24 17:08 dherder

Hey @sharon-fdm and @lucasmrod, just checking, does this bug need product input?

It looks like "no" so I removed it from the drafting board (removed :product)

noahtalerman avatar Aug 29 '24 20:08 noahtalerman

@lucasmrod are we good?

sharon-fdm avatar Aug 29 '24 20:08 sharon-fdm

Sounds good. I shouldn't have added the :product label.

lucasmrod avatar Aug 29 '24 20:08 lucasmrod

Adding customer-rosner label because the issue closed as duplicate had such label.

lucasmrod avatar Oct 04 '24 13:10 lucasmrod

@xpkoala Added QA notes.

lucasmrod avatar Oct 09 '24 11:10 lucasmrod

Checked and looking good!

xpkoala avatar Oct 09 '24 12:10 xpkoala

@xpkoala Sorry, forgot to update the milestone, did you check in main? This fix was not cherry-picked into v4.58.0 and will ship in v4.59.0.

lucasmrod avatar Oct 09 '24 12:10 lucasmrod

Hrmm, I'm on the RC branch and followed the instructions for reproduction and new policies are rendering for the host this was tested on.

I wonder if the reproduction steps won't encounter the issue every time?

xpkoala avatar Oct 09 '24 12:10 xpkoala

OK, re-checking reproduce steps now.

lucasmrod avatar Oct 09 '24 12:10 lucasmrod

Milestone was changed to tentative-4.59.0 and ticket was pulled back into QA channel. Will review repo steps and confirm the fix in the next release.

xpkoala avatar Oct 09 '24 12:10 xpkoala

Video on how to reproduce: https://www.loom.com/share/af117d34df194c57ac697cff92f068f9?sid=1994e519-f7fe-4316-a828-2919e1e3ce37

lucasmrod avatar Oct 09 '24 13:10 lucasmrod

Linked to Unthread ticket:

Issues with Firewall Policy and Phantom Policies #3263)

JoStableford avatar Oct 15 '24 15:10 JoStableford

Confirmed and fixed!

xpkoala avatar Oct 21 '24 15:10 xpkoala

Policies now load, In the glass city they glow, Secure paths bestowed.

fleet-release avatar Nov 12 '24 18:11 fleet-release