Friday, December 07, 2007

cfengine hassle

We've had a strange problem with cfengine recently - it wasn't creating the symlink /usr/java/current -> /usr/java/javer_version_whatever. The log file complained of:

Error while trying to link /usr/java/current -> /usr/java/current

which is most odd as I was trying to link it to $(javaver) which evaluates to jdk1.5.0_12.

After much faffing about it turns out to be a bug in cfengine - it tries to create a circular link on the 1st item in the list and works fine for the 2nd one. as a result our cfengine config is now:

links:
java::
# BUG IN CFENGINE - it will fail the 1st line but do the 2nd OK
/usr/java/current_ver ->! /usr/java/$(javaver) type=relative
/usr/java/current ->! /usr/java/$(javaver) type=relative


which is ugly, hacky and just Wrong

2 comments:

Ewan said...

That's odd; I'm doing almost exactly the same thing and it works for me using the Fedora EPEL package of cfengine-2.1.22. Which cfengine are you on?

Andrew Elwell said...

the dag 2.1.22 - Whats odd is that it always *used* to seem to work. It seems happy enough with the other link: sections too.