-
Notifications
You must be signed in to change notification settings - Fork 5
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
Inventory module using wrong path to Munki ApplicationInventory.plist #11
Comments
The Run |
@tuxudo
|
What do you get when running |
I get the following
|
The configuration looks to be correct for Munki and MunkiReport's install script is correctly detecting the proper Munki install directory. I am unable to reproduce this. You can try reinstalling the MunkiReport client package to properly set the location of the |
There was an extra ManagedInstalls.plist in /Library/Preferences but its contents did not have any incorrect locations defined so should have had no effect. I have deleted it although I think Munki may be guilty and may re-create it. I checked /var/root/Library/Preferences there is no ManagedInstalls.plist there, I also checked the normal actual user location e.g. /Users/myname/Library/Preferences. I checked the contents of /Library/Managed Preferences/ManagedInstalls.plist and it is fine with one correct value, I use a Jamf profile pre-defined template for this profile and hence it is impossible to add duplicate fields. I renamed /usr/local/munkireport and ran the installer again to create a fresh copy. and ran it. It still afterwards shows
Hmmm. Interestingly I have discovered the following. I did these steps in the listed order, immediately after each other.
It had re-created the copy in /Library/Preferences I did this more than once so unless MunkiReport triggers the execution of Munki, then something MunkiReport is doing is causing the creation of this copy. There was not enough time for a normal Munki execution to occur. Here is a sanitised copy of my normal /Library/Managed Preferences/ManagedInstalls.plist
|
Run Reinstall MunkiReport and run What is the output of both of those? |
@tuxudo I did your latest request and it has the following results.
It should be noted that Munki aka managedsoftwareupdate has always shown the correct location. In case you got the second command wrong I also ran the following
It STILL results in listing After a great deal of pain since plutil does not update the plist cache and defaults write is terrible at modifying arrays, I was able to manually set However since I have repeatedly deleted the entire MunkiReport.plist and reinstalled, I am still concerned that installing additional clients will hit the same problem and this approach is not sustainable for that, also it might break the value at some point on my now currently working client. A potential workaround but an extremely ugly one would be to create a symbolic link between the wrong file path and the correct file path for ApplicationInventory.plist Possible red-herrings, the script for inventory is called inventory_add_plugins.py I believe this merely reflects a past improvement to also inventory plugins but could something have been broken? Also there is a script called managedinstalls.py which also looks at Munki activity, however I do not believe this is for the inventory. |
@tuxudo The PostInstall script in the installer pkg contains the following line
It should be
Therefore the issue appears to be a bug in MunkReport-PHP 5.8.0.4284 and not my client Mac or setup. I have a suspicion this bug may have existed a while and therefore possibly also in 5.7. Since the bug is I believe now shown to be in MunkiReport-PHP itself and not the Inventory module I am closing this issue and re-opening my original issue for MunkiReport-PHP itself. |
I already have Munki deployed and working to all our Macs. I push out settings via a managed profile i.e. an MDM server.
The Munki working directory location is the usual
/Library/Managed Installs/
and in that directory isApplicationInventory.plist
Unfortunately MunkiReport seems to be confused and its setup shows it is looking in
/Library/Preferences/Managed Installs/
does not exist and hence it does not findApplicationInventory.plist
There is a
/Library/Preferences/ManagedInstalls.plist
but this is not the same thing.munkireport_runner --show-config
shows the following entryinventory = "/Library/Preferences/Managed Installs/ApplicationInventory.plist";
and the actual execution gives the corresponding error ofWARNING: Can't open /Library/Preferences/Managed Installs/ApplicationInventory.plist
As a result the Inventory choice in Listings is effectively empty as it only lists the computer, and App Versions Report shows no version information and clicking on an entry as per APPS_TO_TRACK in my .env goes to a table saying 'No data available in table', this includes the default Safari app.
I am using an Ubuntu 20 Server running Apache2 and PHP8 and MunkiReport-PHP 5.8.0.4284
The text was updated successfully, but these errors were encountered: