Skip to main content

Hi all,

I was wondering if anyone can shed some light on this?

After upgrading our JSS to v9.21 from v8.73 I am seeing smart groups not updating automatically. I seem to have to either open the group up for editing and save again (even if no changes are made) or have the client(s) submit inventory for the Smart Group to pick up the changes and adjust membership accordingly.

This is particularly a problem where I have Smart Groups created based on extension attributes using pop-up menu options. The pop-up menu extension attributes that were migrated from v8.73 were effectively rendered useless and I had to re-write all of them. They now work but with the problem I am mentioning above.

I saw that other people have been having problems with Smart Group updating in other threads but there is no definitive solution that I could find. I am hoping that maybe someone has come across this sort of thing before and managed to solve it??

Thanks

This is still broken for us in 9.6. I just did an upgrade from 9.32 to 9.6 and I still have to manually run smart groups to get them to update.


@andrew & @golbiga

Are you finding that, after doing the edit/save, the smart groups start calculating automatically again, or are you finding that, to get them to recalculate at all, you have to go back in and edit/save every time?

Amanda Wulff
JAMF Software Support


@amanda.wulff][/url][/url,

I am currently in the process of analyzing this. Heres my test.

  1. Create policy, scoped to all machine that lays down a dummy receipt.

    touch /Library/Application Support/JAMF/Receipts/AndrewTest1; jamf recon
  2. Create Two SmartGroups. One that looks for the existence of the Dummy Receipt, and one that looks for machines that do not have the dummy receipt.

In theory, if the Smartgroups are working properly, the sum of both memberships should equal all of my managed clients. As far as I can tell, these numbers are jiving correctly, which leads me to believe that my SmartGroups are working after I went through the "edit/done/done" on each of my 181 Smartgroups.

Furthermore, there is a MYSQL query that can be ran to check what SmartGroups clients are a part of. Might be useful to some folk. Thanks to Ian from JAMF for hooking this up.

select computers.computer_name, computer_groups.computer_group_name, computer_group_memberships.computer_group_id from computers, computer_group_memberships, computer_groups where computers.computer_id=computer_group_memberships.computer_id and computer_groups.computer_group_id=computer_group_memberships.computer_group_id order by computers.computer_name;

Hope that information helps. I have an active ticket open for this issue.


@amanda.wulff I still need to go back in and edit/save every time.


On further inspection, something is still not working correctly. Heres why I think this.

I created a second "AndrewTest" dummy receipt policy, scoped to all machines, and created 2 new sets of SmartGroups.

In theory, the sums of: "Andrew Test 1" & "Andrew Test 1 (Does not have)"
and "Andrew Test 2" & "Andrew Test 2 (Does not have)" should be the same. As you can see from this screenshot. They are not.

https://www.dropbox.com/s/xombvo0g3acp97h/Screenshot%202014-10-16%2013.43.05.png?dl=0


Further example of things sucking.

I have a Smart Group called "All Managed Machines" with 707 clients. I cloned the group, made no modifications, and the "All Managed Machines Clone" group has 711 clients.

More like dumb groups at this point.

Here is a screenshot to show that I am not crazy.

https://www.dropbox.com/s/tj5el2rp1a4y5o1/Screenshot%202014-10-16%2014.06.25.png?dl=0


@golbiga

Just to clarify, did your JSS start on 9.32, or was it, at one point an 8.x JSS that was then upgraded to 9?
I ask because we do have a reopened issue in which, after upgrading to 9.4+ from an 8.x database, Smart Groups fail show the correct counts.

Apologies for all the questions, we’re trying to piece out and narrow factors down to make it faster and hopefully easier to figure out what’s happening on the backend.

I see you’ve got a case open with your TAM as well and he stopped by to chat about this for a bit. He should be contacting you soon to ask about getting some before & after screenshots of the criteria in the groups as well as a debug log from the JSS.

If this is in your development environment, what might be most useful would be to roll it back to 9.32, put the JSS into full debug mode, and go through the upgrade, including checking smart groups (and manually updating one or two with the edit/save), with debug on.

That would give us every little MySQL query going back and forth between the database and the JSS, as well as all of the Tomcat commands/errors/info statements and will hopefully let us see what it’s doing vs. what we know it’s supposed to be doing.

@andrew

Thanks for that additional information! I see you also have an open case with your TAM, and I left notes for him linking to this thread there; I also attached your screenshot to the case.

In your case as well, we may also want to go through rolling back, putting it in full debug mode, and going through the update again, if this is in your development environment, then sending the logs in on the case you’ve got open.

Also, just so I can note it, did your environment start out on the 9 series, or was it an upgrade from 8 at some point?

I’m still doing some testing here in my environment, and I have touched base with the people in QA & development that I’d spoken with previously on this matter to see if there is anything specific they would like to see or have done testing-wise.

If either of you (or anyone else who is having this issue) need the instructions for putting everything into full debug mode, please get in contact with your Technical Account Manager and they can get those sent over.

Thanks!
Amanda Wulff
JAMF Software Support


Ahoi Amanda,

Thank you for your response.

I will send the logs my TAC right now. Yes. At one point this JSS Server was running version 8.


@amanda.wulff I think we just figured out what was going wrong on our end. I'm going to do another test shortly. We went from 8.73 > 9.32, where everything worked. I updated to 9.6 from 9.32 and we were still seeing issues with the Smart Groups. However, I think we just discovered what was causing all of this.

We had an extension attribute that was grabbing the installed version of Adobe Flash. And for some reason the data type for that EA was set to integer and not string. So when we went through our smart groups again under 9.6, the Flash one would fail. When we changed the EA to a string, the smart group would work and the rest of the smart groups updated as well. So I'm guessing JSS versions earlier than 9.4-9.6 had a bug where it would not care if those version numbers were integers or strings. I want to do a few more tests, but I think we've resolved this issue on our end.

Thanks
Allen


@golbiga

Interesting...please let us know what your testing finds.

I see further up, there was some bad criteria causing it for someone else, and I'm wondering if it's less "smart group" related and possibly more, "Something might be wrong with an EA or the criteria of a single group." It would be nice to have an easier way to find which ones were causing the problem (though a debug log might show that) than to have to pick through them all until we find one that looks a bit off.

Thanks!
Amanda Wulff
JAMF Software Support


For what its worth, this issue is occurring on all of my SmartGroups. This issue is also occurring with criteria that is linked to a wide variety of non EA based information. An example of this would be a Smart Group that looks for Machines running an OS "like" 10.9.


@amanda.wulff is referring to my post. The issue was affecting all of our smart groups until we found the one offender. We were able to find out which one was causing the issue by going through the JSS Server logs. It still wasn't easy.


@andrew

It still may be worth taking a look at; if I’m understanding @golbiga and @pearlin ’s posts correctly it sounds like one bad criteria (or criteria referencing a bad EA) in one group is exhibiting the behavior of ALL groups not updating properly until the offending criteria is either corrected or removed.

So, sort of a ‘one bad apple…’ situation.

If I somehow totally misunderstood what they were seeing with the criteria & EA issues, let me know and I’ll edit this post accordingly. :)

Thanks!
Amanda Wulff
JAMF Software Support


Right on. Thanks folks.

I have deleted the one EA that I created between the end of my Smart Groups and the start of my Dumb Groups. I will keep my eyes on things and see if the issue is resolved. Thanks to everyone who chimed in.


This is interesting information, and one we'll need to keep our eye on when we do our upgrade to Casper Suite 9 very soon.
Does JAMF have any ideas on why a single bad piece of criteria from an EA is causing ALL Smart Groups to stop updating automatically? I'm guessing that this isn't really expected behavior?


@amanda.wulff you are correct. There were two EA's that were causing two Smart Groups to fail. Once we updated those EAs everything just seemed to work. I still want to do one more migration test, so I will update more after that is complete.


@mm2270

This one is new information to us as well! At the moment, we're not sure why it's happening.

I did find a very, very, very old defect from the 7 series (that has long since been closed out!) that exhibited the same behavior, and after a bit of digging I found that we have a recently re-opened D-005435 that describes the situation of bad Smart Group criteria causing groups to fail to recalculate.

It's certainly not expected behavior; what I'd expect, if bad criteria or a bad EA were involved, is that we'd see that particular group or set of groups using it fail to update or cause errors. I certainly wouldn't expect to see it cause all Smart Groups to exhibit this behavior.

I suspect nobody else would expect to see that either.

I'd also like to thank everyone in this thread that was testing it out and posting their results, as it significantly sped things up in terms of getting this narrowed down!

For those of you that had open cases, I'm going to pay them a visit to attach them to D-005435. I'll also leave notes on D-005435 linking to this thread in case any additional information is needed.

Thanks again for all your patience, and for helping out in getting this narrowed down!

Amanda Wulff
JAMF Software Support


On JSS 8.73, I see inaccurate count's on some of my SG's. @pearlins report of this occurring in ALL of his v9 SG worries me greatly, as we're close to a JSS upgrade. This is critical functionality, but I'm inclined to believe it's correct on the back end, and only inaccurate within the web GUI.

So I've gotten into the habit of using SG's for reporting purposes. It's real convenient to look at two SG numbers (machines that need xyz, machines that have xyz) and calculate the % deployed.

I just opened and saved about 75 of my 100 SG's and found that all of those whose numbers changed by more than one or two, are using this criteria: Last Contact / less than x days ago / 30


Just to alleviate some apprehension for those of you planing imminent v9 upgrades, we were running v9 without incident for about 6 months until this issue struck. Our case had to do with a once acceptable criteria being deprecated, probably in the 9.4 release (for us, it was "Boot Drive Percentage Full" which was set to "Yes" but apparently was changed to only accept numerical values). This invalid criteria prevented all Smart Groups from calculated, which clearly isn't a desired behavior. So, I don't suspect this to be a v9 issue as much as it is an underlying Smart Group issue having to do with how they react to invalid criteria (ie freaking out instead of skipping).


Hey all,

After having a few conversations with QA, Development, and my Team Lead, we determined that the behavior being seen here is different enough to warrant its own defect.

So, I've opened up D-007887 and moved your cases onto that one.

We're also looking into whether or not that behavior may be related to a specific issue we have open (D-007079) in which Smart Groups stop recalculating on upgrades from 8 to 9. Considering that a couple people here, in their testing, did find bad criteria in a Smart Group, and removing/fixing that criteria seemed to make the behavior stop, it's very possible that the two are closely related.

For newcomers to this thread, if you don't already have a case open with your Technical Account Manager, please get in contact with them ASAP to get a case going; the more information we have on this behavior, the more it helps us determine exactly what's going wrong and how we can get it fixed.
Those of you that already have open cases with your TAM, if you find any new information in your environment, please update them so we can get that noted.

You can get in touch with your TAM either by sending an e-mail to support@jamfsoftware.com (it will go directly to their case queue), by giving us a call, or by using the My Support section of JAMF Nation.

Thanks!
Amanda Wulff
JAMF Software Support


I just did another migration test (8.73 -> 9.6) and this time made sure those 2 smart groups/EAs were configured properly. All Smart Groups are now updating as I would expect them to. For anyone who is running into this issue, test all of your Smart Groups and make sure that none of them error out. If one of them throws an error, then all of them will stop working.


@golbiga

Thanks so much for that update! That was what I was suspecting might happen, and why I do think those two defects are related.

I'll add this as a comment to both of them.

Amanda Wulff
JAMF Software Support


I just upgraded from 9.31 to 9.52 and was seeing the same issue with Smart Groups not updating. I could go in and Edit/Save to force a Smart Group to update, but I would have to do that each time.

I just found this thread, and decided to check my EAs. I noticed a few Data Types set incorrectly (integer instead of string), which I fixed, and sure enough my Smart Groups started updating again.

Thanks everyone in this thread who worked on this!


@wyip

Thanks for that update! I see you have an open case with your Technical Account Manager. I went ahead and got that attached to D-007887 and left a note letting him know what you'd found, as well as a link to to this thread.

Amanda Wulff
JAMF Software Support


To chime in.. I just finished updating from 8.73 -> 9.3.2 -> 9.6 and none of our Smart Groups are updating as well. I'll see if I can follow the process laid down in this thread.

Edit: I had 1 EA that was returning an integer. Changed it to string and will test a little.