Bug when using a string variable with the same value as a perms body promise name

Jean-Noël Rivasseau <[email protected]> Thu, 4 Feb 2010 17:27:06 -0800
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <[email protected]>
--===============1213806124==
Content-Type: multipart/alternative; boundary=001517448ad8825a5c047ed05991

--001517448ad8825a5c047ed05991
Content-Type: text/plain; charset=UTF-8

Hi, I am using 3.0.3 here.

If I use:

    vars:
        "backupHost" string =>"backup";

when I have the following defined:

body perms backup
{
    owners => {"backup"};
    groups => {"backup"};
    mode => "go-rwx";
}

cf-agent will error out during the parsing phase will the following error:

Body type mismatch for body reference "backup" in promise at line 46 of
/var/cfengine/inputs/backup.cf

My current workaround is:

    vars:
        "backupHost" string => execresult("/bin/echo backup", "noshell");

but obviously it's ugly. Can you fix this?

Thanks
Jean-Noel

PS: When will the bugzilla / Mantis or whatever will be ready?

--001517448ad8825a5c047ed05991
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi, I am using 3.0.3 here.<br><br>If I use:<br><br>=C2=A0=C2=A0=C2=A0 vars:=
<br>=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 &quot;backupHost&quot; string =3D=
&gt;&quot;backup&quot;;<br><br>when I have the following defined:<br><br>bo=
dy perms backup<br>{<br>=C2=A0=C2=A0=C2=A0 owners =3D&gt; {&quot;backup&quo=
t;};<br>
=C2=A0=C2=A0=C2=A0 groups =3D&gt; {&quot;backup&quot;};<br>=C2=A0=C2=A0=C2=
=A0 mode =3D&gt; &quot;go-rwx&quot;;<br>}<br><br>cf-agent will error out du=
ring the parsing phase will the following error:<br><br>Body type mismatch =
for body reference &quot;backup&quot; in promise at line 46 of /var/cfengin=
e/inputs/<a href=3D"http://backup.cf">backup.cf</a><br>
<br>My current workaround is:<br><br>=C2=A0=C2=A0=C2=A0 vars:<br>=C2=A0=C2=
=A0=C2=A0 =C2=A0=C2=A0=C2=A0 &quot;backupHost&quot; string =3D&gt; execresu=
lt(&quot;/bin/echo backup&quot;, &quot;noshell&quot;);<br><br>but obviously=
 it&#39;s ugly. Can you fix this?<br><br>Thanks<br>
Jean-Noel<br><br>PS: When will the bugzilla / Mantis or whatever will be re=
ady?<br>

--001517448ad8825a5c047ed05991--

--===============1213806124==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

--===============1213806124==--