[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is this quirky for a simple copy, editfiles operation?
From: |
Mark Burgess |
Subject: |
Re: Is this quirky for a simple copy, editfiles operation? |
Date: |
Thu, 12 May 2005 21:35:56 +0200 |
On Thu, 2005-05-12 at 14:29 -0500, Brendan Strejcek wrote:
> Mark Burgess wrote:
>
> > On Thu, 2005-05-12 at 14:06 -0500, Brendan Strejcek wrote:
> > > Roy MARANTZ wrote:
> > >
> > > > If the action list is eliminated, IMHO, there needs to be some
> > > > mechanism to specify the ordering of actions. i.e. I need to
> > > > run shellcommands (and others) twice in order to make sure that
> > > > perconditions for certain actions are met. To be concrete, I need to
> > > > blow up a tar ball before I can override some file in it.
> > >
> > > Wouldn't it be cool if you could just do:
> > >
> > > shellcommands:
> > > did_some_command::
> > > "/command/that/must/come/after some/command"
> > > any::
> > > "/some/command"
> > > define=did_some_command
> > >
> > > and have cfagent figure out the rest? There is no complexity or
> > > ambiguity for the admin to sort out, and no imperative illusion.
> >
> >
> > You already can do this, if you observe AddInstallable.
>
> But not for more complex dependency/ordering relationships, right?
>
> It seems to me like there are cases where this breaks down, as I tried
> to outline in my previous long message.
>
> In fact, here is a simple case where the current method breaks down,
> even with no cross-action dependencies.
>
> Here is a one level case where it works:
>
> $ cat test_one_level
> #!/usr/sbin/cfagent -qKf
>
> control:
> AddInstallable = ( did_first )
> actionsequence = ( shellcommands )
>
> shellcommands:
> did_first::
> "/bin/echo second"
> any::
> "/bin/echo first"
> define=did_first
>
> $ ./test_one_level
> cfengine::/bin/echo first: first
> cfengine::/bin/echo secon: second
>
> But it breaks with two levels:
>
> $ cat test_two_level
> #!/usr/sbin/cfagent -qKf
>
> control:
> AddInstallable = ( did_first did_second )
> actionsequence = ( shellcommands )
>
> shellcommands:
> did_second::
> "/bin/echo third"
> did_first::
> "/bin/echo second"
> define=did_second
> any::
> "/bin/echo first"
> define=did_first
>
> $ ./test_two_level
> cfengine::/bin/echo first: first
> cfengine::/bin/echo secon: second
> $
You're right, it will not handle long chain dependencies, but then you
should not make such things! :-) In version 3 I hope that all of this
will be handled more elegantly. Now, if only I could find that time...
Mark
- Re: Is this quirky for a simple copy, editfiles operation?, (continued)
- Re: Is this quirky for a simple copy, editfiles operation?, Jamie Wilkinson, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Mark Burgess, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Ed Brown, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Ed Brown, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/12
- Message not available
- Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Mark Burgess, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?,
Mark Burgess <=
- Re: Is this quirky for a simple copy, editfiles operation?, Ed Brown, 2005/05/12
- Re: Is this quirky for a simple copy, editfiles operation?, Mark Burgess, 2005/05/13
- Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/13
- Re: Is this quirky for a simple copy, editfiles operation?, Mark Burgess, 2005/05/13
- Re: Is this quirky for a simple copy, editfiles operation?, Tim Nelson, 2005/05/12
Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/10
Re: Is this quirky for a simple copy, editfiles operation?, Adams, Russell L., 2005/05/10
Re: Is this quirky for a simple copy, editfiles operation?, Brendan Strejcek, 2005/05/10
RE: Is this quirky for a simple copy, editfiles operation?, Nielsen, Steve, 2005/05/12