Bug 4304

Summary: Do automated upgrade path testing
Product: [QA/Testing] Runtime Testing Reporter: Ross Burton <ross.burton>
Component: generalAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact: Apoorv <apoorv.sangal>
Severity: enhancement    
Priority: Low CC: alexandru.c.georgescu, bluelightning, bogdanx.a.voiculescu, ionel.badisor, jose.perez.carranza, joshuagloe, leonardo.sandoval.gonzalez, mark.hatle, randy.macleod, richard.purdie, tim.orling
Version: unspecified   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Ross Burton 2013-04-15 15:22:02 UTC
QA should be able to do automated upgrade path testing.  For example:

1) Start with the latest release image, and upgrade to the current weekly build.
2) Start with last week's weekly build, and upgrade to the current weekly build.

This should be able to be automated.
Comment 1 Alexandru Georgescu 2013-09-19 13:37:05 UTC
I guess this will be moved to future...
Comment 2 Richard Purdie 2013-10-08 16:30:09 UTC
This is the kind of thing we should be thinking about in 1.6...
Comment 3 Ross Burton 2013-11-01 17:43:28 UTC
I've been asked to clarify what I mean.

As part of the weekly testing we should boot an image from *last week*, configure the package manager to use *this weeks* feeds, and attempt to do an upgrade with the package manager.  Any failures in the upgrade process are bugs.   Bonus points for doing this with each of the supported package managers.  Hopefully this can be fully automated.

Anything I'm not being clear on?
Comment 4 Paul Eggleton 2013-11-04 14:15:48 UTC
*** Bug 5432 has been marked as a duplicate of this bug. ***
Comment 5 Ionut Chisanovici 2013-11-20 13:31:37 UTC
Hi,

I have tested this and came up with a very good idea if this can be done and how.
What I've did:

1. build a core-image-sato image for nuc using the latest poky commit on dora dora:75bed4086eb83f1d24c31392f3dd54aa5c3679b1 and the latest meta-intel commit on dora dora:c86e39dd06571458c7dee6cf289d5b470c98f4bd. This image I used it on nuc and it was the one which supposed to be upgraded to the latest poky/meta-intel master commits.

2. build a core-image-sato image for nuc using the latest poky master commit: master:215dab864e7cf74394840621ad0754db593708f1 and the latest meta-intel master commit: master:f5c2786e7ca190308523379706130e0c2be793c9. This image I used as a smart repo server for the image in step 1 because it had the latest rpm packages under tmp/deploy/rpm.

3. below the upgrade steps:

a. nuc having the image in step 1 installed, before smart upgrade:
==================================================================

root@nuc:~# cat /etc/version
201311201141

root@nuc:~# cd /boot/
root@nuc:/boot# ls -la
drwxr-xr-x    4 root     root          1024 Nov 20 11:38 .
drwxr-xr-x   17 root     root          4096 Nov 20 11:39 ..
drwxr-xr-x    4 root     root          1024 Nov 20 11:38 grub
drwx------    2 root     root         12288 Nov 20 11:38 lost+found
-rwxr-x---    1 root     root       6408880 Nov 20 11:38 vmlinuz
root@nuc:/boot# cat grub/grub.cfg 
menuentry "Linux" {
    set root=(hd0,1)
    linux /vmlinuz root=/dev/sda2  rw    quiet
}

root@nuc:/boot# uname -a
Linux nuc 3.10.11-yocto-standard #1 SMP PREEMPT Wed Nov 20 12:26:09 EET 2013 x86_64 GNU/Linux

root@nuc:/boot# rpm -qa | grep connman 
connman-1.17-r20.0.x86_64

root@nuc:~# rpm -qa | grep dropbear
dropbear-2013.58-r1.0.x86_64

root@nuc:/boot# smart channel --add all type=rpm-md baseurl=http://10.237.112.210:8000/rpm/all

root@nuc:/boot# smart channel --add nuc type=rpm-md baseurl=http://10.237.112.210:8000/rpm/nuc

root@nuc:/boot# smart channel --add x86_64 type=rpm-md baseurl=http://10.237.112.210:8000/rpm/x86_64

root@nuc:~# smart channel --list
x86_64
all
rpmsys
nuc

All the above channels are linked to the machine having the image in step 2 (10.237.112.210)

root@nuc:/boot# smart update
Updating cache...                                                                 ################################################################################################################### [100%]

Fetching information for 'x86_64'...                                                                                                                                                                        
-> http://10.237.112.210:8000/rpm/x86_64/repodata/repomd.xml                                                                                                                                                
repomd.xml                                                                        ################################################################################################################### [ 16%]
-> http://10.237.112.210:8000/rpm/x86_64/repodata/primary.xml.gz                                                                                                                                            
primary.xml.gz                                                                    ################################################################################################################### [ 25%]
-> http://10.237.112.210:8000/rpm/x86_64/repodata/filelists.xml.gz                                                                                                                                          
filelists.xml.gz                                                                  ################################################################################################################### [ 33%]
                                                                                                                                                                                                            
Fetching information for 'all'...
-> http://10.237.112.210:8000/rpm/all/repodata/repomd.xml                                                                                                                                                   
repomd.xml                                                                        ################################################################################################################### [ 50%]
-> http://10.237.112.210:8000/rpm/all/repodata/primary.xml.gz                                                                                                                                               
-> http://10.237.112.210:8000/rpm/all/repodata/filelists.xml.gz                                                                                                                                             
filelists.xml.gz                                                                  ################################################################################################################### [ 58%]
primary.xml.gz                                                                    ################################################################################################################### [ 66%]
                                                                                                                                                                                                            
Fetching information for 'nuc'...
-> http://10.237.112.210:8000/rpm/nuc/repodata/repomd.xml                                                                                                                                                   
repomd.xml                                                                        ################################################################################################################### [ 83%]
-> http://10.237.112.210:8000/rpm/nuc/repodata/filelists.xml.gz                                                                                                                                             
-> http://10.237.112.210:8000/rpm/nuc/repodata/primary.xml.gz                                                                                                                                               
primary.xml.gz                                                                    ################################################################################################################### [ 91%]
filelists.xml.gz                                                                  ################################################################################################################### [100%]

Updating cache...                                                                 ################################################################################################################### [100%]

Channels have 5229 new packages.
Saving cache...

root@nuc:/# smart upgrade
Loading cache...
Updating cache...                                                                 ################################################################################################################### [100%]

Computing transaction...

Upgrading packages (321):
  base-passwd                                       kernel-module-ipcomp6                             kernel-module-nls-iso8859-4                       kernel-module-xt-conntrack                        
  connman                                           kernel-module-ipip                                kernel-module-nls-iso8859-5                       kernel-module-xt-ct                               
  dropbear                                          kernel-module-ipt-ah                              kernel-module-nls-iso8859-6                       kernel-module-xt-dccp                             
  file                                              kernel-module-ipt-clusterip                       kernel-module-nls-iso8859-7                       kernel-module-xt-dscp                             
  gdk-pixbuf                                        kernel-module-ipt-ecn                             kernel-module-nls-iso8859-9                       kernel-module-xt-ecn                              
  gdk-pixbuf-loader-gif                             kernel-module-ipt-masquerade                      kernel-module-nls-koi8-r                          kernel-module-xt-esp                              
  gdk-pixbuf-loader-jpeg                            kernel-module-ipt-reject                          kernel-module-nls-koi8-ru                         kernel-module-xt-hashlimit                        
  gdk-pixbuf-loader-png                             kernel-module-ipt-ulog                            kernel-module-nls-koi8-u                          kernel-module-xt-helper                           
  gdk-pixbuf-loader-xpm                             kernel-module-iptable-filter                      kernel-module-nls-utf8                            kernel-module-xt-hl                               
  gdk-pixbuf-locale-en-gb                           kernel-module-iptable-mangle                      kernel-module-p8022                               kernel-module-xt-length                           
  glib-networking                                   kernel-module-iptable-nat                         kernel-module-parport                             kernel-module-xt-limit                            
  glib-networking-locale-en-gb                      kernel-module-iptable-raw                         kernel-module-parport-pc                          kernel-module-xt-mac                              
  grep                                              kernel-module-khazad                              kernel-module-pktgen                              kernel-module-xt-mark                             
  gstreamer-vaapi                                   kernel-module-lcd                                 kernel-module-ppp-async                           kernel-module-xt-multiport                        
  gtk+-locale-en-gb                                 kernel-module-llc                                 kernel-module-ppp-deflate                         kernel-module-xt-nat                              
  harfbuzz                                          kernel-module-lp                                  kernel-module-ppp-generic                         kernel-module-xt-netmap                           
  kbd                                               kernel-module-md4                                 kernel-module-ppp-synctty                         kernel-module-xt-nflog                            
  kernel-module-8021q                               kernel-module-michael-mic                         kernel-module-pppoe                               kernel-module-xt-nfqueue                          
  kernel-module-8139cp                              kernel-module-minix                               kernel-module-pppox                               kernel-module-xt-pkttype                          
  kernel-module-8139too                             kernel-module-nbd                                 kernel-module-psnap                               kernel-module-xt-policy                           
  kernel-module-act-mirred                          kernel-module-nf-conntrack                        kernel-module-reiserfs                            kernel-module-xt-quota                            
  kernel-module-af-key                              kernel-module-nf-conntrack-amanda                 kernel-module-rng-core                            kernel-module-xt-realm                            
  kernel-module-ah4                                 kernel-module-nf-conntrack-broadcast              kernel-module-romfs                               kernel-module-xt-redirect                         
  kernel-module-amd-rng                             kernel-module-nf-conntrack-ftp                    kernel-module-rt2800lib                           kernel-module-xt-sctp                             
  kernel-module-ansi-cprng                          kernel-module-nf-conntrack-h323                   kernel-module-rt2800pci                           kernel-module-xt-state                            
  kernel-module-anubis                              kernel-module-nf-conntrack-ipv4                   kernel-module-rt2x00lib                           kernel-module-xt-statistic                        
  kernel-module-arp-tables                          kernel-module-nf-conntrack-irc                    kernel-module-rt2x00mmio                          kernel-module-xt-string                           
  kernel-module-arpt-mangle                         kernel-module-nf-conntrack-netbios-ns             kernel-module-rt2x00pci                           kernel-module-xt-tcpmss                           
  kernel-module-arptable-filter                     kernel-module-nf-conntrack-netlink                kernel-module-sch-cbq                             kernel-module-xt-tcpudp                           
  kernel-module-ath                                 kernel-module-nf-conntrack-pptp                   kernel-module-sch-codel                           kernel-module-xt-trace                            
  kernel-module-ath5k                               kernel-module-nf-conntrack-proto-gre              kernel-module-sch-dsmark                          kernel-module-xt-u32                              
  kernel-module-ath9k                               kernel-module-nf-conntrack-proto-sctp             kernel-module-sch-gred                            kernel-modules                                    
  kernel-module-ath9k-common                        kernel-module-nf-conntrack-proto-udplite          kernel-module-sch-hfsc                            kmod                                              
  kernel-module-ath9k-hw                            kernel-module-nf-conntrack-sane                   kernel-module-sch-htb                             libatk-1.0-0                                      
  kernel-module-atl1e                               kernel-module-nf-conntrack-sip                    kernel-module-sch-ingress                         libatk-1.0-locale-en-gb                           
  kernel-module-atl2                                kernel-module-nf-conntrack-tftp                   kernel-module-sch-netem                           libattr1                                          
  kernel-module-binfmt-misc                         kernel-module-nf-defrag-ipv4                      kernel-module-sch-prio                            libcairo2                                         
  kernel-module-blowfish-common                     kernel-module-nf-nat                              kernel-module-sch-red                             libdrm-intel1                                     
  kernel-module-blowfish-generic                    kernel-module-nf-nat-amanda                       kernel-module-sch-sfq                             libdrm2                                           
  kernel-module-bonding                             kernel-module-nf-nat-ftp                          kernel-module-sch-tbf                             libfm                                             
  kernel-module-brcmfmac                            kernel-module-nf-nat-h323                         kernel-module-sch-teql                            libfm-locale-en-gb                                
  kernel-module-brcmutil                            kernel-module-nf-nat-ipv4                         kernel-module-sctp                                libfreetype6                                      
  kernel-module-bridge                              kernel-module-nf-nat-irc                          kernel-module-seqiv                               libgl-mesa                                        
  kernel-module-bsd-comp                            kernel-module-nf-nat-pptp                         kernel-module-serpent-generic                     libglapi0                                         
  kernel-module-camellia-generic                    kernel-module-nf-nat-proto-gre                    kernel-module-sha256-generic                      libglib-2.0-0                                     
  kernel-module-cast-common                         kernel-module-nf-nat-proto-sctp                   kernel-module-sha512-generic                      libglib-2.0-locale-en-gb                          
  kernel-module-cast5-generic                       kernel-module-nf-nat-proto-udplite                kernel-module-slhc                                libgtk-2.0                                        
  kernel-module-cast6-generic                       kernel-module-nf-nat-sip                          kernel-module-slip                                libkmod2                                          
  kernel-module-cifs                                kernel-module-nf-nat-tftp                         kernel-module-softdog                             libpng16-16                                       
  kernel-module-configfs                            kernel-module-nfnetlink                           kernel-module-stp                                 libsm6                                            
  kernel-module-crc-ccitt                           kernel-module-nfnetlink-log                       kernel-module-tcrypt                              libsoup-2.4                                       
  kernel-module-crypto-null                         kernel-module-nfnetlink-queue                     kernel-module-tea                                 libsoup-2.4-locale-en-gb                          
  kernel-module-cryptoloop                          kernel-module-nls-ascii                           kernel-module-tipc                                libsqlite3-0                                      
  kernel-module-ctr                                 kernel-module-nls-cp1250                          kernel-module-ts-bm                               libva-intel-driver                                
  kernel-module-cuse                                kernel-module-nls-cp1251                          kernel-module-ts-fsm                              libx11-6                                          
  kernel-module-deflate                             kernel-module-nls-cp1255                          kernel-module-ts-kmp                              libx11-xcb1                                       
  kernel-module-dummy                               kernel-module-nls-cp737                           kernel-module-tun                                 libxmuu1                                          
  kernel-module-ecb                                 kernel-module-nls-cp775                           kernel-module-tunnel6                             libxrandr2                                        
  kernel-module-eeprom-93cx6                        kernel-module-nls-cp850                           kernel-module-twofish-common                      libxv1                                            
  kernel-module-esp4                                kernel-module-nls-cp852                           kernel-module-twofish-generic                     mesa-driver-i965                                  
  kernel-module-floppy                              kernel-module-nls-cp855                           kernel-module-usbtouchscreen                      mtdev                                             
  kernel-module-fuse                                kernel-module-nls-cp857                           kernel-module-uvcvideo                            ofono                                             
  kernel-module-gspca-main                          kernel-module-nls-cp860                           kernel-module-uvesafb                             pcmanfm                                           
  kernel-module-i2o-block                           kernel-module-nls-cp861                           kernel-module-v4l2-common                         pcmanfm-locale-en-gb                              
  kernel-module-i2o-config                          kernel-module-nls-cp862                           kernel-module-via-rng                             shared-mime-info                                  
  kernel-module-i2o-core                            kernel-module-nls-cp863                           kernel-module-videobuf2-core                      sudo                                              
  kernel-module-i2o-proc                            kernel-module-nls-cp864                           kernel-module-videobuf2-memops                    xauth                                             
  kernel-module-i2o-scsi                            kernel-module-nls-cp865                           kernel-module-videobuf2-vmalloc                   xf86-input-evdev                                  
  kernel-module-intel-rng                           kernel-module-nls-cp866                           kernel-module-videodev                            xf86-input-keyboard                               
  kernel-module-ip-tables                           kernel-module-nls-cp869                           kernel-module-wp512                               xf86-video-intel                                  
  kernel-module-ip6-tables                          kernel-module-nls-cp874                           kernel-module-x-tables                            xinit                                             
  kernel-module-ip6-tunnel                          kernel-module-nls-cp932                           kernel-module-xcbc                                xkeyboard-config                                  
  kernel-module-ip6t-eui64                          kernel-module-nls-cp936                           kernel-module-xfrm-ipcomp                         xkeyboard-config-locale-en-gb                     
  kernel-module-ip6t-frag                           kernel-module-nls-cp949                           kernel-module-xfrm-user                           xmodmap                                           
  kernel-module-ip6t-hbh                            kernel-module-nls-cp950                           kernel-module-xfrm4-tunnel                        xserver-xorg                                      
  kernel-module-ip6t-ipv6header                     kernel-module-nls-euc-jp                          kernel-module-xfrm6-tunnel                        xserver-xorg-extension-glx                        
  kernel-module-ip6t-rt                             kernel-module-nls-iso8859-13                      kernel-module-xt-classify                         xserver-xorg-module-libint10                      
  kernel-module-ip6table-filter                     kernel-module-nls-iso8859-14                      kernel-module-xt-comment                          xset                                              
  kernel-module-ip6table-mangle                     kernel-module-nls-iso8859-15                      kernel-module-xt-connbytes                        
  kernel-module-ip6table-raw                        kernel-module-nls-iso8859-2                       kernel-module-xt-connlimit                        
  kernel-module-ipcomp                              kernel-module-nls-iso8859-3                       kernel-module-xt-connmark                         

Installing packages (9):
  kernel-3.10.17-yocto-standard           kernel-module-bcma                      kernel-module-cordic                    libdricore9.2.2-1                       wayland                                 
  kernel-image-3.10.17-yocto-standard     kernel-module-brcmsmac                  kernel-module-crc8                      libva-wayland1                          

23.9MB of package files are needed. 11.9MB will be used.

root@nuc:~# reboot


b. nuc having the image in step 1 installed, after smart upgrade and reboot:
============================================================================

root@nuc:~# uname -a
Linux nuc 3.10.11-yocto-standard #1 SMP PREEMPT Wed Nov 20 12:26:09 EET 2013 x86_64 GNU/Linux 
* new kernel is not loaded

root@nuc:~# cat /etc/version
201311201141
* nothing changed, not normal

root@nuc:~# rpm -qa | grep connman
connman-1.19-r0.x86_64
* connman was update from 1.17 to 1.19

root@nuc:~# rpm -qa | grep dropbear
dropbear-2013.60-r0.x86_64
* dropbear was update from 2013.58-r1.0 to 2013.60-r0

root@nuc:~# ls -la /boot/
drwxr-xr-x    4 root     root          1024 Nov 20 11:56 .
drwxr-xr-x   17 root     root          4096 Nov 20 11:53 ..
lrwxrwxrwx    1 root     root            30 Nov 20 11:56 bzImage -> bzImage-3.10.17-yocto-standard
-rw-r--r--    1 root     root       6432912 Nov 20 10:00 bzImage-3.10.17-yocto-standard
drwxr-xr-x    4 root     root          1024 Nov 20 11:53 grub
drwx------    2 root     root         12288 Nov 20 11:52 lost+found
-rwxr-x---    1 root     root       6408880 Nov 20 11:53 vmlinuz

* the nu kernel is here under bzImage

root@nuc:~# cat /boot/grub/grub.cfg 
menuentry "Linux" {
    set root=(hd0,1)
    linux /vmlinuz root=/dev/sda2  rw    quiet
}
* the new kernel was not linked automatically

root@nuc:~# vi /boot/grub/grub.cfg
modify "linux /vmlinuz root=/dev/sda2  rw    quiet" with "linux /bzImage root=/dev/sda2  rw    quiet"

root@nuc:~# cat /boot/grub/grub.cfg 
menuentry "Linux" {
    set root=(hd0,1)
    linux /bzImage root=/dev/sda2  rw    quiet
}

reboot

root@nuc:~# uname -a
Linux nuc 3.10.17-yocto-standard #1 SMP PREEMPT Wed Nov 20 11:59:09 EET 2013 x86_64 GNU/Linux

root@nuc:~# connmand -v
1.19

Conclusion:

The upgrade process went perfectly and without any issue/errors.
As you can see from the above, all the packages were upgraded to their latest versions that could be found on the machine in step 2.
After the upgrade process was finished, I rebooted the nuc but the loaded kernel was the old one, see the grub.conf file.
In order to boot with the new kernel I had to modify the grub.cfg line "linux /vmlinuz root=/dev/sda2  rw    quiet" to "linux /bzImage root=/dev/sda2  rw    quiet". That should be done via the installer automatically and not by the user.

Cheers,
IonutC
Comment 6 Ross Burton 2013-11-20 16:08:00 UTC
Good stuff.  As a step 1, simply automatically running the "smart upgrade" and pass/failing depending on that working or not (i.e. conflicting files, broken packaging, etc) would be a great step forwards.
Comment 7 Alexandru Georgescu 2014-04-23 08:09:27 UTC
moved to 1.7
Comment 8 Paul Eggleton 2017-06-08 06:45:18 UTC
Reassigning this one to Libertad since she has been working in this area.
Comment 9 Randy MacLeod 2023-10-24 14:24:48 UTC
Bulk move from 4.99 or 0.00 to 5.99
Comment 10 Tim Orling 2026-06-25 15:27:34 UTC
In 2026 image based upgrades are more common.