fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Error resending Disk Encryption profile for Windows host

Open ddribeiro opened this issue 1 year ago • 1 comments

Fleet version: 4.55


💥  Actual behavior

A Fleet customer is getting an error message when trying to resend the built-in Disk Encryption profile on a Windows machine after the initial delivery failed. The initial delivery failed because bootable media (CD or DVD) was detected in the computer. Screenshot 2024-08-29 at 4 40 34 PM

After clicking the resend button, Fleet displays an error message: Couldn't resend. Please try again. at the top of the page. image (5)

Using the browser's web inspector, when the resend button is clicked, Fleet is attempting to make an API call to /api/latest/fleet/hosts/:id/configuration_profiles/resend/0 and failing with reason: "Invalid profile UUID prefix."

🧑‍💻  Steps to reproduce

  1. Enroll a Windows host into Fleet with Windows MDM enabled.
  2. With bootable media in the disk drive, assign the host to a team with disk encryption enabled. This should cause the delivery of the Disk Encryption profile to fail.
  3. Upon failure of the profile delivery, click the resend button in the Fleet UI to observe the error message.

🕯️ More info (optional)

ddribeiro avatar Aug 29 '24 21:08 ddribeiro

After spinning my wheels on this bug for a bit, the penny finally dropped: the command UUID is 0 because we do not use MDM commands at all for bitlocker! it's implemented in Orbit; if Fleet determines that the disk needs to be encrypted, then it sends a notification to Orbit to do the encryption.

Seems to me like a fix will require product input. One fix could be:

  • Remove the ability to "resend" a failed disk encryption attempt
  • Add a retry mechanism that will continue to send the notification to Orbit if there is an error on the previous encryption attempt. There are several errors that can be encountered while encrypting the disk. Should we retry regardless of error, or just for certain ones? The one in the ticket (bootable media present) I think should be retried, since the end user can address that pretty easily by ejecting the bootable media.

Once we pick a path forward, part of the PR for this fix should include updating this test.

cc @georgekarrv @noahtalerman

jahzielv avatar Oct 28 '24 20:10 jahzielv

I would say not changing the behavior on retries today but just allowing the re-send for that to trigger the orbit notification again should be enough.

georgekarrv avatar Oct 28 '24 20:10 georgekarrv

@georgekarrv from taking a deeper look at the code, seems like we're already retrying if there is an error, in the sense that the orbit notification for enforcing bitlocker is sent even if there was an error in a previous attempt.

I would advocate for removing the "resend" affordance in this case, since it is confusing (because bitlocker enforcement is implemented as an orbit notification, you can't properly "resend" since the notifications are polled from the orbit side).

We could also just have the "resend" button be a no-op when it's for bitlocker.

Happy to go either way, or come up with a 3rd option if needed!

jahzielv avatar Nov 06 '24 23:11 jahzielv

This was discussed at standup today, passing back to Marko for design review 🫡

jahzielv avatar Nov 07 '24 17:11 jahzielv

Hey @jahzielv, I'm moving this bug back to the release board. The fix is specified in Figma attached to the issue description.

marko-lisica avatar Nov 14 '24 11:11 marko-lisica

FYI @rachaelshaw @mostlikelee this bug made me realize that I think we want to hide the "Resend" button for Linux hosts as part of #22074

IIRC there's no MDM command or script that Fleet is sending to enforce disk encryption on Linux.

noahtalerman avatar Nov 19 '24 19:11 noahtalerman

we want to hide the "Resend" button for Linux hosts

@noahtalerman thanks for flagging, @mostlikelee thanks for forwarding – already handled this 👍

jacobshandling avatar Nov 19 '24 20:11 jacobshandling

@jahzielv heads up this will (also) address the "hide send" button part of this issue, in case that merge conflict comes up

jacobshandling avatar Nov 19 '24 20:11 jacobshandling

QA Notes:

Was able to reproduce the error using a Proxmox VM with a mounted windows ISO file (Virtual CD Drive). I can confirm the Resend button is gone and the copy has been updated. However we have a small typo = missing a period before Fleet will retry automatically.

Image

Additionally I was able to confirm via the Orbit logs that Fleet resends the encryption profile after failure (as indicated in the hover hint)

PezHub avatar Jan 21 '25 21:01 PezHub

Typo has been fixed. GTG!

Image

PezHub avatar Jan 22 '25 18:01 PezHub

Error fixed, peace resumes, Fleet's light through Windows now streams. Secure data blooms.

fleet-release avatar Jan 28 '25 21:01 fleet-release