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

Check for pre-downloaded updates ? #13

Closed
KumarMudedla opened this issue Jun 1, 2022 · 8 comments
Closed

Check for pre-downloaded updates ? #13

KumarMudedla opened this issue Jun 1, 2022 · 8 comments

Comments

@KumarMudedla
Copy link

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

@Macjutsu
Copy link
Owner

Macjutsu commented Jun 2, 2022

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.

@KumarMudedla
Copy link
Author

KumarMudedla commented Jun 2, 2022

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

@Macjutsu
Copy link
Owner

Macjutsu commented Jun 2, 2022

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
Copy link
Owner

Macjutsu commented Jun 2, 2022

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 ****

@KumarMudedla
Copy link
Author

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
Copy link
Author

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 ?

@Macjutsu
Copy link
Owner

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
Copy link
Owner

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

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