RE: Bug: dependency order in types file not honored
"Stephen Schaefer" <[email protected]>
| Newsgroups | gmane.comp.sysutils.isconf.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes, this is version 3. I am guilty of rewriting history: my first
attempt to create an NIS_master did not need to set the domain, because
I was moving the master role for the domain in which the machine had
already been jumpstarted. In my second iteration, I was invoking
NIS_master for a domain that didn't exist yet, so the domain needed to
be set before it ran. I hadn't yet understood the timestamping.
The solution for me is to forswear the sin of rewriting history: instead
of using NIS_master, I need to use NIS_master_rev_00_01. If I change
the composition of a type (including adding or reordering targets), I
need to create a new revision of the type. Then all the targets for the
new revision get their own timestamp, and things do operate as I expect.
Thank you for your explanation: it makes clear the error of my ways.
- Stephen
-----Original Message-----
From: Luke A. Kanies [mailto:[email protected]]
Sent: Tuesday, May 13, 2003 11:38 AM
To: Stephen Schaefer
Cc: [email protected]
Subject: Re: [Isconf-devel] Bug: dependency order in types file not
honored
On Sat, 3 May 2003, Stephen Schaefer wrote:
[elided]
Was this version 2 or 3? If version 3, then it's entirely dependent on
the timestamps of the stanzas associated with the host types, not on the
order of the host types in the types file. In other words, if your
config looks like this:
# types file
type1:
dostuff 001
otherstuff 003
type2:
morestuff 002
yaystuff 004
# hosts file
host1: type2 type1
---
...then no matter what order you list type1 and type2 in, you will
always get the stanzas executed in order by timestamp (dostuff, then
morestuff, then otherstuff, then yaystuff). Is this a bug? Yeah, kind
of.
If you leave out that timestamping, then everything works fine when you
build a host the first time; you can expand type1 and type2 as much as
you want, and the stanzas always get executed in the correct order. But
when you go to rebuild that host, then all of the stanzas for the first
listed type get executed, then all of the stanzas for the second listed
type; this is guaranteed to break ordering if you modify either of those
types once the host is installed.
Imagine installing using the above config, then adding another stanza to
the type2 host type, and then building another host just like host1. If
you use timestamps, then that fifth stanza gets executed last based on
timestamps, but if you leave the timestamps out, then it gets executed
third, before all of the type1 stanzas.
Neither one is what you expect, and I think both are broken.
Unfortunately, I think it's somewhat endemic to ISconf, and you just
have to find the compromise that suits you best.
OTOH, if this is version 2, then yeah, that's definitely broken. :)
Luke
--
: We are looking at a newspaper clipping labelled "Huffington
: Herald 11/12/96" in which "Huffington" states, in part:
: "The inhabitants of Tiera del Fuego ... have a single word
: that means 'to look at each other hoping that either will offer to do
: something that both parties desire but are unwilling to do.'"
: Does anyone know that word?
Management?
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com