Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Without the "-upgrade-console", ubuntu control should not be upgraded. #2298

Closed
kingsd041 opened this issue Mar 20, 2018 · 4 comments
Closed
Assignees
Milestone

Comments

@kingsd041
Copy link
Contributor

RancherOS Version: (ros os version)
v1.2.0
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
AWS

Steps to Reproduce:

  1. Launch rancherosv1.2.0 instance
  2. Switch ubuntu console
ros console switch ubuntu

The ubuntu console version is now v1.2.0

  1. Upgrade os and console to v1.3.0-rc1
ros os upgrade -i rancher/os:v1.3.0-rc1
  1. Check the ubuntu console version
# system-docker ps | grep console
5b2081ef73c1        rancher/os-ubuntuconsole:v1.3.0    "/usr/bin/ros entr..."   30 seconds ago      Up 28 seconds                           console

Results:
I think the console version should be "v1.2.0" and not "v1.3.0".
When upgrading os, if you do not use the "--upgrade-console" parameter, the console version will not be upgraded.

The following description comes from denise

Typically, if you are running a persistent console (eg. anything but busybox), when you upgrade from a previous version of rancherOS to a newer one, the console version will not change
if you want the console to be upgraded to the latest version during a RancherOS upgrade, you would pass in the --upgrade-console flag
typically, each version of RancherOS should have a corresponding console verison. for RancherOS v1.0.4, the console tags should be os-debianconsole:v1.0.4
and when you install RancherOS v1.1.0, the console tags if you do a fresh install would be os-debianconsole:v1.1.0
if you started in debian in RancherOS v1.0.4, and upgrade, all the other containers will automatically upgrade to the latest version except for the console. when using --upgrade-console, the console will also be upgrade.

@niusmallnan
Copy link
Contributor

I know the reason.
For v1.3.0-rc1, we have upgraded the system-docker to 17.06, the overlay2 is the default storage driver.
For v1.2.0, the overlay is the storage driver.
When we upgraded os from v1.2.0 to v1.3.0-rc1, all the system containers will be lost because of the storage driver.
In this case, rancher/os-ubuntuconsole:v1.2.0 has been lost, the system-docker will enable rancher/os-ubuntuconsole:v1.3.0 instead.

Keep this open, it's a known issue, others maybe need to know.

@niusmallnan niusmallnan added this to the v1.3.0 milestone Mar 28, 2018
@nayang777
Copy link

nayang777 commented Mar 29, 2018

As overlay is not recommended for system-docker, we switched the storage driver of system-docker to overlay2 in v1.3.0. Please be noted that all the containers and images in system-docker will be wiped after the upgrade as the strorage driver is changed.

For normal situation, you don't need to backup the data under system-docker, all the images will be re-pulled automatically after the upgrade. However, if you have some custom data under system-docker, you may follow the below steps to backup/restore the containers/images:

To backup data:
1.  system-docker export <CONTAINER ID > > my_container.tar  
2.  system-docker save image_id >  image_.tar
To restore data:
1. cat my_container.tar |system-docker import - new_name:new_tag
2. system-docker load < images_.tar

Or you can run below commands before the upgrade to force the storage driver of system-docker unchanged.

sudo ros config set rancher.bootstrap_docker.storage_driver overlay
sudo ros config set rancher.system_docker.storage_driver overlay
sudo system-docker rm -f docker

@wicadmin
Copy link

wicadmin commented Apr 19, 2018

Does the above also work to backup and restore current persistent console? If so, how do you make it the default after loading it back after upgrading to version with overlay2?

@kingsd041
Copy link
Contributor Author

As overlay is not recommended for system-docker, we switched the storage driver of system-docker to overlay2 in v1.3.0. Please be noted that all the containers and images in system-docker will be wiped after the upgrade as the strorage driver is changed.

So only if you upgrade from less than v1.3.0 to 1.3.0+ will this problem be reproduced

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants