Hello,
On Fri, 2024-08-16 at 14:06 -0700, Beto wrote:
> Weird thing is this occurs ONLY on RHEL8, not on RHEL7 and this same augments configuration has been in use for years.
That suggests the difference is most likely SELinux. Does it happen even if you
do a manual agent run from an interactive shell with `cf-agent -KI`? If not,
please double-check `ausearch -m AVC` on an affected system.
Another alternative is to run `strace -ff -- cf-agent -KI 2> cf-agent.strace`,
look for the particular file name in the trace and see what happens when the
file is attempted to be opened and read.
>
> I thought maybe I could use host_specific.json to get around this issue but I can't tell that host_specific.json is being seen at all (as you say the doc is "imprecise").
What do you think is imprecise in the docs? I think it's quite clear:
There are two canonical augments files, host_specific.json, and def.json
which may load additional Augments as specified by the augments key.
Notes:
CFEngine variables are not expanded unless otherwise noted.
and then there is a note for the def.json file:
sys variables are expanded in def.json and all subsequently loaded augments
as specified by the augments key.
You can do a verbose agent run using `--verbose` to see details of what it is doing
and which files it is loading.
One thing is quite clear -- the error message that further augments could not be
loaded should be enhanced to explain why.
--
Vratislav
>
> On Friday, August 16, 2024 at 4:00:51 PM UTC-5 Beto wrote:
> > There are no selinux AVCs logged.
> >
> > On Friday, August 16, 2024 at 3:42:41 PM UTC-5 nick.a...@northern.tech wrote:
> > > Def.jq might itself be special what about def.foo?
> > >
> > > On Fri, Aug 16, 2024, 3:10 PM 'craig.c...@northern.tech' via help-cfengine <
help-c...@googlegroups.com> wrote:
> > > > The docs might be a bit imprecise.
https://docs.cfengine.com/docs/3.24/reference-language-concepts-augments.html says in two separate notes:
> > > >
> > > > * CFEngine variables are not expanded unless otherwise noted.
> > > > * sys variables are expanded in def.json and all subsequently loaded augments as specified by the augments key.