This version of GitHub Enterprise was discontinued on 2021-06-09. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Evacuating a cluster node

You can evacuate data services on a cluster node.

If you only have three nodes in your data services cluster, you can't evacuate the nodes, because ghe-spokes doesn’t have another place to make a copy. If you have four or more, ghe-spokes will move all the repositories off of the evacuated node.

If you're taking a node offline that has any data services (like git, pages, or storage) evacuate each node before taking the node offline.

  1. Find the uuid of the node in with the ghe-configcommand.

    $ ghe-config cluster.HOSTNAME.uuid
  2. You'll need to monitor the status of your node while the data is being copied. Ideally, the node shouldn't be taken offline until the copying is complete. To monitor the status of your node, run any of the following commands:

    For Git

    ghe-spokes evac-status
    

    For GitHub Pages

    echo "select count(*) from pages_replicas where host = 'pages-server-UUID'" | ghe-dbconsole -y

    For storage

    ghe-storage evacuation-status
    
  3. After the copying is complete, you can evacuate the storage service. Run any of the following commands:

    For Git

    ghe-spokes server evacuate git-server-UUID \'REASON FOR EVACUATION\'

    For GitHub Pages

    ghe-dpages evacuate pages-server-UUID

    For storage, take the node offline

    ghe-storage offline storage-server-UUID

    then evacuate

    ghe-storage evacuate storage-server-UUID