> Andy Doan has proposed merging lp:~doanac/lava-lab/lava-scripts into lp:lava-lab.
>
> Requested reviews:
> Linaro Validation Team (linaro-validation)
>
> For more details, see:
> https://code.launchpad.net/~doanac/lava-lab/lava-scripts/+merge/146547
>
> start work on some helper functions that should allow us to manage lava deployments using salt
> --
> https://code.launchpad.net/~doanac/lava-lab/lava-scripts/+merge/146547
> You are subscribed to branch lp:lava-lab.
> === modified file '_grains/lava.py'
> --- _grains/lava.py 2013-01-10 16:37:55 +0000
> +++ _grains/lava.py 2013-02-05 04:19:20 +0000
> @@ -9,4 +9,10 @@
> p = os.path.join(instdir, f)
> if os.path.isdir(p):
> insts.append(p)
> + # This seems to be a bug in salt. Even after you reload/resync grains
> + # the module still uses what it read at the time the minion started up.
> + # this makes this dynamic so we don't have to restart salt just to see
> + # a new instance
> + if 'lava_instances' in __grains__:
> + __grains__['lava_instances'] = insts
It is important to remember that grains are bits of information
loaded when the salt minion starts, so this information is
static. This means that the information in grains is unchanging,
therefore the nature of the data is static. So grains information
are things like the running kernel, or the operating system.
I think grains-but-varying-things are "pillars", but not completely
sure. Might be worth asking #saltstack IRC...
Andy Doan <email address hidden> writes:
> Andy Doan has proposed merging lp:~doanac/lava-lab/lava-scripts into lp:lava-lab. /code.launchpad .net/~doanac/ lava-lab/ lava-scripts/ +merge/ 146547 /code.launchpad .net/~doanac/ lava-lab/ lava-scripts/ +merge/ 146547 join(instdir, f) _['lava_ instances' ] = insts
>
> Requested reviews:
> Linaro Validation Team (linaro-validation)
>
> For more details, see:
> https:/
>
> start work on some helper functions that should allow us to manage lava deployments using salt
> --
> https:/
> You are subscribed to branch lp:lava-lab.
> === modified file '_grains/lava.py'
> --- _grains/lava.py 2013-01-10 16:37:55 +0000
> +++ _grains/lava.py 2013-02-05 04:19:20 +0000
> @@ -9,4 +9,10 @@
> p = os.path.
> if os.path.isdir(p):
> insts.append(p)
> + # This seems to be a bug in salt. Even after you reload/resync grains
> + # the module still uses what it read at the time the minion started up.
> + # this makes this dynamic so we don't have to restart salt just to see
> + # a new instance
> + if 'lava_instances' in __grains__:
> + __grains_
Thats because grains are supposed to be invariant. From docs.saltstack. org/en/ latest/ topics/ targeting/ grains. html:
http://
It is important to remember that grains are bits of information
loaded when the salt minion starts, so this information is
static. This means that the information in grains is unchanging,
therefore the nature of the data is static. So grains information
are things like the running kernel, or the operating system.
I think grains- but-varying- things are "pillars", but not completely
sure. Might be worth asking #saltstack IRC...