munki / munki

Managed software installation for macOS —

Home Page:https://www.munki.org/munki/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loginwindow and staged_os_installer loop

mariuslangz opened this issue · comments

I'm seeing some unwanted results with the new staged_os_installer function and login window:

First of all I downloaded and imported new macOS Ventura installer into Munki with the new command:
munkiimport --installer-type stage_os_installer

After importing I've added the installer to my test-manifest and added it as a managed_installs item, and fetching new update using terminal managedsoftwareupdate --auto.
After this I got the pop-up to install macOS Ventura correctly the first time, then decided to do a reboot first and got stuck in a loop.

Test machine here is a MacMini M1 2020 running macOS Monterey 12.6.1

Link to screen recording: https://www.icloud.com/iclouddrive/04cXXzayc5AvDIRwd17gVIdqg#staged_installer_loop_loginwindow

Adding relevant log lines below:

Oct 25 2022 13:54:55 +0200 Skipping Apple Software Updates because items to be installed from the Munki repo contain Apple items.
Oct 25 2022 13:54:55 +0200
Oct 25 2022 13:54:55 +0200 The following items will be installed or upgraded:
Oct 25 2022 13:54:55 +0200 + macOS_Ventura-13.0
Oct 25 2022 13:54:55 +0200 Downloads and prompts for macOS Ventura upgrade

Oct 25 2022 13:54:55 +0200 Preventing idle sleep
Oct 25 2022 13:54:55 +0200 ### Beginning unattended installer session ###
Oct 25 2022 13:54:55 +0200 Processing installs
Oct 25 2022 13:54:55 +0200 Checking if Install macOS Ventura.app is running...
Oct 25 2022 13:54:55 +0200 Installing macOS Ventura (1 of 1)
Oct 25 2022 13:54:55 +0200 Mounting disk image Install macOS Ventura-13.0.dmg
Oct 25 2022 13:54:55 +0200 Copying Install macOS Ventura.app to /Applications/Install macOS Ventura.app
Oct 25 2022 13:55:12 +0200 Setting owner and group for '/tmp/munki-xvjqamx2/tmplzl7x2jt/Install macOS Ventura.app' to 'root:admin'
Oct 25 2022 13:55:12 +0200 Setting mode for '/tmp/munki-xvjqamx2/tmplzl7x2jt/Install macOS Ventura.app' to 'o-w,go+rX'
Oct 25 2022 13:55:12 +0200 The software was successfully installed.
Oct 25 2022 13:55:12 +0200 Verifying macOS installer...

Oct 25 2022 13:56:52 +0200 ### End unattended installer session ###

Oct 25 2022 14:01:54 +0200 ### Beginning managed software check ###
Oct 25 2022 14:01:54 +0200 Checking for available updates...
Oct 25 2022 14:01:54 +0200 Getting manifest test-dep...
Oct 25 2022 14:01:54 +0200 Retrieved manifest test-dep
Oct 25 2022 14:01:54 +0200 Using manifest: test-dep
Oct 25 2022 14:01:54 +0200 Preventing idle sleep
Oct 25 2022 14:01:54 +0200 Checking for installs
Oct 25 2022 14:01:54 +0200 Getting catalog development...
Oct 25 2022 14:01:54 +0200 Getting catalog testing...
Oct 25 2022 14:01:56 +0200 Recording staged macOS installer...
Oct 25 2022 14:01:56 +0200 Verifying macOS installer...
Oct 25 2022 14:01:56 +0200 macOS_Ventura version 13.0 (or newer) is already installed.

Oct 25 2022 14:01:56 +0200 Processing self-serve choices
Oct 25 2022 14:01:56 +0200 Getting client resources...
Oct 25 2022 14:01:56 +0200 Bytes received: 178
Oct 25 2022 14:01:56 +0200 Getting client resources...
Oct 25 2022 14:01:56 +0200 Bytes received: 178
Oct 25 2022 14:01:56 +0200 No change in InstallInfo.
Oct 25 2022 14:01:56 +0200 ### End managed software check ###
Oct 25 2022 14:01:56 +0200 Allowing idle sleep
*Oct 25 2022 14:01:56 +0200
Oct 25 2022 14:01:56 +0200 The following macOS upgrade is available to install:
Oct 25 2022 14:01:56 +0200 + Install macOS Ventura-13.0
Oct 25 2022 14:01:56 +0200 Must be manually installed

Oct 25 2022 14:01:56 +0200 Finishing...
Oct 25 2022 14:01:56 +0200 Saving application inventory...
Oct 25 2022 14:02:00 +0200 Performing postflight tasks...
Oct 25 2022 14:02:00 +0200 ### Ending managedsoftwareupdate run ###

Is the bootstrapping flag file present?

Here's what I tried today:

  • Apple silicon machine running macOS 12.6.
  • Added an "InstallMonterey" item to its managed installs; this is a stage_os_installer item. A background run of Munki copied the "Install macOS Ventura.app" application to /Applications, and MSC.app shows it as an available install:

image

- `touch /Users/Shared/.com.googlecode.munki.checkandinstallatstartup` and log out.
  • Munki ran once at the loginwindow and exited. No looping.

I had to slow your video down to 0.5x to see what was happening, and I see nothing unexpected. I see two runs: the first installs "OS X - add Managed Software Center to Dock" and "OS X - add Teamviewer QuickSupport to Dock". Because changes were made, Munki runs again. On the second run, no changes are made, and the movie ends with Munki "Finishing...". So the movie doesn't demonstrate any issue. Perhaps it continues to loop, but nothing in the video I have shows anything unexpected.

The log you post also does not show anything unexpected, and also shows no evidence of "looping".

Well this is awkward.. Was indeed a bug in one of our scripts.. Sorry for not checking properly before creating a issue!

Glad it's not a Munki issue!