railsfactory-manikandant / munki

Automatically exported from code.google.com/p/munki
Other
0 stars 0 forks source link

Munki 2: Infinite loop on attempting to install an optional item with unsatisfiable 'requires' #346

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From what I can tell, trying to install an option install with at least one 
'requires' item that can't be satisfied results in an infinite check loop.

What steps will reproduce the problem?
1. Configure a pkginfo that has a 'requires' item that does not exist in the 
catalog, or cannot be installed due to version restrictions.
2. Put this item in a manifest's optional_installs.
3. On the client, attempt to install the optional item it via the MSC GUI, or 
manually add it to /L/Managed Installs/manifests/SelfServeManifest.

What is the expected output? What do you see instead?

It logs that it cannot find the required dependency and thus cannot do the 
install of the main item, however it seems to retry in an infinite loop. The 
same occurs if the dependency can't be satisfied due to OS X version 
restrictions.

What version of the Munki tools/InstallOSpkg tools are you using? On what
version of OS X?

10.9, tools 2.0.0.2091

Please provide any additional information below.

The attached log file shows a test with the following config:
- local munki repo at http://localhost/~test
- manifest is called 'test'
- Munki repo contains a single item, Firefox 30.0 imported via AutoPkg, and 
with an additional requires that doesn't exist, called "Foo"

The log shows the retry about every 6-7 seconds.

Original issue reported on code.google.com by t...@synthist.net on 3 Jul 2014 at 8:54

Attachments:

GoogleCodeExporter commented 9 years ago
I've replicated this issue.

Original comment by gregnea...@mac.com on 15 Jul 2014 at 5:38

GoogleCodeExporter commented 9 years ago
We're missing a feedback mechanism here.

User selects an optional_item for install. 
An installcheck session is started. Munki can't satisfy the requires 
dependency, and so does not add the item to the managed_installs list. Session 
ends.
MSC is notified that the session ends. It sees the item in the local SelfServe 
manifest as selected for install, yet the item is not in the 
InstallInfo.plist's managed_installs, so it kicks off an installcheck session...

We need a way to feed back to MSC.app that there is a problem in fulfilling the 
request. Such a mechanism exists when, say, there isn't enough disk space to 
download the item, so we should be able to use a similar mechanism.

Original comment by gregnea...@mac.com on 15 Jul 2014 at 6:07

GoogleCodeExporter commented 9 years ago
Thanks for the fix! I'm nowhere near a Mac for a couple days, but will try it 
out as soon as I am later this week.

Original comment by t...@synthist.net on 15 Jul 2014 at 11:52

GoogleCodeExporter commented 9 years ago
Fixed here: 
https://code.google.com/p/munki/source/detail?r=fa26662b78dd1f20433f10b03cc656e0
8fdf403c&name=Munki2

Original comment by gregnea...@mac.com on 16 Jul 2014 at 12:11