On Thu, May 23, 2013 at 10:51 AM, hugo lassiege <
hlas...@gmail.com> wrote:
>
> I've tried but unfornately I'm not able to read the parameter from the
> script.
> I've read the documentation :
>
http://docs.ganeti.org/ganeti/current/html/hooks.html and I've tried
> GANETI_INSTANCE_TAGS and INSTANCE_TAGS. But all of those variables are
> empty.
>
> Any idea ?
I see GANETI_INSTANCE_TAGS populated in the environment of the hook.
For example I created a hook called "myenv" in
/etc/ganeti/hooks/instance-add-post.d that does:
#!/bin/bash
env > /tmp/testtest
and
# cat /tmp/testtest | grep -i tag
GANETI_POST_INSTANCE_TAGS=tmp:test:test
GANETI_INSTANCE_TAGS=tmp:test:test
Now, that said, if you want to customize the instances that you
create, wouldn't os variants and os parameters be better than hooks
and tags? (sorry, yesterday I was in a hurry and didn't realize the
situation fully)
Thanks,
Guido