Re: set_variable_values_ini() with 3.18.2

"'[email protected]' via help-cfengine" <[email protected]> Mon, 8 Sep 2025 08:49:40 -0700 (PDT)
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
------=_Part_301838_2073446441.1757346580311
Content-Type: multipart/alternative; 
	boundary="----=_Part_301839_2130155413.1757346580311"

------=_Part_301839_2130155413.1757346580311
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

The tickets show no activity. At this point it will have to rise to the top=
=20
of our backlog or have a community member step up to make a fix.

As Vratistlav mentioned a while ago in this thread:

> these errors are a result of a change [1] in the edit_line implementation=
=20
to better inform users
what is happening (the referenced private ticket has a title "Make sure all=
=20
files and packages
promises inform about all changes they make"). But since you are using the=
=20
'set_variable_values_ini'
edit_line bundle, there's no way for you to fix this in your policy. It is=
=20
actually a bug in the
'set_variable_values_ini' bundle.

[1]=20
https://github.com/cfengine/core/commit/9f114044d2530c20797d0c1cac51d2892b4=
76b5f

So it would seem the most likely place to fix is in masterfiles in=20
lib/files.cf: https://github.com/cfengine/masterfiles/blob/master/lib/files=
.cf#L421

The ticket is open here: https://northerntech.atlassian.net/browse/CFE-4459

Other related bugs are
- https://northerntech.atlassian.net/browse/CFE-2663 - Problems selecting=
=20
INI regions
- https://northerntech.atlassian.net/browse/CFE-3988 - edit_line doesn't=20
insert after the last matched line when selecting a region where the end=20
delimiter is included

Sorry it hasn't been resolved yet. I will check if we can bump it up in=20
priority.

-Craig
On Monday, September 8, 2025 at 10:11:16=E2=80=AFAM UTC-5 Greg Matthews wro=
te:

> can we at least stop it polluting our logs?
>
> On Tuesday, 8 April 2025 at 16:26:46 UTC+1 [email protected] wrote:
>
>> No, I don't see any changes to either ticket recently.
>>
>> On Thursday, December 5, 2024 at 1:52:40=E2=80=AFPM UTC-6=20
>> [email protected] wrote:
>>
>>>
>>> Thanks, Nick.
>>>
>>> While I don't seem to have access to:
>>>     https://northerntech.atlassian.net/browse/ENT-12503
>>>
>>> I can successfully see:
>>>     https://northerntech.atlassian.net/browse/CFE-4459
>>>
>>> So the latter should be fine.
>>>
>>> -- David Lee
>>>
>>>
>>> On Thursday, 5 December 2024 at 18:08:26 UTC [email protected]=20
>>> wrote:
>>>
>>>> I took that snippet and created a ticket.=20
>>>> https://northerntech.atlassian.net/browse/ENT-12503
>>>>
>>>> On Thursday, December 5, 2024 at 8:34:55=E2=80=AFAM UTC-6=20
>>>> [email protected] wrote:
>>>>
>>>>> Any news on this, please?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> -- David Lee
>>>>> -- Diamond Light Source
>>>>>
>>>>> On Friday, 15 November 2024 at 15:48:03 UTC [email protected]=
k=20
>>>>> wrote:
>>>>>
>>>>>> I had lost track of the fact you still needed me to provide a test=
=20
>>>>>> case.
>>>>>>
>>>>>> Here it is.  It is extracted from a real part of our policy, setting=
=20
>>>>>> a key=3Dvalue in RH8 "/etc/dnf/automatic.conf" (I've slightly tweake=
d it to=20
>>>>>> make it standalone and using a safe target file).
>>>>>>
>>>>>> Run it at least twice (or as often as you like).  You'll see that=20
>>>>>> although the target file successfully converges, CFE persists in (fa=
lsely)=20
>>>>>> reporting errors.
>>>>>>
>>>>>> Please could you take it forward from this?
>>>>>>
>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>>>>> #
>>>>>> # Demonstrate CFEngine "edit_line" bug:
>>>>>> #
>>>>>>
>>>>>> body file control
>>>>>> {=20
>>>>>>       inputs =3D> { "/var/cfengine/inputs/lib/files.cf" };
>>>>>> }
>>>>>>
>>>>>> bundle agent __main__
>>>>>> {    =20
>>>>>>   vars:
>>>>>>     any::
>>>>>>       #"fname" string =3D> "/etc/dnf/automatic.conf";
>>>>>>       "fname" string =3D> "/tmp/automatic.conf";
>>>>>>
>>>>>>       "tab[commands][apply_updates]" string =3D> "no";
>>>>>>
>>>>>>   files:
>>>>>>     any::
>>>>>>       "$(fname)"
>>>>>>         edit_line =3D> set_variable_values_ini("$(this.bundle).tab",=
=20
>>>>>> "commands");
>>>>>>
>>>>>> }
>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> -- David Lee
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, 19 August 2024 at 22:01:33 UTC+1 [email protected]=
=20
>>>>>> wrote:
>>>>>>
>>>>>> "[email protected]" <[email protected]> writes:=20
>>>>>>
>>>>>> > Is there any progress on this, please? It is somewhat of an=20
>>>>>> irritant to us and our logging!=20
>>>>>> >=20
>>>>>> > Thanks.=20
>>>>>>
>>>>>> Hi David=20
>>>>>>
>>>>>>
>>>>>> I didn't see a ticket in this thread to check status on, probably=20
>>>>>> no work has been done.=20
>>>>>>
>>>>>> PRs are great if you know how to fix, but at least having a=20
>>>>>> standalone=20
>>>>>> policy file that reproduces the issue is necessary.=20
>>>>>>
>>>>>> If you can make sure there is a ticket that at least contains a=20
>>>>>> reproducer then there is better chance of something happening.=20
>>>>>>
>>>>>>
>>>>>> --=20
>>>>>> Nick Anderson | Doer of Things | (+1) 785-550-1767 |=20
>>>>>> https://northern.tech=20
>>>>>>
>>>>>>

--=20
You received this message because you are subscribed to the Google Groups "=
help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/help-cfengi=
ne/dc108074-87b5-4ff6-ba04-7069c02f4da0n%40googlegroups.com.

------=_Part_301839_2130155413.1757346580311
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div>The tickets show no activity. At this point it will have to rise to th=
e top of our backlog or have a community member step up to make a fix.</div=
><div><br /></div>As Vratistlav mentioned a while ago in this thread:<div><=
br /></div><div>&gt; these errors are a result of a change [1] in the edit_=
line implementation to better inform users<br />what is happening (the refe=
renced private ticket has a title "Make sure all files and packages<br />pr=
omises inform about all changes they make"). But since you are using the 's=
et_variable_values_ini'<br />edit_line bundle, there's no way for you to fi=
x this in your policy. It is actually a bug in the<br />'set_variable_value=
s_ini' bundle.</div><div><br /></div><div>[1]=C2=A0<a href=3D"https://githu=
b.com/cfengine/core/commit/9f114044d2530c20797d0c1cac51d2892b476b5f" target=
=3D"_blank" rel=3D"nofollow" style=3D"color: rgb(26, 115, 232);">https://gi=
thub.com/cfengine/core/commit/9f114044d2530c20797d0c1cac51d2892b476b5f</a><=
/div><div><br /></div><div>So it would seem the most likely place to fix is=
 in masterfiles in lib/files.cf:=C2=A0https://github.com/cfengine/masterfil=
es/blob/master/lib/files.cf#L421</div><div><br /></div><div>The ticket is o=
pen here:=C2=A0https://northerntech.atlassian.net/browse/CFE-4459</div><div=
><br /></div><div>Other related bugs are</div><div>-=C2=A0https://northernt=
ech.atlassian.net/browse/CFE-2663 - Problems selecting INI regions</div><di=
v>-=C2=A0https://northerntech.atlassian.net/browse/CFE-3988 - edit_line doe=
sn't insert after the last matched line when selecting a region where the e=
nd delimiter is included</div><div><br /></div><div>Sorry it hasn't been re=
solved yet. I will check if we can bump it up in priority.</div><div><br />=
</div><div>-Craig</div><div class=3D"gmail_quote"><div dir=3D"auto" class=
=3D"gmail_attr">On Monday, September 8, 2025 at 10:11:16=E2=80=AFAM UTC-5 G=
reg Matthews wrote:<br/></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left:=
 1ex;">can we at least stop it polluting our logs?<br><br><div class=3D"gma=
il_quote"><div dir=3D"auto" class=3D"gmail_attr">On Tuesday, 8 April 2025 a=
t 16:26:46 UTC+1 [email protected] wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex">No, I don&#39;t see any changes to either ticket=
 recently.<br><br><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gma=
il_attr">On Thursday, December 5, 2024 at 1:52:40=E2=80=AFPM UTC-6 <a rel=
=3D"nofollow">[email protected]</a> wrote:<br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex"><br>Thanks, Nick.<br><br><div>While I don&#39=
;t seem to have access to:</div><div>=C2=A0=C2=A0=C2=A0 <a href=3D"https://=
northerntech.atlassian.net/browse/ENT-12503" rel=3D"nofollow" target=3D"_bl=
ank" data-saferedirecturl=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhtt=
ps://northerntech.atlassian.net/browse/ENT-12503&amp;source=3Dgmail&amp;ust=
=3D1757431725774000&amp;usg=3DAOvVaw1MLblp67Ubu6-j60A2cEKL">https://norther=
ntech.atlassian.net/browse/ENT-12503</a><br></div><div><br></div><div>I can=
 successfully see:</div><div>=C2=A0=C2=A0=C2=A0 <a href=3D"https://northern=
tech.atlassian.net/browse/CFE-4459" rel=3D"nofollow" target=3D"_blank" data=
-saferedirecturl=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhttps://nort=
herntech.atlassian.net/browse/CFE-4459&amp;source=3Dgmail&amp;ust=3D1757431=
725774000&amp;usg=3DAOvVaw1mOSIgZ62tviIqiDJlMFjp">https://northerntech.atla=
ssian.net/browse/CFE-4459</a></div><div><br></div><div>So the latter should=
 be fine.</div><div><br></div><div>-- David Lee<br></div><div><br></div><di=
v><br> </div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_at=
tr">On Thursday, 5 December 2024 at 18:08:26 UTC [email protected] wr=
ote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">I took that snipp=
et and created a ticket.=C2=A0<a href=3D"https://northerntech.atlassian.net=
/browse/ENT-12503" rel=3D"nofollow" target=3D"_blank" data-saferedirecturl=
=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhttps://northerntech.atlassi=
an.net/browse/ENT-12503&amp;source=3Dgmail&amp;ust=3D1757431725774000&amp;u=
sg=3DAOvVaw1MLblp67Ubu6-j60A2cEKL">https://northerntech.atlassian.net/brows=
e/ENT-12503</a><br><br><div class=3D"gmail_quote"><div dir=3D"auto" class=
=3D"gmail_attr">On Thursday, December 5, 2024 at 8:34:55=E2=80=AFAM UTC-6 <=
a rel=3D"nofollow">[email protected]</a> wrote:<br></div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex"><div>Any news on this, please?</div><div=
><br></div><div>Thanks.</div><div><br></div><div>-- David Lee</div><div>-- =
Diamond Light Source<br></div><br><div class=3D"gmail_quote"><div dir=3D"au=
to" class=3D"gmail_attr">On Friday, 15 November 2024 at 15:48:03 UTC <a rel=
=3D"nofollow">[email protected]</a> wrote:<br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex">I had lost track of the fact you still needed=
 me to provide a test case.<br><br>Here it is.=C2=A0 It is extracted from a=
 real part of our policy, setting a key=3Dvalue in RH8 &quot;/etc/dnf/autom=
atic.conf&quot; (I&#39;ve slightly tweaked it to make it standalone and usi=
ng a safe target file).<br><br>Run it at least twice (or as often as you li=
ke).=C2=A0 You&#39;ll see that although the target file successfully conver=
ges, CFE persists in (falsely) reporting errors.<br><div><br></div><div>Ple=
ase could you take it forward from this?<br></div><div><br></div><div>=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br></div>#<br># Demonstrate CFEn=
gine &quot;edit_line&quot; bug:<br>#<br><br>body file control<br>{ <br>=C2=
=A0 =C2=A0 =C2=A0 inputs =3D&gt; { &quot;/var/cfengine/inputs/lib/<a href=
=3D"http://files.cf" rel=3D"nofollow" target=3D"_blank" data-saferedirectur=
l=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhttp://files.cf&amp;source=
=3Dgmail&amp;ust=3D1757431725774000&amp;usg=3DAOvVaw0HYFO5pyEqSeVftmUenzC-"=
>files.cf</a>&quot; };<br>}<br><br>bundle agent __main__<br>{ =C2=A0 =C2=A0=
 <br>=C2=A0 vars:<br>=C2=A0 =C2=A0 any::<br>=C2=A0 =C2=A0 =C2=A0 #&quot;fna=
me&quot; string =3D&gt; &quot;/etc/dnf/automatic.conf&quot;;<br>=C2=A0 =C2=
=A0 =C2=A0 &quot;fname&quot; string =3D&gt; &quot;/tmp/automatic.conf&quot;=
;<br><br>=C2=A0 =C2=A0 =C2=A0 &quot;tab[commands][apply_updates]&quot; stri=
ng =3D&gt; &quot;no&quot;;<br><br>=C2=A0 files:<br>=C2=A0 =C2=A0 any::<br>=
=C2=A0 =C2=A0 =C2=A0 &quot;$(fname)&quot;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ed=
it_line =3D&gt; set_variable_values_ini(&quot;$(this.bundle).tab&quot;, &qu=
ot;commands&quot;);<br><br>}<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D<div><br></div><div>Thanks.</div><div><br></div><div>-- David Lee<br></d=
iv><div><br></div><div><br></div><div><br></div><div><br></div><div><br></d=
iv><div><div dir=3D"auto">On Monday, 19 August 2024 at 22:01:33 UTC+1 nick.=
[email protected] wrote:<br></div><blockquote style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&quot;<a rel=
=3D"nofollow">[email protected]</a>&quot; &lt;<a rel=3D"nofollow">=
[email protected]</a>&gt; writes:
<br>
<br>&gt; Is there any progress on this, please?  It is somewhat of an irrit=
ant to us and our logging!
<br>&gt;
<br>&gt; Thanks.
<br>
<br>Hi David
<br>
<br>
<br>I didn&#39;t see a ticket in this thread to check status on, probably
<br>no work has been done.
<br>
<br>PRs are great if you know how to fix, but at least having a standalone
<br>policy file that reproduces the issue is necessary.
<br>
<br>If you can make sure there is a ticket that at least contains a
<br>reproducer then there is better chance of something happening.
<br>
<br>
<br>--
<br>Nick Anderson | Doer of Things | <a value=3D"+17855501767" rel=3D"nofol=
low">(+1) 785-550-1767</a> | <a href=3D"https://northern.tech" rel=3D"nofol=
low" target=3D"_blank" data-saferedirecturl=3D"https://www.google.com/url?h=
l=3Den&amp;q=3Dhttps://northern.tech&amp;source=3Dgmail&amp;ust=3D175743172=
5774000&amp;usg=3DAOvVaw1UlEBJlUUXLWeGITN-yZdW">https://northern.tech</a>
<br></blockquote></div></blockquote></div></blockquote></div></blockquote><=
/div></blockquote></div></blockquote></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;help-cfengine&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">help-=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
help-cfengine/dc108074-87b5-4ff6-ba04-7069c02f4da0n%40googlegroups.com?utm_=
medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/help-=
cfengine/dc108074-87b5-4ff6-ba04-7069c02f4da0n%40googlegroups.com</a>.<br /=
>

------=_Part_301839_2130155413.1757346580311--

------=_Part_301838_2073446441.1757346580311--