Samuel, it is Yum's behaviour, AFAIK. To be completely sure, you can try running yum manually and compare results.
2010/11/5 Samuel Plum <sp...@reachlocal.com>: > Hi, > I'm having an issue with a package promise in cf3, was hoping someone > would have an answer. > Basically what we are trying to do is set up a yum repository with > multiple versions of a given package in such a way that we can have cfengine > pin certain versions for certain types of systems (one version of apache for > our main web servers, a different one for drupal installations or one version > for testing while we have an older one in production that sort of thing). > What we've found, though, is that while yum is capable of installing a > specific package version, the package promise in cfengine 3 completely balks > at it. We've tried two test cases so far with poor results. > > This is pretty much the code we are using: > > packages: > x86_64:: > "testpackage" > package_policy => "add", > package_method => yum, > package_select => "==", > package_architectures => { "x86_64" }, > package_version => "2.2.15"; > } > > In the first test testpackage-2.2.15 does not exist in the repo, but > testpackage-2.2.14-6 does. Since we specified that we wanted 2.2.15 we > expected it to be unable to fulfill the promise and just report back the > error. Instead it went ahead and installed 2.2.14-6, and claimed 100% promises > kept. > > In the second test we had the equivalent of having 2.2.15 and 2.2.16 > in > the repository. This time around the package we requested does exist, but is > not the newest version. In that instance it still claims that 2.2.15 does not > exist, and installs the newer version. > > In the first case we end up with the wrong package, potentially with > no > warning that our configuration is incorrect, in the second we're installing a > newer package on systems that shouldn't get it, which could have disastrous > results depending on the package. > > I'm not even entirely sure at this point whether the problem lies with > yum, if it's a cfengine bug, or if we're missing something in the rules. Any > advice, thoughts, help, etc. would be highly appreciated, especially since > this looks like it could be a deal breaker for getting cfengine 3 up in our > environment. > > Thanks in advance, > Sam Plum > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine > -- SY, Seva Gluschenko. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine