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

Update download not proceeding to the Download phase on Monterey 12.3.1 when run from Jamf **intel mac** #11

Closed
KumarMudedla opened this issue May 25, 2022 · 7 comments

Comments

@KumarMudedla
Copy link

KumarMudedla commented May 25, 2022

Hello,
Thank you for the script and work. Any one seen issues with Monterey 123.1 to 12.4 when run via Jamf ? its Intel mac only

I am trying to test and the script with different options and messages on Big Sur (11.6.5) and Monterey 12.3.1, script working as expected on Big Sur but on Monterey Jamf exits and Launch Daemon will start the Super script and Super finding 12.4 update and then running 'softwareupdate --download --all --agree-to-license'

Update.log stuck at these wont move forward to the Download Phase and even if we wait few days

2022-05-20 13:16:30.247635-0400 0x3ae2d Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:SOFTWARE_UPDATE stalled:NO portionComplete:0.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:30.480709-0400 0x3b1d1 Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (end): phase:SOFTWARE_UPDATE stalled:NO portionComplete:19.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:30.482147-0400 0x38d09 Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:BRIDGE_OS_SOFTWARE_UPDATE stalled:NO portionComplete:50.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:31.939043-0400 0x3ae2d Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (end): phase:BRIDGE_OS_SOFTWARE_UPDATE stalled:NO portionComplete:69.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:31.939942-0400 0x3ae2d Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:UPDATE_BRAIN stalled:NO portionComplete:70.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:32.167076-0400 0x3ae30 Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (end): phase:UPDATE_BRAIN stalled:NO portionComplete:79.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:32.168075-0400 0x3ae2d Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:MINOR_DOCUMENTATION stalled:NO portionComplete:90.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:32.403863-0400 0x3b1d1 Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (end): phase:MINOR_DOCUMENTATION stalled:NO portionComplete:99.000000 estimatedTimeRemaining:-1.000000 2022-05-20 13:16:32.406838-0400 0x3ae30 Default 0x0 316 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:COMPLETE stalled:NO portionComplete:100.000000 estimatedTimeRemaining:-1.000000

-->If I trigger the Super from terminal, it then start the update downloads with no issues. I have been testing and trying to pin point the issue. I see that if we run Super script via LaunchDaemon it will not proceed to the download phase no matter if it was run via Jamf or local admin account

For testing I removed 'makeLaunchDaemonRestartNow' logic so Jamf can directly trigger's the update and that works fine, so its the issue with LaunchDaemon.

I have not dig into the Apple logs a lot yet, but nothing glaring from the software update logs.

@KumarMudedla KumarMudedla changed the title Update download not proceeding to the Download phase on Monterey 12.3.1 when run from Jamf Update download not proceeding to the Download phase on Monterey 12.3.1 when run from Jamf **intel mac** May 25, 2022
@Macjutsu
Copy link
Owner

Macjutsu commented May 25, 2022

Very interesting.

First, by skipping the LaunchDaemon, you are going to cause problems for the Jamf agent. Specifically, if it takes a long time for the super workflow, during that time the Jamf agent will be hung waiting for super to complete. What if the download does take over an hour, or worse, what if the user doesn't make a dialog selection for many hours? In either case, super will wait indefinitely and thus also the Jamf agent will hang and not perform any other management.

Second, the LanchDaemon literally just restarts super via the super-starter script, so it is very strange that there is any difference at all between that restart run of super vs manually via Terminal. Are you sure it's not just that the first run of softwareupdate hung, but the second run on the same system worked?

In any case, I'll run some more tests to see if I can replicate the issue.

@KumarMudedla
Copy link
Author

@Macjutsu Thank you for the quick reply. Trust me I went through your script and understand the reason for LaunchDaemon. I was skipping for testing point of view only to pin point the issue. We have this issue on few devices we are testing (a laptop ,VM) I am currently testing on VM, so for every test, I can revert back to the same state where I never triggered the Softwareupdate.

also to rule out when the script was ran from Jamf with out LaunchDaemon its working fine so the first run of softwareupdate is not causing that issue, its only causing the issue when run from the LaunchDaemon.

I will do some more testing on a clean VM with out Jamf and our customizations to rule out if anything that we added causing this issue.

Thank you so much again.

@Macjutsu
Copy link
Owner

Macjutsu commented May 25, 2022

I also use VMs for testing, and I can confirm that for both Intel and Apple Silicon, softwareupdate --download --all on macOS 12 is hanging, but only when run via super and via the LaunchDaemon.

This is exceptionally weird because it works fine via MDM command, or on older OSes, or when running super directly from Terminal.

@Macjutsu
Copy link
Owner

More evidence... https://developer.apple.com/forums/thread/701096

Looks like it's related to the download notifications, which I would prefer to hide anyhow as they would likely collide with IBM Notifier and jamfHelper.

@KumarMudedla
Copy link
Author

Thank you for testing and confirming. Thinking and researching about other workarounds and what others are doing.

@Macjutsu
Copy link
Owner

I'm testing one right now! I will share once the workaround is confirmed.

@Macjutsu
Copy link
Owner

Confirmed workaround on both Intel and Apple silicon. Thanks for finding this one!
https://github.com/Macjutsu/super/blob/main/CHANGELOG.md#111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants