--hosts=... semantics ?

Will Partain <[email protected]>
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
Harlan bumped into another thing that has worried me a bit,
so let me ask for your thoughts.

When you do, say,

    ark package install foo--1.2.3

there is an implicit --hosts=ALL argument.  (This is our
much-loved "site-at-a-time" thinking: by default, you always
do something for the whole site.)

Now, when you're trying things out, experimenting, etc., you
often want to use a limited set of hosts; for example,

    ark package reveal --hosts=. password-stuff

just tries it on the host you're on.  This has the nice
property that you will trash just one host, not your whole
site :-)

The problem arises when a <constraint> forces an action that
must take place on some other host.  Let's say 'reveal' for
host foo depends on a 'compile' taking place on host bar.

If you've specified --hosts=foo, should the compile take
place on bar, or should it die?  (Now, it dies: you've got
to specify --hosts=foo,bar.)

The problem with

   ark package reveal --hosts=foo,bar blah-package

is that it will do the 'reveal' on bar as well, which wasn't
the idea.

I am inclined to have *two* options --hosts=... and
--constraint-hosts=...  --hosts=... would specify the hosts
where the specified action ('reveal' in the example just
past...) is to happen; --constraint-hosts=... would be other
hosts that could be used (only) to satisfy constraints.

Anyone with any better ideas?

Will
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.