Critical bug when using ifvarclass...

Jean-Noël Rivasseau <[email protected]> Wed, 9 Dec 2009 23:10:42 -0800
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <[email protected]>
--===============1949136986==
Content-Type: multipart/alternative; boundary=00032555476653407c047a5a8127

--00032555476653407c047a5a8127
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

The following promises.cf file:

body common control
{
    bundlesequence =3D> {"configurePhase"};
}

bundle agent configurePhase
{
        methods:
                "any" usebundle =3D> configure1(), ifvarclass =3D>
fileexists("/etc/group");
                "any" usebundle =3D> configure2(), ifvarclass =3D>
fileexists("/etc/fstab");
}

bundle agent configure1()
{
        reports:
        linux::
                "Hi World";

}

bundle agent configure2()
{
        reports:
        linux::
                "Hello World";
}

does not produce the expected result. Normally as both /etc/group and
/etc/fstab exist on the system, both configure1 and configure2 should be
executed. For some reason only configure1 is. The file argument on the
second ifvarclass does not matter (always fail). If I remove the ifvarclass
or use something else than fileexists though, it will work ok.

Can you please acknowledge this bug, fix it and maybe provide a workaround
until the next version ? This bug is quite critical I would say, I am
running 3.0.2.

--=20
Jean-No=C3=ABl Rivasseau

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

The following <a href=3D"http://promises.cf">promises.cf</a> file:<br><br>b=
ody common control<br>{<br>=C2=A0=C2=A0=C2=A0 bundlesequence =3D&gt; {&quot=
;configurePhase&quot;};<br>}<br><br>bundle agent configurePhase<br>{<br>=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 methods:<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 &quot;any&quot; usebundle =3D&gt; configure1(), ifvarclass =
=3D&gt; fileexists(&quot;/etc/group&quot;);<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &quot;any&q=
uot; usebundle =3D&gt; configure2(), ifvarclass =3D&gt; fileexists(&quot;/e=
tc/fstab&quot;);<br>
}<br><br>bundle agent configure1()<br>{<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 reports:<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 linux::=
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 &quot;Hi World&quot;;<br><br>}<br><br>bundle agent co=
nfigure2()<br>{<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 reports:<br>=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 linux::<br>=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &quot=
;Hello World&quot;;<br>
}<br><br clear=3D"all">does not produce the expected result. Normally as bo=
th /etc/group and /etc/fstab exist on the system, both configure1 and confi=
gure2 should be executed. For some reason only configure1 is. The file argu=
ment on the second ifvarclass does not matter (always fail). If I remove th=
e ifvarclass or use something else than fileexists though, it will work ok.=
<br>
<br>Can you please acknowledge this bug, fix it and maybe provide a workaro=
und until the next version ? This bug is quite critical I would say, I am r=
unning 3.0.2.<br><br>-- <br>Jean-No=C3=ABl Rivasseau<br><br>

--00032555476653407c047a5a8127--

--===============1949136986==
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

--===============1949136986==--