[rudder-users] order of application

Nicolas Charles nicolas.charles at normation.com
Mon Sep 10 11:44:59 CEST 2012


On 10/09/2012 11:44, Michael Gliwinski wrote:
> On Tuesday 04 Sep 2012 08:23:49 Nicolas Charles wrote:
>> On 03/09/2012 11:25, Michael Gliwinski wrote:
>>> On Monday 03 Sep 2012 10:16:04 Nicolas Charles wrote:
>>>> On 03/09/2012 10:06, Michael Gliwinski wrote:
>>>>> A quick question.  Is there a way to affect the order in which
>>>>> directives are applied?  Or the order in generated bundlesequence?
>>>> So far, there is no way to affect the order of application of
>>>> directives. However, it is something we'd like to implement in Rudder.
>>>> We are wondering how it should (could?) be defined in the WebUI, and are
>>>> open to suggestions !
>>> I guess the most useful thing would be to have it as part of rule
>>> management to allow re-ordering individual directives (e.g. a list with
>>> up/down buttons, drag&   drop, etc.), however AFAICS this may not be so
>>> easy to do.
>> That sounds like a nice idea ! Thanks
>> CFEngine 3.4 introduces "depends_on" that now is used to manage
>> dependencies. It would make sense to benefit from it
> Hmm, that would be even more useful than dealing with order, as really most of
> the time the actual order doesn't matter as long as we could say that one
> thing needs to be completed before another can be attempted.
>
> The problem is, according to CF3 reference "depends_on" is only for
> documentation and is only used for knowledge management in commercial versions
> of CFEngine.
On CFEngine 3.4, it's not longer for entreprise version only (the commit 
has been push on the trunk a couple of weeks ago), and no longer for 
documentation purpose
>
> However, this may be a good general idea.  Instead of exposing ordering, you
> could allow declaring dependencies between directives.  Then when CFEngine
> policies are generated, re-order them internally according to dependencies.
Yeah, that could be something like that.

>
>>>>> The specific issue I'm having now is that I have an RPM package
>>>>> installation directive and a checkGenericFileContent directive for
>>>>> updating a configuration file installed by the package.  The problem is
>>>>> that checkGenericFileContent is before rpmPackageInstallation in the
>>>>> bundlesequence, so on first installation the config file is created by
>>>>> CFe before the package is installed, which causes RPM to install the
>>>>> config file as an .rpmnew file.
>>> E.g. for this case, changing bundlesequence to do package installation
>>> before manageFilesAndFolders and check_generic_file_content would work
>>> fine, the downside is it introduces a problem when
>>> checkGenericFileContent is used to modify configuration of the package
>>> manager itself.
>>>
>>> Do you think this is a rather common case?
>> I guess generalizing this order might have some issue, as users might
>> not expect it.
>> But it is a rather common use case to install a package and then edit
>> files for the install packages. Maybe having a "manage packages and then
>> manage files" technique would be of some use ?
> Possibly, but since it would be duplicating functionality of two different
> techniques (or more, for each type of package manager?) and would potentially
> be addressed by allowing user to affect the order of things as above, I would
> put this as a very low priority :)
>
> I can file a general "ideas" issue in redmine for this and the
> ordering/dependencies ideas if that would be useful?
That would be really helpful !

And (teaser), we'll be soon starting a new dev cycle, and we'll ask the 
community which features they'd really like to have.

Thank you very much Michael

Nicolas


More information about the rudder-users mailing list