FAQ
Hey Folks,

what is the best way to keep your salt mine tidy? I.e. if a node is
destroyed via salt cloud, how is salt mine data cleansed.

From what I understood, no action is taken by salt and the salt mine
data of the former node is kept indefinitely. One possibility would be
to use reactor to listen on salt cloud events that are fired upon node
destruction.

Is there a simpler way to clean up nodes that aren't 'online' anymore?

Best wishes

Martin

--
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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Warren Turkal at Sep 10, 2014 at 4:38 pm
    The following will remove all keys for down hosts:
    salt-run manage.down removekeys=True

    However, transient down hosts will also be removed, which probably isn't
    what you want. If you are running in ec2, you could compare the list that
    "salt-run manage.down" gives you to what's actually in your ec2
    describe-instances and only remove instances that don't exist in the
    describe instances. Then you can "salt-key -d <name>" for all removed
    servers. I believe that will cause the mine data for the host to be removed
    as well.

    wt
    On Wednesday, September 10, 2014 9:06:55 AM UTC-7, Martin Höfling wrote:

    Hey Folks,

    what is the best way to keep your salt mine tidy? I.e. if a node is
    destroyed via salt cloud, how is salt mine data cleansed.

    From what I understood, no action is taken by salt and the salt mine
    data of the former node is kept indefinitely. One possibility would be
    to use reactor to listen on salt cloud events that are fired upon node
    destruction.

    Is there a simpler way to clean up nodes that aren't 'online' anymore?

    Best wishes

    Martin
    --
    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@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tim at Oct 27, 2015 at 3:10 pm
    It's a bummer that this isn't the default behavior. Cleaning up node data
    once their key-pair is destroyed is probably the most sensible thing to do.
    On Wednesday, September 10, 2014 at 10:38:27 AM UTC-6, Warren Turkal wrote:

    The following will remove all keys for down hosts:
    salt-run manage.down removekeys=True

    However, transient down hosts will also be removed, which probably isn't
    what you want. If you are running in ec2, you could compare the list that
    "salt-run manage.down" gives you to what's actually in your ec2
    describe-instances and only remove instances that don't exist in the
    describe instances. Then you can "salt-key -d <name>" for all removed
    servers. I believe that will cause the mine data for the host to be removed
    as well.

    wt
    On Wednesday, September 10, 2014 9:06:55 AM UTC-7, Martin Höfling wrote:

    Hey Folks,

    what is the best way to keep your salt mine tidy? I.e. if a node is
    destroyed via salt cloud, how is salt mine data cleansed.

    From what I understood, no action is taken by salt and the salt mine
    data of the former node is kept indefinitely. One possibility would be
    to use reactor to listen on salt cloud events that are fired upon node
    destruction.

    Is there a simpler way to clean up nodes that aren't 'online' anymore?

    Best wishes

    Martin
    --
    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@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Colton Myers at Nov 3, 2015 at 5:56 pm
    You can follow the issue here: https://github.com/saltstack/salt/issues/11389
    On Oct 27, 2015, at 9:10 AM, tim@spacemonkey.com wrote:

    It's a bummer that this isn't the default behavior. Cleaning up node data once their key-pair is destroyed is probably the most sensible thing to do.

    On Wednesday, September 10, 2014 at 10:38:27 AM UTC-6, Warren Turkal wrote:
    The following will remove all keys for down hosts:
    salt-run manage.down removekeys=True

    However, transient down hosts will also be removed, which probably isn't what you want. If you are running in ec2, you could compare the list that "salt-run manage.down" gives you to what's actually in your ec2 describe-instances and only remove instances that don't exist in the describe instances. Then you can "salt-key -d <name>" for all removed servers. I believe that will cause the mine data for the host to be removed as well.

    wt

    On Wednesday, September 10, 2014 9:06:55 AM UTC-7, Martin Höfling wrote:
    Hey Folks,

    what is the best way to keep your salt mine tidy? I.e. if a node is
    destroyed via salt cloud, how is salt mine data cleansed.

    From what I understood, no action is taken by salt and the salt mine
    data of the former node is kept indefinitely. One possibility would be
    to use reactor to listen on salt cloud events that are fired upon node
    destruction.

    Is there a simpler way to clean up nodes that aren't 'online' anymore?

    Best wishes

    Martin

    --
    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@googlegroups.com.
    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@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedSep 10, '14 at 4:06p
activeNov 3, '15 at 5:56p
posts4
users4

People

Translate

site design / logo © 2022 Grokbase