My ssh session was terminated while performing an in-band upgrade.
- Cumulus Linux 1.5, 2.y
- In-band ssh connection: upgrading via ssh connection over a logical (bridge or bond) or switch (swp) port, rather than the management eth0 port.
When upgrading in-band, it is recommended to run the upgrade with the
dtach command. This makes it possible to re-attach to the upgrade process in the event the connection is interrupted.
cumulus@switch$ sudo apt-get update cumulus@switch$ dtach -c /tmp/apt-get -z sudo apt-get dist-upgrade
/tmp/apt-getis a socket that will be used to re-attach later
-zdisables the suspend key from suspending dtach
To re-attach to the apt-get process after reconnecting to the switch:
cumulus@switch$ dtach -a /tmp/apt-get
If the dtach socket file does not exist as in the following error:
cumulus@switch$ dtach -a /tmp/apt-get dtach: /tmp/apt-get: No such file or directory
... then upgrade has finished. Prior to rebooting (if needed) results of the upgrade can be reviewed in
cumulus@switch$ less /var/log/apt/term.log
Upgrades involving the switchd package may result in a temporary loss of in-band ssh connections (generally a minute or two) to the switch.
The following commands to check if an upgrade will include switchd:
cumulus@switch$ sudo apt-get update cumulus@switch$ sudo apt-get dist-upgrade -uV --assume-no | grep switchd