BIG-RAT / Prune

Remove unused items from your Jamf server
MIT License
163 stars 9 forks source link

Computer AEs #29

Closed Shamus78 closed 1 year ago

Shamus78 commented 1 year ago

I hope i'm just missing something. when I remove the "kept items" I then select delete and it indicates that i'm about to remove 0 objects when I have 15 items listed. I then select OK and I get a ring.

BIG-RAT commented 1 year ago

Thanks for the catch, you're not missing a thing. Issue should be resolved in v2.3.2.

Shamus78 commented 1 year ago

Shamus78 commented 38 seconds ago I hope i'm just missing something. when I remove the "kept items" I then select delete and it indicates that i'm about to remove 0 objects when I have 15 items listed. I then select OK and I get a ring.

Shamus78 commented 1 year ago

Thank you! trying it again today I see its now seeing all the items selected but I'm getting error HTTP Status Code: 502 - 404 - 400 error for each item selected - completed with the following msg. Removal process complete. Note, 15 items were not deleted. checking my master account just to make sure I full permissions. could this be something else?

BIG-RAT commented 1 year ago

I'll play around a bit as I wonder if the 400 is permissions related. 502 seems more network related. 404 - not found is an odd one, wonder if the app is having issues with the name.

Shamus78 commented 1 year ago

just checked master account, has everything enabled tried it once more same results.

BIG-RAT commented 1 year ago

Are you able to share part of the app log? Wondering if yours look anything like this:

Fri Nov 18 08:51:17 [remove_Action] remove computer extension attribute with id: 801
Fri Nov 18 08:51:17 [remove_Action] remove computer extension attribute with id: 790
Fri Nov 18 08:51:24 [Xml.DELETE] existing endpoints URL: https://my.jamfserver.com/JSSResource/computerextensionattributes/id/801
Fri Nov 18 08:51:24 [Xml.DELETE] successfully retrieved: computerextensionattributes/id/801
Fri Nov 18 08:51:24 [remove_Action] removed category computerextensionattributes with id: 801
Fri Nov 18 08:51:24 [Xml.DELETE] existing endpoints URL: https://my.jamfserver.com/JSSResource/computerextensionattributes/id/790
Fri Nov 18 08:51:25 [Xml.DELETE] successfully retrieved: computerextensionattributes/id/790
Fri Nov 18 08:51:25 [remove_Action] removed category computerextensionattributes with id: 790
Shamus78 commented 1 year ago

Thank you for looking into this BR, this is starting to look like a environmental issue, when I attempted to delete a single id via api I was given errors indicating that even though the Ea was disabled it would linked to a group and or profile. Once these where severed I was then able to delete the AE. I'll need to then back track and run this for groups and profiles and clean these out first.

Shamus78 commented 1 year ago

Fri Nov 18 12:01:37 [remove_Action] failed to removed category computerextensionattributes with id: 64 Fri Nov 18 12:01:37 [Xml.DELETE] existing endpoints URL: https://Musicbox.jamfcloud.com/JSSResource/computerextensionattributes/id/64 Fri Nov 18 12:02:07 [Xml.DELETE] error HTTP Status Code: 502

manually run to determine error

~ % curl -X DELETE "https://Musicbox.jamfcloud.com/JSSResource/computerextensionattributes/id/64" -H "accept: application/xml" -H "Authorization: Bearer cruncky"

Status page

Bad Request

The following items are dependent on this Computer Extension Attribute and need to be updated: Smart Computer Group:Has Adobe Flash and needs to be uninstalled, Smart Computer Group:Has Adobe Flash and needs to be uninstalled copy

You can get technical details here.
Please continue your visit at our home page.

BIG-RAT commented 1 year ago

That helps. Looks like EAs that are being used for smart group criteria were not being picked up. v2.3.3 should have that resolved.