wiki:how-to/servers/support/change-server-name

Version 1 (modified by Ross, 6 years ago) (diff)

--

How do I change the name of a server?

Sometimes we misspell the name of a server we create and need to modify the hostname after creation. The following checklist shows the steps to take in order to modify the hostname (currently this is just an outline).

On guest:

  • change /etc/hostname
  • vgrename volume group
  • change /etc/hosts
  • change /etc/fstab
  • Run update-grub
  • Add new monkeysphere service name: monkeysphere-host add-servicename ssh://HOST.mayfirst.org
  • publish the new service name key monkeysphere-host publish-key <keyid>
  • Revoke old service name: monkeysphere-host revoke-servicename ssh://OLDHOST.mayfirst.org/
  • revoke gpg key

gpg --edit root@…

revkey

save (password is monkeys)

gpg --send-key <keyid>

delete the secret key to prompt puppet to renegerate a new one with the new name

gpg --delete-secret-keys <keyid> for root user's gpg key

  • Add DNS entry for NEW_HOST.mayfirst.org

On TPC

  • reboot the guest
  • edit puppet configs for guest
  • apply new puppet configs to guest

On guest:

  • Reboot. Pray.
  • If it works... shutdown guest.

On host:

  • update-services --remove /etc/sv/OLDNAME
  • Delete old server name stuff in /usr/local/share/ISOs, /etc/kvm-manager, /etc/sv/
  • deluser

On TPC

  • Update host pp file to fix name

On host:

  • lvremove newly created logical volume
  • lvrename old lv to new logical volume name

On hay:

If controlled by red, make name changes in seso to red_server and red_item.item_host