We are in the process of migrating from CFE2 to CFE3 and I'm trying to figure out an issue that has to do with package management.
BUILD: cfengine-community-3.6.2-1
OS: RHEL5_U11
ARCH: x86_64
What we observe is on every run of cf-agent, a list of packages is always requested to be installed. When the package management gets to it (yum in this case)
it replies back with "It's already installed" and moves on.
This list of problem packages are typically ones that are not named 'properly'. And recently we ran into the issue with the new jdk from Oracle, but also have seen it with libreoffice as well as a few others.
I think we have tracked down the issue to the software_packages.csv cache file that is created by cfengine (/var/cfengine/state/software_packages.csv).
For these problem packages, the entry which is supposed to be something like {name},{version},{arch},{packagemanager?}, it seems to be parsing the entries incorrectly.
For example oracle has built their latest jdk with the following:
name: jdk1.8.0_25
version: 1.8.0_25
and the software_packages.csv is caching the following (spaces added for emphasis):
jdk1, 1.8.0_25-fcs, 8.0_25.x86_64, rpm
Now, because of the naming scheme Oracle decided to use, we needed to fix the name in the package method to: "jdk1.8.0_25", which is how yum sees it.
And here is where the problem is.
When package promise runs through and tries to compare the requested package name "jdk1.8.0_25" against the software_package.csv list, no match is found because
jdk1 != jdk1.8.0_25, therefore yum tries to install the package which is already installed.
The libreoffice example is worse only because there are multiple packages all called things like:
libreoffice4.3-base-4.3.1.2-2
but software_packages caches the name as just 'libreoffice4' (spaces added for emphasis):
libreoffice4, 4.3.1.2-2, 3-base.x86_64, rpm
I assume the parsing is trying to grab anything after the '.' and setting that as the arch.
This feels like a bug, but with all of the discussions about nonstandard naming schemes, I don't know if it was addressed earlier or if anyone has suggestions about a workaround.
Thanks,
Dave...