mirror of https://github.com/docker/docs.git
Update upgrade.md
This commit is contained in:
parent
5af5e2cf4c
commit
b172968d4e
|
@ -194,98 +194,6 @@ When upgrading to 18.09, manager nodes cannot reschedule new workloads on the ma
|
|||
|
||||
In order to avoid any impactful application downtime, it is advised to reschedule any critical workloads on to Swarm worker nodes during the upgrade of managers. Worker nodes and their network functionality will continue to operate independently during any upgrades or outages on the managers. Note that this restriction only applies to managers and not worker nodes.
|
||||
|
||||
### Perform a hit-less upgrade
|
||||
|
||||
To upgrade an entire Docker environment, use the following steps.
|
||||
|
||||
|
||||
1. SSH into the manager node.
|
||||
|
||||
|
||||
2.Promote two other nodes to manager:
|
||||
|
||||
```
|
||||
$ docker node promote manager1
|
||||
$ docker node promote manager2
|
||||
```
|
||||
|
||||
3. Start a stack with clients connecting to services. For example:
|
||||
|
||||
```
|
||||
$ curl "https://raw.githubusercontent.com/ctelfer/moby-lb-upgrade-test/master/upgrade_test_ct/docker-compose.yml" > docker-compose.yml
|
||||
docker stack deploy --compose-file docker-compose.yml test
|
||||
```
|
||||
|
||||
4. Upgrade all subsequent managers:
|
||||
|
||||
a. SSH into each manager.
|
||||
|
||||
b. Drain containers from the node:
|
||||
|
||||
```
|
||||
$ docker node update --availability drain $(docker node ls | grep managerY | awk '{print $1}')
|
||||
```
|
||||
|
||||
c. Verify containers have been moved off:
|
||||
|
||||
```
|
||||
$ docker container ls
|
||||
```
|
||||
|
||||
d. Upgrade docker to 18.09 on the system.
|
||||
|
||||
5. After upgrading all the managers, reactivate all the nodes:
|
||||
|
||||
a. SSH into each manager.
|
||||
|
||||
b. Run the following to update all the nodes:
|
||||
|
||||
```
|
||||
$ for m in "manager0 manager1 manager2" ; do \
|
||||
docker node update --availability active $(docker node ls | grep $m | awk '{print $1}') \
|
||||
done
|
||||
```
|
||||
|
||||
6. Repeat the steps above for each worker but with two differences:
|
||||
a. You muset drain and activeate the workers from a manager.
|
||||
b. It is possible to reactivate each worker as soon as the upgrade for that worker is done.
|
||||
|
||||
### Troubleshooting the hit-less upgrade.
|
||||
|
||||
If you re-activate a manager immediately instead of waiting for upgrades to the other managers, do the following:
|
||||
|
||||
1. Run the following and observe rejected tasks:
|
||||
|
||||
```
|
||||
$ docker service_test_ps
|
||||
```
|
||||
|
||||
2. Run the following and look for `"Err": "node is missing network attachments, ip addresses may be exhausted",`.
|
||||
XXX is the ID of one of the service tasks.
|
||||
|
||||
```
|
||||
$ docker inspect XXX
|
||||
```
|
||||
|
||||
3. Finish the upgrade and service will resume.
|
||||
|
||||
If you forgot to drain the managers first, do the following:
|
||||
|
||||
1. Run the following, and observe rejected tasks with an error `"cannot create a swarm scoped …"`:
|
||||
|
||||
```
|
||||
$ docker service_test_ps
|
||||
```
|
||||
|
||||
2. Run the following and look for `"Err": "cannot create a swarm scoped network when swarm is not active",`
|
||||
XXX is the ID of one of the service tasks.
|
||||
|
||||
```
|
||||
$ docker inspect XXX
|
||||
```
|
||||
|
||||
3. Finish the upgrade and service will resume.
|
||||
|
||||
### Drain the node
|
||||
|
||||
Start by draining the node so that services get scheduled in another node and
|
||||
|
|
Loading…
Reference in New Issue