Smart Groups becoming incorrect, Edit/Save fixes them

Kennedy
New Contributor II

Hi all,

We are running 9.97.1482356336 and are seeing a pretty significant issue with our smart group memberships being incorrect. Hitting edit/save will correct them. I have been testing, and the smart groups get out of whack in a significant way overnight. Some groups have 2 or 3 computers missing or added wrongly, others have over 400! We are seeing more than 50% of our groups being incorrect, and no patterns that I can see.

I notice this thread from a few years ago that seems to describe our exact issue, but it went quiet around 2015.

I wonder if anyone out there has seen the same issue, or is prepared to spot check a few smart groups either by cloning them and comparing the numbers, or taking note of the number, then hitting edit/save and see if it changes.

Support is nearly convinced to lodge a product issue, and I'm certain that if others have the same issue it may get resolved.

In terms of a work around, are there any API experts out there that might be able to point me in the right direction with regards to editing/saving (add a character to the name?) with the API? I can do the scripting.

Cheers,
Gav

4 REPLIES 4

talkingmoose
Moderator
Moderator

While I haven't seen this issue myself, you can use @jcompton's jssMigrationUtility.bash API script to download the XML for your smart computer groups, delete your offending groups and use the script again to upload the XML to recreate the groups. Behavior I've seen in the past is your scopes should still be in tact so long as the group names remain the same.

Watch the JNUC video first. It demonstrates how the script works.
Make Your JSS Feel New Again with the Help of API

I'll point you also to my newer version of the script, which renames the XML files according to the group names in the JSS. This makes identifying the correct XML files for upload easier. You'll find it here:

https://github.com/talkingmoose/JSSAPIScripts/blob/master/jssMigrationUtility.bash

pcrandom
Contributor

@Kennedy I saw this issue last week on our JSS (9.93). The smart groups were correct the week before and then I noticed they were including systems they should have been excluding (these are for some Office 2016 smart groups). At first I thought something funky happened with the ordering of the criteria, so I deleted and re-added some criteria and that seemed to fix it, but then on one I just did an edit/save without changing anything, and that fixed it too.

Behavior I've seen in the past is your scopes should still be in tact so long as the group names remain the same.

@talkingmoose, I'm not sure how that can be, though your practical experience obviously trumps my hypothetical, but since SGs are referenced by ID in policies and deleting and recreating SGs generates new IDs (I believe), wouldn't that break the link (unless the script has a way to assign an ID to the SG it created)? Also, if any SGs are referenced by the Computer Group Member Of criteria and you try to delete the SG, the JSS prevents you from doing so.

talkingmoose
Moderator
Moderator

@pcrandom, yes, recreating a smart group will generate a new ID, however, keeping the same name does keep it related to policies, profiles, etc., that reference it. That was a nice surprise I found when using Jeff Compton's migration script.

Kennedy
New Contributor II

@talkingmoose Thanks for the script heads up. It seems a bit risky to remove and add all of our SMART groups at this stage, but we might not have any other choice eventually.

I'm even considering apple script or automator and a VM to just run through the tabs and hit edit (E) and save (Enter) at this stage. Crazy!

Obviously open to more robust/less dramatic ideas!

Cheers,
Gavin