Linux upgrade Carbon Black package

I believe I am losing my mind. I currently have Carbon Black installed on several of my Oracle Linux/Red Hat 7.7 servers. The current version is cbsensor-v6.1.7.10053-1. I have a shell script that pulls down the tar.gz file from a webserver and then extracts and runs the installation script. I used this to install originally. Everything is working fine but I cannot get BigFix to identify the servers that need the upgrade.

When I compare a server that has the newer package to a server that as the older version the qna tool returns the same value.

Updated server:
Q: not exists package “cbsensor” whose (version of it >= “6.2.1.10119-1”) of rpm
A: False
T: 913243

Q: exists package “cbsensor” whose (version of it >= “6.2.1.10119-1”) of rpm
A: True
T: 313

Q: not exists package “cbsensor” whose (version of it = “6.2.1.10119-1”) of rpm
A: True
T: 480

Q: not exists package “cbsensor” whose (version of it <= “6.2.1.10119-1”) of rpm
A: True
T: 2327

Q: exists package “cbsensor” whose (version of it < “6.2.1.10119-1”) of rpm
A: False
T: 329

Old server that needs updated:
Q: exists package “cbsensor” whose (version of it >= “6.2.1.10119-1”) of rpm
A: True
T: 952556

Q: not exists package “cbsensor” whose (version of it = “6.2.1.10119-1”) of rpm
A: True
T: 816

Q: not exists package “cbsensor” whose (version of it <= “6.2.1.10119-1”) of rpm
A: True
T: 1873

Q: exists package “cbsensor” whose (version of it < “6.2.1.10119-1”) of rpm
A: False
T: 369

I am obviously using incorrect relevance. What should I look for or use to search my Linux servers that have version v6.1.7.10053-1 installed so I can run the fixlet to install version 6.2.1.10119-1.

I guess BigFix needs the ‘v’ in the version. I have something working after looking through various other posts and topics.

rpm version record of (package “cbsensor” of rpm) >= “v6.2.1.10119-1”

Try:

(exists package “cbsensor” whose (rpm version record of it < rpm package version record “6.2.1.10119-1” AND architecture of it = “x86_64”) of it AND (not exists package “cbsensor” whose (rpm version record of it >= rpm package version record “6.2.1.10119-1” AND architecture of it = “x86_64”) of it)) of rpm

2 Likes

I can’t check at the moment, but I think you’ll need to use the “rpm package version record” type rather than the “version” type for comparison.

“version” expects a dotted form of numbers only, up to 4 numbers with dots between. It does a “best guess” at converting a string to a version type. My guess is that when you say

version of it < “6.2.1.10119-1”

the client tries to convert “6.2.1.11019-1” to a version type. But the “11019-1” isn’t just a number, it has the hyphen in there, so it discards that portion leaving it with a version of “6.2.1”.

You can test that in the debugger by asking

Q: version “6.2.1.10119-1”

And see what the result looks like.

2 Likes