[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems using class of class in cfservd
From: |
Brian Youngstrom |
Subject: |
Re: Problems using class of class in cfservd |
Date: |
Fri, 2 Aug 2002 08:21:48 -0700 |
My production hostiplist has one IP address per line, no commas
separating them:
hostiplist = ( 127.0.0.1
1.2.3.4
...
)
Oops, gotta watch the example files a little closer.
I was able to work around the problem by making cfservd contain two
imports: cf.groups and cfservd.main. I've moved all of the directives
from my old cfservd.conf to cfservd.main. This seems to have resolved
the problem.
Phil D'Amore reminded me that:
"when file A imports file B, file A cannot see the variables in File B,
but other files that File A imports can see them. It has to do with the
parse/execution order as files are read in."
Is this not true for class definitions? I ran into a similar problem
back with 1.6 and ended up breaking up my cfengine.conf into a couple
of layers of imports (after reading the note on imports in the Reference
manual).
- Brian
> This works for me. But I notice that "hostiplist" is not properly defined.
> Also,
> I don't think you can use a variable in that iterative way there... My guess
> is
> one of thes things instead.
>
> M
>
> On 1 Aug, Brian Youngstrom wrote:
> > RedHat 7.1
> > Cfengine 2.0.3
> >
> > Problem: cfservd allow: doesn't know how to handle a class defined by
> > a class
> >
> > *** cf.groups:
> > groups:
> > cluster1_master = ( c1_master )
> > cluster1_member = ( c1_member01 c1_member02 )
> >
> > cluster2_master = ( c2_master )
> > cluster2_member = ( c2_member01 c2_member02 )
> >
> > cluster_masters = ( cluster1_master cluster2_master )
> >
> > *** END cf.groups
> >
> > *** cfservd.conf:
> > import:
> > cf.groups
> > control:
> > hostiplist = ( 127.0.0.1 1.2.3.4 1.2.3.5, 1.2.3.6, 1.2.3.7,
> > 1.2.3.8, 1.2.3.9)
> > TrustKeysFrom = ( 1.2.3.0/24 )
> > AllowConnectionsFrom = ( $(hostiplist) )
> > AllowMultipleConnectionsFrom = ( $(hostiplist) )
> > <...>
> >
> > admit:
> > cluster_masters::
> > /path/file1 *.my.domain
> > /path/file2 *.my.domain
> > *** END cfservd.conf
> >
> > This config generates the errors
> > Host authorization/authentication failed or access denied
> > From (host=c1_member01,user=root,ip=1.2.3.4)
> >
> > If I change the line in cfservd.conf to
> > "cluster1_master|cluster2_master::" all is well.
> >
> > Running cfservd with -d2, I can see the classes are recognized and
> > added to the heap:
> > AddClassToHeap(cluster_masters)
> > Appending [cluster_masters]
> >
> > Seems like cfservd should be able to handle the cluster_masters class
> > in the allow list.
> >
> >
> > Thanks for your help
> >
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Work: +47 22453272 Email: address@hidden
> Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
--
Brian Youngstrom
address@hidden
University of Washington
Department of Computer Science & Engineering