-
Notifications
You must be signed in to change notification settings - Fork 483
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
Added to Fleet
set to Never
when enrolling manually on MDM after installing fleetd first
#20059
Comments
Hey @lucasmrod and @sharon-fdm! I'm not sure why this ended up on the drafting board...is the expected behavior unclear? Something else? The "Added to Fleet" timestamp is when the host enrolls to Fleet. When a host shows up in Fleet for the first time. More context here: https://fleetdm.com/handbook/company/why-this-way#why-does-fleet-use-mdm-on-off-instead-of-mdm-enrolled-unenrolled |
Sorry, I incorrectly added the |
Thanks @lucasmrod. |
Hey team! Please add your planning poker estimate with Zenhub @getvictor @jacobshandling @lucasmrod @mostlikelee @RachelElysia |
@sharon-fdm adding a p2 label here because the 'workaround' option of deleting the host to get this updated with the correct date does not work for customer-preston. they're unable to delete the hosts. their entire enrollment status and workflow is based on this 'enrolled date' field |
@zayhanlon got it. Sharon is out today, but we saw the P2 label and have prioritized accordingly. |
Thanks @zayhanlon. |
Thank you all! |
@zayhanlon @noahtalerman |
@lucasmrod guessing that there's no way for us to figure out the actual enroll date? |
I'll be taking a look at where we can get the enrolled date from. AFAICS it won't be exact, most likely an approximation (deduced from other MySQL table row timestamps). |
I did some digging and we can use the Here's a dump from dogdood (46 hosts have 0 day difference, and 14 have a non-0 difference):
Let me know if we are a-ok going this route. (Via a migration in 4.54.0 to fix these " |
Seems like it makes sense but I'll wait for @noahtalerman |
@lucasmrod @noahtalerman is there NO other way for us to capture the actual enrollment date vs this option^ ? The diff on some of these is really high |
I ran out of ideas. Let me check with the team. |
@lucasmrod - thanks for looking into this ! Do we know why the date is "Never" even tho the agent is installed ? 🤔 We have some internal flow that triggers if the enrollment date change, in our minde this date should never changed, and if it is, it means the device was re-enrolled if the |
Hey @lucasmrod thanks for digging into this!
Looking at the bug description, my understanding is that
@valentinpezon-primo please correct me if I'm wrong.
I had the same question... Don't we have a "created at" timestamp in the hosts table in the Fleet DB that gets created when fleetd is installed and host enrolls? Maybe this the bug? Meaning, assuming I'm right about
@lucasmrod, are there other cases that we know of in which the dates are far apart? If I'm understanding correctly, @valentinpezon-primo is that right? If that's right, and assuming we don't have a "created at" timestamp for hosts that turn on MDM manually and then have fleetd installed, it sounds like |
Yes @noahtalerman , we do this (profile then fleetd is installed by fleet) But this behavior is new (the "never" date), was properly populated before ! |
Hi folks!
The bug we introduced in v4.51.0 caused MDM enrolls/re-enrolls to set the
Gotcha. AFAICS the I'm guessing for customer-preston these "Never" happen because of either (B) or (C)? |
|
Yes, that would be the plan. |
…0173) #20059 - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [X] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) - [X] If database migrations are included, checked table schema to confirm autoupdate - For database migrations: - [X] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [X] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [X] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). - [X] Added/updated tests - [X] Manual QA for all new/changed functionality
Thanks @lucasmrod and good timing. I literally encountered this yesterday after enrolling my device via DEP, removing the profile then manually re-enrolling. I'll be sure to test the other scenarios listed above as well. |
I had to test |
Enrolling manually, |
Fleet version: latest (bug introduced in
fleet-v4.51.0
)💥 Actual behavior
Installing fleetd on macOS and then enrolling to MDM manually causes the host's
Added to Fleet
in the host details to beNever
.Expected behavior
The
Added to Fleet
should not be reset (set toNever
) when enrolling the host to Fleet MDM manually.🧑💻 Steps to reproduce
QA notes
Added to Fleet
date is accurate.My device
)Added to Fleet
date is accurate.The text was updated successfully, but these errors were encountered: