Systems Management Question

K1000 7.0 Agent - Several Bugs associated with Custom Inventory Rules.

01/30/2017 1642 views
I have been slowly working with support to verify some serious bugs that have heavily impacted my environment. If not properly logging or reporting on Managed Installation or Custom Inventory rules you might be impacted and not realize it. I heavily log everything to a central dashboard and I likely wouldn't have noticed this for a quite a while if not for that.

The further I dig into this, the more problems I encounter. I have been able to walk support through reproducing a few of the issues in their lab, but some are so odd and random I have not been able to determine a pattern. However, I am still in the dark on any updates on this from support. After getting them to reproduce it they pretty much stopped working with me or updating me on the issue after that.

I am hoping I can outline some of the major issues I've seen and see if I can get closer to narrowing some of these issues down. I understand that I use Kace a little differently than most, and because of that many might not encounter the issues I have, but figured I'd give it a shot.

ShellCommandTextReturn - There are some major bugs with this CI rule. I have a ton of rules that have worked for years, but now instead of returning false, blank output is now returning true in some cases. Here is an example of broken and working log output.

    ShellCommandTextReturn(powershell.exe -ExecutionPolicy Bypass -Command "(Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.displayname -like '*TestName*' -and $_.versionmajor -ge '5'}).DisplayName")

    [2017-01-30.10:00:24][KDeploy:CDeployController::Execu] [OUT] TestName [OUT]
    [18908] statement result: ;18908:VGVzdE5hbWU=%TEXT, TRUE

    ShellCommandTextReturn(powershell.exe -ExecutionPolicy Bypass -NoProfile -Command "Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.displayname -like '*TestName*' -and $_.versionmajor -ge '5'} | Select-Object -ExpandProperty displayname)

    [2017-01-13.11:36:28][KDeploy:CDeployController::Execu] [OUT]                                                                                 [OUT]
    [18908] statement result: ;18908:%TEXT, TRUE

In the working example you can see where it returns output and it gives the Base64 result, but in the Broken example it doesn't actually return anything and the Base64 portion is empty. At first I thought this might be related to improper handling of line endings or maybe encoding, but after running tests I am not so sure anymore. I can have a broken CI rule and slightly alter the command's syntax and get it working again. The commands are functionally the same and no difference other than personal preference in how it was written. This was just an easy example to show how just a change in syntax impacts it. I also have this issue when working with cmd.exe and built in windows executables. I was even getting blank commands that only contained a comment or turned echo off, that returned true.

Registry Value Rules - I am still working through these and hoping others have seen similar. I am getting odd and inconsistent values here, especially when dealing with 64\32 bit Registry. I don't know if they added some undocumented 64 bit redirection handling or what is going on. I can have a Registry value that only lives in the 64 or 32 registry, but returns true for both HKXX and HKXX64.  

When I was debugging this I saw something very odd. I had a rule that was "RegistryValueEquals 32bit key OR RegistryValueEquals 64bit key", and it was returning always false even if the key was in both places. As I am debugging it and running the inventory over and over, after the 5-6 time, I stopped and added 2 new rules, RegistryValueReturn 32bit key and RegistryValueReturn 64 key. The next inventory made absolutely no sense, because now all three were returning true and the Returns both returned the value present only in a single location.

Either it was a huge coincidence, or adding the 2 other rules in some way impacted this separate rule.

Others - There are some other bugs with Managed Installs, but I have not looked much into them yet because I wasn't sure if they were being caused by the other issues or not. Several are related to the new Software Catalog Managed Installations and them just not working properly. 

I will just leave it at these. There are some other areas I feel have some issues but I haven't been able to look into them yet. Working on getting the worst ones ironed out first.

1 Comment   [ + ] Show comment


  • How goes your custom inventory rules in regards to registry values? I thought that I had one working but now it is not. I do not have the mix bit environment like you do. Just 64bit Win7 Ent.
    • They created a new defect k1-19239 for broken custom inventory rules, but they didn't really give me a whole lot more than that yet. No ETA on a fix. I am unsure exactly which issues this exactly applies to, but I do know it covers custom inventory rules and shellcommandtextresturn, but they didn't mention what all this impacted and in what specific ways.
      • Ok, would you post an update to this when/if you get a fix? Thanks

Be the first to answer this question

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ