debugMinor
Why unable to find the exact path for grains storage in master?
Viewed 0 times
exactwhythepathgrainsunablestoragemasterforfind
Problem
I am trying to completely remove the grains from the system. I have one master and one minion setup(minion id= minion1). I am doing
salt minion1 grains.ls
that is listing me all the grains
Now I removed data.p which is the cache memory for the grains in master
Without running a salt_sync or any other command for sync I am again doing.
It's returning the same result.(The grains are still somewhere stored.
Where exactly it is storing the grains and how to delete that?
salt minion1 grains.ls
that is listing me all the grains
Now I removed data.p which is the cache memory for the grains in master
path : /var/cache/salt/master/minions/minion1/data.pWithout running a salt_sync or any other command for sync I am again doing.
`salt minion1 grains.ls`,It's returning the same result.(The grains are still somewhere stored.
Where exactly it is storing the grains and how to delete that?
Solution
These are built-in grains, which are collected at minion startup. Here's the code responsible for generating them.
You cannot remove them, but you can overwrite them, for example to an empty value in
or with grains execution module:
Keep in mind that some of the core grains are essential for the correct functioning of salt, e.g. module providers for
You cannot remove them, but you can overwrite them, for example to an empty value in
/etc/salt/grains:osfinger: nullor with grains execution module:
salt minion1 grains.delval osfinger.Keep in mind that some of the core grains are essential for the correct functioning of salt, e.g. module providers for
pkg module rely on them.Code Snippets
osfinger: nullContext
StackExchange DevOps Q#4508, answer score: 2
Revisions (0)
No revisions yet.