You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's an existing minion that's replaced with another minion of the same name but different IP (and the original minion is renamed) the hostsfile formula will simply add an entry for the new node, and add the new name for the old node to the old node's entry. This means that the original name gets two entries in /etc/hosts. Visual example:
Original node (the "before" state):
10.0.0.2 prometheus.my.domain.com
< Rename prometheus.my.domain.com minion_id to "prometheus-old.my.domain.com" >
< Spin up new node and call it "prometheus.my.domain.com" >
Now when running hostsfile on any minions that already had the old entry, they grab both new and old node entries from the Mine, and their /etc/hosts looks like:
Add a "purge existing entries" behavior to the formula. Probably an if condition to add the clean flag to host.present in init.sls?
The intent would be to update minions' /etc/hosts to point prometheus.my.domain.com to the new minion and set the old entry to "prometheus-old.my.domain.com" only. Like so:
Is your feature request related to a problem?
If there's an existing minion that's replaced with another minion of the same name but different IP (and the original minion is renamed) the hostsfile formula will simply add an entry for the new node, and add the new name for the old node to the old node's entry. This means that the original name gets two entries in /etc/hosts. Visual example:
Original node (the "before" state):
< Rename prometheus.my.domain.com minion_id to "prometheus-old.my.domain.com" >
< Spin up new node and call it "prometheus.my.domain.com" >
Now when running hostsfile on any minions that already had the old entry, they grab both new and old node entries from the Mine, and their /etc/hosts looks like:
Describe the solution you'd like
Add a "purge existing entries" behavior to the formula. Probably an if condition to add the
clean
flag tohost.present
in init.sls?The intent would be to update minions' /etc/hosts to point prometheus.my.domain.com to the new minion and set the old entry to "prometheus-old.my.domain.com" only. Like so:
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: