Lxd: do-release-upgrade inside containers

Created on 30 Sep 2017  路  6Comments  路  Source: lxc/lxd

Ticket https://github.com/lxc/lxd/issues/1724 discussed this + was closed with no resolution.

Since do-release-upgrade -m server still returns "Must be connected to a terminal", pass along how containers can install OS updates.

Thanks.

net11 # lxd --version
2.18

net11 # lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty

Most helpful comment

I usually do:

lxc exec NAME -- script /dev/null -c do-release-upgrade

All 6 comments

The following seems to work + also seems like a simpler method surely must exist...

lxc exec $cname -- bash -c "exec >/dev/tty 2>/dev/tty </dev/tty && do-release-upgrade -m server"

I usually do:

lxc exec NAME -- script /dev/null -c do-release-upgrade

Or you can run the do-release-upgrade from an ssh session into the container, that would work too.

The error comes from a libc issue which we've fixed upstream a few months ago but that still needs to trickle down into Linux distros and get support in the various affected software (we submitted patches to both screen and tmux).

Closing this issue as there's nothing left for us to fix in LXD.

lxc exec NAME -- script /dev/null -c do-release-upgrade

Looks way easier to script/automate than my gibberish.

Thanks!

I usually do:

lxc exec NAME -- script /dev/null -c do-release-upgrade

Also if you're in the container already:

container:~# script /dev/null
# do-release-upgrade

Also works for running tmux.

Was this page helpful?
0 / 5 - 0 ratings