Discussion:
[salt-users] How to delete the old key?
yao
2014-05-25 07:25:59 UTC
Permalink
My master veriosn is 2014.1.4,minion version is 2014.1.4.
In my master configfile I set 'auto_accept: True'
At the beginningI set 'id' default in /etc/salt/minion.

But when I set 'id: minion's ip',and restart minion.I can see two key when
I run 'salt-key list' one is hostname one is ip.

If i have one hundred or more minions,How to delete the hostname key
automatically.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
yao
2014-05-25 07:27:56 UTC
Permalink
My master veriosn is 2014.1.4,minion version is 2014.1.4.
In my master configfile I set 'auto_accept: True'
At the beginningI set 'id' default in /etc/salt/minion.

But when I set 'id: minion's ip',and restart minion.I can see two key when
I run 'salt-key list' one is hostname one is ip.

If i have one hundred or more minions,How to delete the hostname key
automatically.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Vitold S
2014-05-26 07:35:21 UTC
Permalink
Hello,
I can see two key when I run 'salt-key list' one is hostname one is ip.
Using IP as minion_id is bad idea I suggest you start using:

1. UUID
2. MAC Address
If i have one hundred or more minions,How to delete the hostname
key automatically.

This is architecture problem of SALT, most key have no information about
what is that key reference.
But you can just remove anything and wait until all key already accepted.
My master veriosn is 2014.1.4,minion version is 2014.1.4.
In my master configfile I set 'auto_accept: True'
At the beginningI set 'id' default in /etc/salt/minion.
But when I set 'id: minion's ip',and restart minion.I can see two key when
I run 'salt-key list' one is hostname one is ip.
If i have one hundred or more minions,How to delete the hostname key
automatically.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Colton Myers
2014-05-28 22:57:31 UTC
Permalink
Salt has no idea that those two keys are the same minion.

So you have a couple of options. Either you can delete the keys manually
(this is the safest way), or you can use `salt-run manage.down
removekeys=True`. This will ping all the minions, and those that don't
respond in a timely manner will have their keys deleted.

--
Colton Myers
Post by Vitold S
Hello,
I can see two key when I run 'salt-key list' one is hostname one is ip.
1. UUID
2. MAC Address
If i have one hundred or more minions,How to delete the hostname
key automatically.
This is architecture problem of SALT, most key have no information about
what is that key reference.
But you can just remove anything and wait until all key already accepted.
My master veriosn is 2014.1.4,minion version is 2014.1.4.
In my master configfile I set 'auto_accept: True'
At the beginningI set 'id' default in /etc/salt/minion.
But when I set 'id: minion's ip',and restart minion.I can see two key
when I run 'salt-key list' one is hostname one is ip.
If i have one hundred or more minions,How to delete the hostname key
automatically.
--
You received this message because you are subscribed to the Google Groups
"Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...