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

Option to automatically migrate Windows workstations #22075

Closed
14 of 16 tasks
noahtalerman opened this issue Sep 13, 2024 · 20 comments
Closed
14 of 16 tasks

Option to automatically migrate Windows workstations #22075

noahtalerman opened this issue Sep 13, 2024 · 20 comments
Assignees
Labels
~customer promise A feature request from a Fleet customer that Fleet has contractually agreed to deliver customer-deebradel customer-numa customer-preston #g-mdm MDM product group P2 Prioritize as urgent :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Milestone

Comments

@noahtalerman
Copy link
Member

noahtalerman commented Sep 13, 2024

Goal

User story
As an IT admin,
I want to migrate my Windows workstations from my old MDM solution to Fleet
so that I can use Fleet to enforce disk encryption, OS updates, and other OS settings on these hosts.

Objective

Customer promises + renewal requests

Original request

Context

Changes

Product

Engineering

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires load testing: No
  • Risk level: Low / High TODO
  • Risk description: TODO

Manual testing steps

  1. Run Fleet with Windows MDM turned off
  2. Enroll a Windows host into Fleet and enroll that Windows host in a third-party MDM solution
  3. Validate that the Windows host reports being MDM-enrolled in a third-party
  4. Turn on Windows MDM in Fleet
  5. Verify that the Windows device stays enrolled in its third-party MDM solution (e.g. wait for the "last refetched" note on the host's page to be after Windows MDM was turned on)
  6. Turn on Windows MDM migration in Fleet
  7. Verify that the Windows devices unenrolls from the third-party MDM solution, and subsequently enrolls into Fleet MDM (this may go quickly, in 1-2 minutes, so you may have to refresh the host's page frequently to see the intermediate step)

Alternative tests that would be good to cover if possible:

  • fleetctl gitops to enable MDM migration
  • try to enable migration without a premium license (via UI, and via fleetctl)
  • enroll the Windows device into a third-party MDM before adding it to Fleet
  • turn on Windows MDM migration at the same time as Windows MDM is enabled
  • try a migration from a Windows host enrolled in multiple third-party MDM solutions

Also, see testing notes below, and the results of my (@mna) QA of the feature branch here: #22075 (comment).

Testing notes

@mna :

I did a manual QA that worked fine with our POC MDM server as third-party MDM solution that the host migrated from. However I wasn't able to test with the host enrolled in multiple non-Fleet MDM solutions, which I believe is possible in Windows. I don't know how the unenrollment step of the migration would behave in this case, that's something we may want to try to cover in QA.

@noahtalerman:

Edge cases to consider:

  • What about offline hosts?
  • What happens in between toggling?
  • What about the folks that have ‘Windows MDM turned on’
  • What happens to those fleetd enrolled Windows hosts?
  • What does the reporting look like? (status of hosts that have not transitioned yet, and which have. What if some never check in? How will I know which have and which haven't?)

Confirmation

  1. Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. QA (@PezHub ): Added comment to user story confirming successful completion of QA.
@noahtalerman noahtalerman added story A user story defining an entire feature :product Product Design department (shows up on 🦢 Drafting board) labels Sep 13, 2024
@rachaelshaw rachaelshaw added the #g-endpoint-ops Endpoint ops product group label Sep 19, 2024
lukeheath pushed a commit that referenced this issue Sep 25, 2024
This was referenced Sep 26, 2024
rachaelshaw added a commit that referenced this issue Sep 26, 2024
@rachaelshaw rachaelshaw added #g-mdm MDM product group and removed #g-endpoint-ops Endpoint ops product group labels Oct 2, 2024
@rachaelshaw rachaelshaw assigned georgekarrv and unassigned sharon-fdm Oct 2, 2024
@noahtalerman noahtalerman added ~feature fest Will be reviewed at next Feature Fest customer-numa labels Oct 3, 2024
@noahtalerman
Copy link
Member Author

Moving this out of the issue description. This was used during design process. Please see the Figma in the issue description for the latest UI changes.

Flip this behavior:
Screenshot 2024-09-13 at 10 30 16 AM

@noahtalerman noahtalerman added Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. and removed Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. ~feature fest Will be reviewed at next Feature Fest labels Oct 4, 2024
@noahtalerman
Copy link
Member Author

noahtalerman commented Oct 7, 2024

Hey @zayhanlon heads up, this user story didn't make it into the upcoming engineering sprint because we didn't get it estimated in time.

It's still prioritized. We left it on the drafting board so that it can be pulled into the next engineering sprint.

@noahtalerman
Copy link
Member Author

Hey @georgekarrv just giving you a reminder that this story is ready to spec. Please let us know if we can help get this ready for estimation :)

cc @marko-lisica

@noahtalerman
Copy link
Member Author

Hey @georgekarrv just giving you a ping! as a reminder that this story is ready to spec. Please let us know if we can help get this ready for estimation.

@pintomi1989 pintomi1989 added the ~feature fest Will be reviewed at next Feature Fest label Oct 24, 2024
@noahtalerman noahtalerman removed the ~feature fest Will be reviewed at next Feature Fest label Oct 24, 2024
@georgekarrv georgekarrv added this to the 4.61.0-tentative milestone Nov 21, 2024
@mna
Copy link
Member

mna commented Nov 26, 2024

@noahtalerman @georgekarrv @rachaelshaw just a heads-up that there are fleetd changes required for this story (to receive a notification to unenroll from the previous MDM provider), so that feature will require the latest fleetd version to be supported.

Mentioning because the story currently states Fleet's agent (fleetd) changes: N/A.

@rachaelshaw
Copy link
Member

@mna thanks for calling that out! I updated the issue description to capture that.

@noahtalerman do you reckon that's worth calling out in the settings page copy or the docs? Or is it expected that users keep fleetd up-to-date?

Screenshot 2024-11-26 at 11 34 38 AM

Screenshot 2024-11-26 at 11 37 40 AM

@noahtalerman
Copy link
Member Author

Thanks @rachaelshaw!

do you reckon that's worth calling out in the settings page copy or the docs? Or is it expected that users keep fleetd up-to-date?

Good thinking but I think no copy or doc changes needed. It's expected to keep Fleet up-to-date. Most users rely on our update servers so when we push this fleetd update all their computers will get it.

For users who manage fleetd version themselves (pin it to a lower version), they can check the releases page for which fleetd version corresponds to the latest Fleet features.

@mna
Copy link
Member

mna commented Nov 27, 2024

@noahtalerman answering the questions you listed in the "QA -> Testing Notes" section of the story (not sure if that was for me/ the implementer of the solution or to be answered by QA, but in any case here are my answers now that the solution is implemented):

Edge cases to consider:

  • What about offline hosts?

Migration requires the host to be online with fleetd communicating with Fleet. Offline hosts would receive the notification to start the migration when they come online.

  • What happens in between toggling?

The migration is a two-step process: first unenroll from the old MDM, wait for confirmation on the server, then enroll in Fleet. So the host is either "still enrolled in the old MDM", "unenrolled from any MDM", or "enrolled in Fleet". From my tests, the switch is quite fast (a minute or two).

  • What about the folks that have ‘Windows MDM turned on’

You mean Fleet instances that have Windows MDM turned on before upgrading to the version that supports migration? They will still have it on, but migration will be disabled after upgrade and will need to be explicitly enabled (either via UI or fleetctl).

  • What happens to those fleetd enrolled Windows hosts?

Hosts that are already in Fleet MDM stay as-is, they won't execute any action for a migration.

  • What does the reporting look like? (status of hosts that have not transitioned yet, and which have. What if some never check in? How will I know which have and which haven't?)

The MDM stats section of the dashboard show the details of hosts vs MDM solution, but those stats are generated in a cron job that runs every hour. The specific hosts' details page will show what MDM they are part of (or not in MDM) during the switch based on what the host reported.

@mna
Copy link
Member

mna commented Dec 2, 2024

My QA of the feature branch now that all sub-tasks are implemented:


Windows MDM turned off, 2 Windows hosts enrolled, one already in a 3rd-party MDM before enrolling into Fleet, the other will be shortly, before MDM is turned on:

image

Then I enrolled the DreamQuest machine to the 3rd-party MDM, now that it is orbit-enrolled in Fleet. So now both Windows hosts are enrolled in a 3rd-party:

image


Now I turn on Windows MDM, but not the migration yet:

image

The "MDM turned on" activity gets created:

image

Both hosts remain in the 3rd-party MDM:

image


I turn on Windows migration via fleetctl apply:

apiVersion: v1
kind: config
spec:
  mdm:
    windows_enabled_and_configured: true
    windows_migration_enabled: true

[+] applied fleet config

image

The activity gets created and a host is already migrated:

image

And very soon after, both hosts are now enrolled into Fleet MDM:

image

image


Sent a trigger to speed up calculation of aggregated stats: $ ./build/fleetctl trigger -name cleanups_then_aggregation

image

(it says 3 because I have an ABM pending macOS host too)

Tooltip was properly updated on the "On (manually)" status:

image


Turning Windows migration off via fleetctl, gets properly reflected in the UI and the activity got created as expected:

image

image


Turning Windows MDM off altogether generates only that activity, not the Windows migration disabled one:

image

image

Note that Windows hosts do not properly unenroll from Fleet MDM, there's a distinct issue for that as this is a released bug unrelated to that story: #24209


I believe the frontend does not know about the new activities at the moment, as they show up as the generic layout, instead of what was designed in Figma. I'll create an issue to track that (#24269). The rest looks good to me.

mna added a commit that referenced this issue Dec 3, 2024
@mna
Copy link
Member

mna commented Dec 4, 2024

Video recording of the flow (@nonpunctual as you mentioned you wanted to see this):

https://drive.google.com/file/d/1WkViPyTrmdZVscjWsAwFVqRXcqbtiatM/view?usp=drive_link

@georgekarrv georgekarrv added :demo and removed :demo labels Dec 6, 2024
@PezHub
Copy link
Contributor

PezHub commented Dec 10, 2024

Additional QA tests and notes:

  • Fleet UI design and copy match Figma
  • Global Activity Feed is accurate
  • GitOps workflow succeeded for turning mdm and migration on/off
  • Confirmed migration option not available in Free Version

I also tested the following scenarios using a Surface Laptop enrolled in a 3rd Party MDM solution (from a different vendor):

1a. Enroll device in 3rd party mdm before adding to fleet ✅

  • remove fleetd from host
  • enroll in 3rd party mdm
  • install fleetd while windows mdm is OFF in Fleet UI
  • turn windows mdm on, wait...refetch
  • turn migration on

1b. Enroll device in 3rd party mdm before adding to fleet ✅

  • remove fleetd from host
  • enroll in 3rd party mdm
  • install fleetd while windows mdm is ON in Fleet UI
  • refetch..wait
  • turn migration on
  1. turn on Windows MDM migration at the same time as Windows MDM is enabled ✅
  • remove fleetd from host
  • enroll in 3rd party mdm
  • install fleetd while windows mdm is OFF in Fleet UI
  • turn on windows mdm and migration at the same time
  • refetch
  1. add a windows host that is already enrolled in 3rd party mdm to Fleet with MDM and Migration already turned ON ✅
  • remove fleetd from host
  • enroll in 3rd party mdm
  • install fleetd while windows mdm and migration is ON in Fleet UI
  • refetch

Additional Note - I did not have time nor resources to test a migration from a Windows host enrolled in multiple third-party MDM solutions

@noahtalerman
Copy link
Member Author

Hey @georgekarrv I think we missed guide updates for this user story. If that's right, can you please help me track a bug for guide updates?

cc @lukeheath

@georgekarrv
Copy link
Member

#24842 Added as a subtask to this story

lukeheath pushed a commit that referenced this issue Dec 17, 2024
Release article for Fleet 4.61.0

Highlighted user stories:
- #22077
- #22078
- #22075
@lukeheath lukeheath added :product Product Design department (shows up on 🦢 Drafting board) and removed :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. labels Dec 17, 2024
@marko-lisica marko-lisica assigned rachaelshaw and unassigned mna Dec 18, 2024
@noahtalerman
Copy link
Member Author

Hey @mna what happens when I set windows_enabled_and_configured to false and windows_migration_enabled to true in my YAML?

Do we show an easy to understand error message?

noahtalerman added a commit that referenced this issue Dec 18, 2024
- Add missing reference docs for the following user story:
  - #22075
@noahtalerman
Copy link
Member Author

@rachaelshaw I noticed that we were missing YAML reference docs and I'm not sure why. Did we merge the docs into the wrong reference docs branch and then, later, the changes got stomped on?

I opened a PR to add the missing docs here: #24891

@PezHub
Copy link
Contributor

PezHub commented Dec 19, 2024

Hi @noahtalerman , we do get a user friendly error when setting windows_enabled_and_configured to false and windows_migration_enabled to true in my YAML -

Error: applying fleet config: PATCH /api/latest/fleet/config received status 422 Validation Failed: Couldn't enable Windows MDM migration, Windows MDM is not enabled.

noahtalerman added a commit that referenced this issue Dec 19, 2024
- Add missing reference docs for the following user story:
  - #22075
@noahtalerman
Copy link
Member Author

Guide updates are merged! #24984

Closing this story.

@fleet-release
Copy link
Contributor

Migrate with ease now,
Windows workstations find home,
Fleet's cloud secure, sound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~customer promise A feature request from a Fleet customer that Fleet has contractually agreed to deliver customer-deebradel customer-numa customer-preston #g-mdm MDM product group P2 Prioritize as urgent :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Development

No branches or pull requests

10 participants