clearcontainers / runtime

OCI (Open Containers Initiative) compatible runtime using Virtual Machines
Apache License 2.0
589 stars 70 forks source link

Can't directly upgrade from CC2.1 to CC3.0 #522

Open eadamsintel opened 7 years ago

eadamsintel commented 7 years ago

IF CC2.1 is already installed and you try to install the CC3.0 you will get errors and system won't work.

UBUNTU

$ sudo -E apt-get install cc-runtime cc-proxy cc-shim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cc-runtime-bin cc-runtime-config
The following NEW packages will be installed:
  cc-proxy cc-runtime cc-runtime-bin cc-runtime-config cc-shim
0 upgraded, 5 newly installed, 0 to remove and 50 not upgraded.
Need to get 3.578 kB of archives.
After this operation, 13,6 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/xUbuntu_16.04  cc-proxy 3.0.0beta.2+git.c0805cc-0+2.1 [1.728 kB]
Get:2 http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/xUbuntu_16.04  cc-runtime-bin 3.0.0beta.2+git.06023ea-0+1.1 [1.414 B]
Get:3 http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/xUbuntu_16.04  cc-runtime-config 3.0.0beta.2+git.06023ea-0+1.1 [1.416 B]
Get:4 http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/xUbuntu_16.04  cc-shim 3.0.0beta.2+git.1f545df-0+1.1 [11,0 kB]
Get:5 http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/xUbuntu_16.04  cc-runtime 3.0.0beta.2+git.06023ea-0+1.1 [1.836 kB]
Fetched 3.578 kB in 1s (3.219 kB/s)   
Selecting previously unselected package cc-proxy.
(Reading database ... 255459 files and directories currently installed.)
Preparing to unpack .../cc-proxy_3.0.0beta.2+git.c0805cc-0+2.1_amd64.deb ...
Unpacking cc-proxy (3.0.0beta.2+git.c0805cc-0+2.1) ...
dpkg: error processing archive /var/cache/apt/archives/cc-proxy_3.0.0beta.2+git.c0805cc-0+2.1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/systemd/system/cc-proxy.service', which is also in package cc-oci-runtime 2.2.4+git.8c16c66-0+33.1
Selecting previously unselected package cc-runtime-bin.
Preparing to unpack .../cc-runtime-bin_3.0.0beta.2+git.06023ea-0+1.1_amd64.deb ...
Unpacking cc-runtime-bin (3.0.0beta.2+git.06023ea-0+1.1) ...
Selecting previously unselected package cc-runtime-config.
Preparing to unpack .../cc-runtime-config_3.0.0beta.2+git.06023ea-0+1.1_amd64.deb ...
Unpacking cc-runtime-config (3.0.0beta.2+git.06023ea-0+1.1) ...
Selecting previously unselected package cc-shim.
Preparing to unpack .../cc-shim_3.0.0beta.2+git.1f545df-0+1.1_amd64.deb ...
Unpacking cc-shim (3.0.0beta.2+git.1f545df-0+1.1) ...
Selecting previously unselected package cc-runtime.
Preparing to unpack .../cc-runtime_3.0.0beta.2+git.06023ea-0+1.1_amd64.deb ...
Unpacking cc-runtime (3.0.0beta.2+git.06023ea-0+1.1) ...
Errors were encountered while processing:
/var/cache/apt/archives/cc-proxy_3.0.0beta.2+git.c0805cc-0+2.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

FEDORA

sudo -E dnf install -y cc-runtime cc-proxy cc-shim
----
Transaction Summary
=======================================================================================================================================
Install  8 Packages
Upgrade  2 Packages

Total download size: 26 M
Downloading Packages:
(1/10): cc-runtime-3.0.0beta.1+git.7bde8a9-3.1.x86_64.rpm                                              9.7 kB/s | 6.8 kB     00:00    
(2/10): cc-shim-3.0.0alpha.4+git.ab14648-2.1.x86_64.rpm                                                7.1 kB/s | 6.6 kB     00:00    
(3/10): cc-proxy-3.0.0beta.1+git.817d71e-1.1.x86_64.rpm                                                4.0 kB/s | 6.6 kB     00:01    
(4/10): cc-runtime-config-3.0.0beta.1+git.7bde8a9-3.1.x86_64.rpm                                       9.3 kB/s | 7.8 kB     00:00    
(5/10): cc-runtime-bin-3.0.0beta.1+git.7bde8a9-3.1.x86_64.rpm                                          1.5 MB/s | 2.2 MB     00:01    
(6/10): cc-shim-bin-3.0.0alpha.4+git.ab14648-2.1.x86_64.rpm                                            139 kB/s |  18 kB     00:00    
(7/10): cc-proxy-config-3.0.0beta.1+git.817d71e-1.1.x86_64.rpm                                          12 kB/s | 7.4 kB     00:00    
(8/10): cc-proxy-bin-3.0.0beta.1+git.817d71e-1.1.x86_64.rpm                                            2.1 MB/s | 1.9 MB     00:00    
(9/10): linux-container-4.9.35-66.1.x86_64.rpm                                                         3.7 MB/s | 8.0 MB     00:02    
(10/10): clear-containers-image-17270-34.1.x86_64.rpm                                                  3.9 MB/s |  14 MB     00:03    
---------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                  4.4 MB/s |  26 MB     00:05     
warning: /var/cache/dnf/home_clearcontainers_clear-containers-3-7722e681f204c52d/packages/cc-runtime-3.0.0beta.1+git.7bde8a9-3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 383bc8d1: NOKEY
Importing GPG key 0x383BC8D1:
Userid     : "home:clearcontainers OBS Project <home:clearcontainers@build.opensuse.org>"
Fingerprint: FF88 5182 451B 7E16 A12E 3E20 CCC1 9FA1 383B C8D1
From       : http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/Fedora_25/repodata/repomd.xml.key
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/lib/systemd/system/cc-proxy.service from install of cc-proxy-config-3.0.0beta.1+git.817d71e-1.1.x86_64 conflicts with file from package cc-oci-runtime-config-2.2.4+git.8c16c66-33.1.x86_64
  file /usr/lib/systemd/system/cc-proxy.socket from install of cc-proxy-config-3.0.0beta.1+git.817d71e-1.1.x86_64 conflicts with file from package cc-oci-runtime-config-2.2.4+git.8c16c66-33.1.x86_64
jodh-intel commented 7 years ago

We don't currently support upgrading from CC 2.x to 3.0. This is documented, but... not that easy to find :)

It's here:

Short-term we should copy the warning to the Fedora + Ubuntu install docs and medium term we may be able to resolve this issue by:

eadamsintel commented 7 years ago

I agree that each OS install doc should have this as a warning.

jodh-intel commented 7 years ago

This topic will be addressed on #528.