On rare occasions I need to repurpose a server for something else. It would be practical if it was possible to rename the key.
Ah, so you want a way to change the ID without generating a new key and having to accept it (and delete the key), correct?
This would definitely be useful -- not sure how hard it would be to implement, though.
Correct: I only want to change the id. The current workaround seems to be a) delete old key on master, b) delete key on minion, c) change id on minion and generate a new key for it, d) accept new key on master.
Yep, I think you're correct, that's the only way to do it currently.
This would be really cool if we could do it in a secure, consistent way.
It would be also cool when running in something like AWS EC2 without static IP and specified minion's id, because if we will reload our EC2 instance, it will have a new hostname, based on dynamically assigned IP.
Is the id really tied to the IP address? Based on my understanding of the documentation the ID is just an identifier for the crypto key which is used to identify the remove machine.
ID is hostname by default. I was talking about Amazon Web Services, which hostname depends on it's ip address.
If the minion ID is set on the configuration file it survives machine restarts.
Pedro Algarvio @ phone
----- Reply message -----
De: "Dmitry Malinovskiy" [email protected]
Para: "saltstack/salt" [email protected]
Assunto: [salt] Rename salt keys (#6896)
Data: qua, Ago 28, 2013 09:36
ID is hostname by default. I was talking about Amazon Web Services, which hostname depends on it's ip address.
—
Reply to this email directly or view it on GitHub.
:+1:
This would be great to have. :+1:
:+1:
:+1:
:+1: I was just searching for this feature :)
:+1:
:+1:
:thumbsup:
:+1:
:+1:
+1
:+1:
:+1:
+1
@SaltDBray let's try to get thin into boron.
:+1:
:+1:
Very +1!!! It would be great to have a way to "rename" a server (change it's hostname) without this hassle:
{quote}
a) delete old key on master, b) delete key on minion, c) change id on minion and generate a new key for it, d) accept new key on master.
{quote}
:+1:
馃憤
馃憤馃徎
+1
:+1:
馃憤
馃憤
馃憤
:+1:
馃憤
馃憤
+1
馃憤
+1
+100500
+1
+1
+1
Workaround script:
#!/bin/bash
function usage() {
cat << EOF
Usage: $0 old-id new-id
EOF
}
if [ $# -eq 0 ] ; then
usage
exit 1
fi
OLD=$1
NEW=$2
salt $OLD test.ping && salt $OLD cmd.run "echo $NEW > /etc/salt/minion_id"
salt $OLD service.restart salt-minion
mv -f /etc/salt/pki/master/minions/$OLD /etc/salt/pki/master/minions/$NEW
echo "Waiting 10 sec..."
sleep 10
salt $NEW test.ping # check if new host works
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
not stale
Thank you for updating this issue. It is no longer marked as stale.
Most helpful comment
not stale