fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.7k stars 383 forks source link

fleetctl v4.53.0 does not honor `version` option #20042

Open androbotnik opened 3 weeks ago

androbotnik commented 3 weeks ago

Fleet version: 4.53.0

Web browser and operating system: Windows 11


💥  Actual behavior

on Windows 11 running fleetctl version 4.53.0, utilizing the version option of the package command does not build the expected installer version.

🧑‍💻  Steps to reproduce

  1. fleetctl.exe package --type=msi --version=1.25.0 --fleet-url=fleet_url --enroll-secret=enroll_secret --disable-updates
  2. run installer
  3. C:\Program Files\Orbit\bin\orbit\orbit.exe --version
  4. output of above command shows the current latest version 1.27.0. Agent Version of host in web console also shows 1.27.0

🕯️ More info (optional)

N/A

🛠️ To fix

PezHub commented 3 weeks ago

QA Notes:

Confirmed on both macOS and Windows when using the --version flag with 1.25.0 or 1.26.0 it still installs 1.27

For linux (deb) the installer created reflects the version used with the flag in the file name (e.g. fleet-osquery_1.25.0_amd64.deb) but the agent version installed is still 1.27

lucasmrod commented 3 weeks ago

Hi folks!

The current way to select a specific version/channel for fleetd is using --orbit-channel 1.27.0 (and if using --fleet-desktop then you also need to add --desktop-channel 1.27.0):

fleetctl.exe package --type=msi --orbit-channel=1.25.0 --fleet-url=fleet_url --enroll-secret=enroll_secret --disable-updates

PS: We should probably deprecate the --version flag.

lucasmrod commented 3 weeks ago

@noahtalerman @rachaelshaw See my previous comment around either deprecating --version in fleetctl package (or making --version X behave as if setting --orbit-channel X --fleet-desktop X).

lucasmrod commented 3 weeks ago

Removing :reproduce label as @PezHub has reproduced.

PezHub commented 2 weeks ago

Thanks for the info @lucasmrod! those flags did the trick and I was able to create/install an older version for macOS and Win.

Would be great to keep --version x and have it set the two other flags but thats just my 2 cents.

@androbotnik feel free to use the two flags Lucas mentioned until we make a decision on a path forward.

noahtalerman commented 2 weeks ago

Thanks @lucasmrod and @PezHub! Sounds like we should bring this one through design review to discuss whether it's a bug and, if it's a bug, potential solutions.

Please feel free to join today's design review!

cc @rachaelshaw

noahtalerman commented 2 weeks ago

Hey @sharon-fdm heads up, I'm moving this bug back to the release board.

@lucasmrod, @rachaelshaw, and I met during design review and we decided on the following solution:

🛠️ To fix

  • Remove --version flag (it doesn't work)
    • Call this out in the release notes so users are aware.

Lucas and Rachael, I took a look at the --orbit-channel description for fleetctl help and I think adding copy that explains that the overall fleetd version comes from the Orbit version adds more confusion than helps.

So, I didn't include this in the "To fix" section. Please let me know if you think I'm wrong/missing something.

sharon-fdm commented 2 weeks ago

@noahtalerman, SGTM

MDM team was set, I assume by mistake.

sharon-fdm commented 2 weeks ago

Hey team! Please add your planning poker estimate with Zenhub @getvictor @jacobshandling @lucasmrod @mostlikelee @RachelElysia