Skip to content

Fresh Fleet install does not apply default enable_host_users: trueΒ #44630

@Brajim20

Description

@Brajim20

Fleet versions

  • Discovered: v4.85.0-rc.2605012055
  • Reproduced: v4.85.0-rc.2605012055, v4.84.0

Web browser and operating system: N/A β€” server-side bug, confirmed via DB and API


πŸ’₯ Actual behavior

After a fresh Fleet install (clean DB β†’ fleet prepare db β†’ fleetctl setup), features.enable_host_users persists as false in the database, despite both the documentation and source code defining the default as true. enable_software_inventory (also a default in the same code path) correctly persists as true β€” only enable_host_users is affected.

DB state immediately after a fresh install with no further config changes:

SELECT JSON_EXTRACT(json_value, '$.features') FROM app_config_json LIMIT 1;
-- Returns: {"enable_host_users": false, "enable_software_inventory": true}

The host details page consequently displays "User collection has been disabled" with a docs link to enable the feature, despite the admin having taken no action to disable it.

πŸ› οΈ Expected behavior

A fresh Fleet install should persist enable_host_users: true per both the documentation and the source code default in server/fleet/app.go:

func (f *Features) ApplyDefaults() {
    f.EnableHostUsers = true
}

Documentation (https://fleetdm.com/docs/configuration/yaml-files#features) explicitly states:

enable_host_users specifies whether or not Fleet collects user data from hosts (default: true).

Both enable_host_users and enable_software_inventory should be true after a fresh install with no admin intervention.

πŸ§‘β€πŸ’» Steps to reproduce

These steps:

  • Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  • Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
  1. From a fresh instance.
  2. Run fleet prepare db against the clean DB.
  3. Start Fleet: ./build/fleet serve --dev --config fleet.yml
  4. Run fleetctl setup to create an admin user.
  5. Query the DB: docker exec -it fleet-mysql-1 mysql -uroot -ptoor fleet -e "SELECT JSON_EXTRACT(json_value, '\$.features') FROM app_config_json LIMIT 1;"
  6. Observe: enable_host_users is false, enable_software_inventory is true.
  7. Enroll a host. Open the host's page and observe the "User collection has been disabled" message under Local user accounts.

πŸ•―οΈ More info (optional)

Metadata

Metadata

Assignees

Labels

#g-orchestrationOrchestration product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.P2Urgent: Supported workflow not functioning as intended, newly drafted feature with urgent Fleet needbugSomething isn't working as documented~released bugThis bug was found in a stable release.

Type

Projects

Status

🐣 In progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions