super icon indicating copy to clipboard operation
super copied to clipboard

Check for pre-downloaded updates ?

Open KumarMudedla opened this issue 2 years ago • 7 comments

Thanks again for the work, after disabling the software update notifications was able to test it on VM successfully from 12.3.1 to 12.4. Now testing on few laptops and the updates download stuck just like before even though Software Update notifications are disabled. by looking at the mac's I see that they downloaded the update even before the Super Script started, so super script checks for the available updates and triggers the download command and then it gets stuck up waiting for the "phase:COMPLETED" but as the updates already downloaded that never happens again.

I wish Apple should have provided some feedback from softwareupdate that tell us the update already downloaded, I am looking for options to identify these cases but no luck yet. Any other options out there ? some one also looking for the same issue https://community.jamf.com/t5/jamf-pro/monitor-software-update-download-status/td-p/263400

KumarMudedla avatar Jun 01 '22 20:06 KumarMudedla

First, to be clear super is waiting for the softwareupdate process to itself return that it's done. The super update.log is just there for reference when using softwareupdate. (Further, super only reacts to the update.log when downloads are called via MDM command.)

In other words, in your testing is the softwareupdate process completing the download? Even if the download was previously cached, the softwareupdate command should return that the "downloads are complete", and thus super continues with its workflow.

Macjutsu avatar Jun 02 '22 17:06 Macjutsu

Thank you for correcting me , looked at the script again and it is waiting for the softwareupdate and checking 'downloadRESULT'

may be I am hitting the same Software update notification issue

I did disabled the update notifications, not sure if that applied here then, it worked fine on the VM's I see that Softwareupdate returning downloaded 12.4 and also I see 'Restart Now' option on the Software Update image

image

I just ran script on it and it just sits here image

Update logs sitting at the below as behavior where the update notification enabled

[com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (end): phase:MINOR_DOCUMENTATION stalled:NO portionComplete:99.000000 estimatedTimeRemaining:-1.000000 2022-06-02 13:08:15.933553-0500 0x4768e Default 0x0 283 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:COMPLETE stalled:NO portionComplete:100.000000 estimatedTimeRemaining:-1.000000 2022-06-02 13:08:15.933553-0500 0x4768e Default 0x0 283 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:COMPLETE stalled:NO portionComplete:100.000000 estimatedTimeRemaining:-1.000000 2022-06-02 13:08:15.933553-0500 0x4768e Default 0x0 283 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:COMPLETE stalled:NO portionComplete:100.000000 estimatedTimeRemaining:-1.000000 2022-06-02 13:08:15.933553-0500 0x4768e Default 0x0 283 0 softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:ScanManager] [Progress] Scan reported progress (start): phase:COMPLETE stalled:NO portionComplete:100.000000 estimatedTimeRemaining:-1.000000

KumarMudedla avatar Jun 02 '22 18:06 KumarMudedla

Below is an example from macOS 12 of the output of softwareupdate when the download has already been completed and you try to download it again. It "completes" the download in just a few seconds, but it still exits properly without hanging. In other words, in your testing softwareupdate isn't returning back that it's done.

build@MacBook-Pro ~ % time sudo softwareupdate --download --all
Software Update Tool

Finding available software
Downloading macOS Monterey 12.4

Downloaded: macOS Monterey 12.4
sudo softwareupdate --download --all  0.06s user 0.05s system 1% cpu 9.012 total

Macjutsu avatar Jun 02 '22 18:06 Macjutsu

In your previous example of the update.log... note that the progress that reported as completed is just the [Progress] Scan reported progress. That means the update scan completed, not the download and preparation. Below is an example from the update.log of what we would see if the download actually completed, prepared, and is ready to install.

[com.apple.SoftwareUpdateMacController:SU] [SUMacControllerProgressManager] Reported progress (inter): phase:PREPARING_UPDATE stalled:NO portionComplete:0.985610 estimatedTimeRemaining:300.000000
2022-06-02 11:20:01.225208-0700 0x10d0a    Default     0x0                  269    0    softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:SU] [SUMacControllerProgressManager] Reported progress (end): phase:PREPARED stalled:NO portionComplete:0.999000 estimatedTimeRemaining:-1.000000
2022-06-02 11:20:01.225347-0700 0x10d0a    Default     0x0                  269    0    softwareupdated: (SoftwareUpdateMacController) [com.apple.SoftwareUpdateMacController:SU] [SUMacControllerProgressManager] Reported progress (end): phase:COMPLETED stalled:NO portionComplete:1.000000 estimatedTimeRemaining:-1.000000
Thu Jun 02 11:20:01 Monterey12 super[6304]: **** S.U.P.E.R.M.A.N. ASU DOWNLOAD END ****

Macjutsu avatar Jun 02 '22 18:06 Macjutsu

Yes, its not going to the downloads phase, I am assuming its getting stuck like the Softwareupdare notification issue, I will double check on the Software update notifications are disabled as may be the notification are not getting disabled even after the config profile installed. Thank you for taking time on this

KumarMudedla avatar Jun 02 '22 18:06 KumarMudedla

just update you, in that state if I run the Super from terminal, its working fine, so it update notifications are not disabled properly. Sorry I am asking tom many questions, Any way to manually check if the update notification disabled completely ?

KumarMudedla avatar Jun 02 '22 19:06 KumarMudedla

Please check out super v2.0-b1 and see if it resolves your issue. There are some internal improvements to the MDM parsing that may help.

Macjutsu avatar Jun 16 '22 03:06 Macjutsu

This should be resolved with super v3.0b1. Thanks!

Macjutsu avatar Oct 21 '22 20:10 Macjutsu