help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

special feature or dark area?? hostname's hyphen character brings incons


From: Guolin Cheng
Subject: special feature or dark area?? hostname's hyphen character brings inconsistency in cfengine
Date: Wed, 1 Sep 2004 18:59:01 -0700

Hi,

  We got a problem to implement cfengine to hosts with hyphen character(s) in their names like ops-test2. According to our tests, we can use either ops-test2 or ops_test2 in group|class definitions, or take advantage of group definitions in NIS netgroup map in cf.groups file.  But if we directly use hostnames to work as class names in cf.main, we find that ops-test2 class will fails, while ops_test2 class works fine.

  If this a special feature? Or just a dark area, bug needs to be fixed soon?  My cfengine is 2.1.7p1 on Linux, we have the same issue for older versions as well. Thanks.

 The following are related statements in my cf.groups and cf.main configurations files, both are included in cfagent.conf.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 Cf.groups:

 .

  ## testing hyphen characters in hostnames,

   opsTest2Group1 = ( ops-test2 )

   opsTest2Group2 = ( ops_test2 )

 .


Cf.main:

 

 .

shellcommands:

  ops-test2::

    "/bin/echo ops-test2, If this line is displayed, then host names work with hyphen unchanged"

  ops_test2::

    "/bin/echo ops_test2, If this line is displayed, then host names work with hyphen replaced with underbar."

  opsTest2Group1::

    "/bin/echo opsTest2Group1, If this line is displayed, then group definitions can have host names with hyphen."

  opsTest2Group2::

"/bin/echo opsTest2Group2, If this line is displayed, then group definitions can have host names with hyphen replaced with underbar."

..

The testing results are:

Case 1: ( with the above configurations )

[root@ops-test2 inputs]# cfagent -q

cf:cfengine::/var/lib/cfengine2/inputs/cf.main:1095: scripts or commands must have absolute path names

cfengine: concerns: ops-test2::

[root@ops-test2 inputs]#

Case 2: comment out the ops-test2:: stanza from cf.main file only, then the results are:

[root@ops-test2 inputs]# cfagent -q

cfengine:ops-test2:/bin/echo ops_t: ops_test2, If this line is displayed, then host names work with hyphen replaced with underbar.

cfengine:ops-test2:/bin/echo opsTe: opsTest2Group1, If this line is displayed, then group definitions can have host names with hyphen.

cfengine:ops-test2:/bin/echo opsTe: opsTest2Group2, If this line is displayed, then group definitions can have host names with hyphen replaced with underbar.

Any ideas and suggestions? Thanks a lot.

--Guolin Cheng





reply via email to

[Prev in Thread] Current Thread [Next in Thread]