Android host disk space shows "Not supported" after re-enrollment
Fleet versions
- Discovered: 4.92.0-rc.2609041753
- Reproduced: 4.92.0-rc.2609041753
Web browser and operating system: Chrome running on macOS; Android 16 (Samsung SM-S906U1, BYOD work profile)
💥 Actual behavior
After an Android host re-enrolls, its disk space on the Host details page changes from a real value to "Not supported." Before the re-enroll the host showed 95.3 GB of 110.3 GB available (86.4%); right after, the same host shows "Not supported" while total disk space still reads 110.3 GB.
It stayed that way for at least several minutes after the re-enroll. I expect it recovers on the next status report that includes a storage measurement, but there's a window where a host that reported disk space fine a minute ago looks like it doesn't support reporting it at all.
🛠️ Expected behavior
A re-enrollment shouldn't downgrade a vital Fleet already knows. If the enrollment payload doesn't include a storage measurement, keep the last known value rather than replacing it with "Not supported."
🧑💻 Steps to reproduce
These steps:
- [ ] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
- [x] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
- Enroll an Android host (BYOD work profile) and wait for it to report disk space on Host details → Disk space (a real GB/percentage value, not "Not supported").
- On the device, remove the work profile and re-enroll it with the same enrollment secret.
- Open Host details for that host once the re-enrollment lands.
- Disk space now reads "Not supported," while total disk space is still correct.
🕯️ More info (optional)
This is not caused by anything in #43500 — that reset deliberately leaves host_disks alone. The enrollment simply overwrites the good row with a sentinel:
calculateAndroidStorageMetricsreturns-1for available space and percentage when the device reportsTotalInternalStoragebut noINTERNAL_STORAGE_MEASURED/EXTERNAL_STORAGE_MEASUREDmemory event — the documented "measurement not supported" case (server/mdm/android/service/pubsub.go:1904-1922).- The ENROLLMENT notification appears not to carry MEASURED events, so
updateHostwrites-1over the previous value (pubsub.go:987→UpdateAndroidHost→SetOrUpdateHostDisksSpace,server/datastore/mysql/android.go:324-330). Routine status reports do carry them — this host had a correct value from a status report a few hours earlier. - The frontend renders any negative value as "Not supported" (
frontend/pages/hosts/components/DiskSpaceIndicator/DiskSpaceIndicator.tsx:31-36), which is why it reads as a capability gap rather than as missing data.
Observed via the API before and after the re-enroll:
| before | after | |
|---|---|---|
gigs_disk_space_available |
95.3 | -1 |
percent_disk_space_available |
86.4 | -1 |
gigs_total_disk_space |
110.3 | 110.3 |
Not new in 4.92 — the sentinel and this call site both landed in 500d1bc5e8 ("Improve Android host storage display", #33125), first released in 4.75.0. Found while QAing #43500, which is why it's worth a look now: that story's premise is that re-enrollment overwrites the vitals unconditionally, and the comment at server/datastore/mysql/android.go:346-352 cites exactly that to justify not clearing them. It does overwrite them — with a value that reads worse in the UI than the blank a delete would have left.
-
After re-enrolling, the Disk space field doesn’t appear in Vitals at all.
-
It also looks like the re-enrollment may have created a new host record instead of updating the existing one. “Added to Fleet” reset to a few minutes ago.
-
After refetched, "Disk space" field appear again.
QA on main (local dev server, build 3af3296040)
| Step | Host | Disk space | Result |
|---|---|---|---|
| Baseline before re-enroll | Pixel 8a (BYOD, host 56) | 93.74 GB / 84.80% / 110.54 GB | Pass |
| Remove work profile on device, re-enroll with same link | Pixel 8a | Same host (ID 56), no duplicate. Disk space kept at 93.74 GB, vital shown | Pass |
| First status report after re-enroll (17:01, no storage measurement) | Pixel 8a | Kept at 93.74 GB, row not overwritten | Pass |
| Manual sync with new measurement (17:30) | Pixel 8a | Updated to 95.28 GB / 86.19% | Pass |
Data flows like rain keep what was known and held true trust returns faster