Upgrade with local images

I would like to test upgrade. So I build an images as rancher/os:v0.4.4-dev. I load this image into system-docker as you see below

[rancher@rancher ~]$ sudo system-docker images
REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
rancher/os               v0.4.4-dev          df84018a6caa        30 minutes ago      193.6 MB
rancher/os               v0.4.3              eed7c8ab50fd        3 days ago          193.1 MB
rancher/os-preload       v0.4.3              983c005fe53f        3 days ago          25.65 MB
rancher/os-console       v0.4.3              d9b2845438df        3 days ago          25.66 MB
rancher/os-udev          v0.4.3              8dc9eee7501f        2 weeks ago         25.65 MB
rancher/os-syslog        v0.4.3              987960440665        2 weeks ago         25.65 MB
rancher/os-statescript   v0.4.3              24355446800e        2 weeks ago         25.65 MB
rancher/os-state         v0.4.3              0fe21afc3049        2 weeks ago         25.65 MB
rancher/os-ntp           v0.4.3              3e2d57d4ae21        2 weeks ago         25.65 MB
rancher/os-network       v0.4.3              5288f2eb944e        2 weeks ago         25.65 MB
rancher/os-docker        v0.4.3              6a4e2f959df2        2 weeks ago         25.65 MB
rancher/os-cloudinit     v0.4.3              5c47e775e016        2 weeks ago         25.65 MB
rancher/os-autoformat    v0.4.3              00182a66713c        2 weeks ago         25.65 MB
rancher/os-acpid         v0.4.3              0fa901101944        2 weeks ago         25.65 MB

I then run upgrade:

[rancher@rancher ~]$ sudo ros os upgrade -i rancher/os:v0.4.4-dev
INFO[0000] Project [once]: Starting project             
INFO[0000] [0/1] [os-upgrade]: Starting                 
INFO[0000] Rebuilding os-upgrade                        
INFO[0000] [1/1] [os-upgrade]: Started                  
INFO[0000] Project [once]: Project started              
Pulling repository docker.io/rancher/os
ERRO[0008] Failed to pull image rancher/os:v0.4.4-dev: Tag v0.4.4-dev not found in repository docker.io/rancher/os 
FATA[0008] Tag v0.4.4-dev not found in repository docker.io/rancher/os 

Looking at the error message:

ERRO[0008] Failed to pull image rancher/os:v0.4.4-dev: Tag v0.4.4-dev not found in repository docker.io/rancher/os

it looks like it is trying to do a pull from Docker Hub. Since that tag doesn’t exist, it’s obviously not happy.

Automatically doing a fresh pull of an image seems like a good idea to me since often tags move around. But in this case it means you can’t get what you want. It seems like there should be a flag to tell the upgrade command to not pull but just use the local cache . . .

You won’t be able to upgrade to a v0.4.4-dev as we don’t publish dev images in Dockerhub. We typically won’t publish any images into Dockerhub until we do a RC for a release, but not all RCs will even get published to Dockerhub.

Thanks Denise and bakchoy!

I was expecting upgrade behave similar to install, which take local image if available. I would suggest we take this as default to keep consistent. If a tag moved, people could always manually run a pull to solve the problem.

Since we install and upgrade using a docker image, you could create your own personal OS image and push it to your personal Dockerhub and install/upgrade to your own image of RancherOS.

Both commands allow to specify which image to use.