[rudder-users] order of application

Michael Gliwinski Michael.Gliwinski at henderson-group.com
Mon Sep 10 11:44:42 CEST 2012


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.

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.

> >>> 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?


-- 
Michael Gliwinski
Henderson Group Information Services
9-11 Hightown Avenue, Newtownabby, BT36 4RT
Phone: 028 9034 3319

**********************************************************************************************
The information in this email is confidential and may be legally privileged.  It is intended solely for the addressee and access to the email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed  in the governing client engagement leter or contract.
If you have received this email in error please notify support at henderson-group.com

John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************



More information about the rudder-users mailing list