Skip to content

Instantly share code, notes, and snippets.

@sergiusens
Last active August 29, 2015 14:18
Show Gist options
  • Save sergiusens/ae4292783be91c338703 to your computer and use it in GitHub Desktop.
Save sergiusens/ae4292783be91c338703 to your computer and use it in GitHub Desktop.
Snappy revno 4 candidate testing for bbb

Using the version -1 technique

Update Test: Check that system by updated to latest rootfs version

(BeagleBoneBlack)ubuntu@localhost:~$ snappy list -v
Name             Date       Version Developer  
ubuntu-core*     2015-04-10 119                
ubuntu-core      2015-04-10 119                
beagleboneblack* 2015-04-10 1.4     sergiusens 
(BeagleBoneBlack)ubuntu@localhost:~$ snappy list --updates
Name                       Date       Version 
ubuntu-core*               2015-04-10 220     
beagleboneblack.sergiusens 2015-04-10 1.4     

First try

Starting download of ubuntu-core took 20 minutes to appear

sudo snappy update
Starting download of ubuntu-core
104.54 MB / 104.54 MB [====================================] 100.00 % 1.48 MB/s 
Done
error from system-image-cli: ('%s exited with %s:\n%s', ['ubuntu-core-upgrade'], 1, "['/sbin/mkfs', '-v-t', 'ext4', '-L', 'system-b', '/dev/mmcblk0p3'] returned 1: , mkfs.ext2: invalid option -- '-'\nUsage: mkfs.ext2 [-c|-l filename] [-b block-size] [-C cluster-size]\n\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n\t[-G flex-group-size] [-N number-of-inodes]\n\t[-m reserved-blocks-percentage] [-o creator-os]\n\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n\t[-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]\n\nI: prepar")

Second try

Details

(BeagleBoneBlack)ubuntu@localhost:~$ snappy list --verbose
Name             Date       Version Developer  
ubuntu-core*     2015-04-10 119                
ubuntu-core      2015-04-10 119                
beagleboneblack* 2015-04-10 1.4     sergiusens 
(BeagleBoneBlack)ubuntu@localhost:~$ snappy list --updates
Name                       Date       Version 
ubuntu-core*               2015-04-10 220     
beagleboneblack.sergiusens 2015-04-10 1.4     

Upgrade

is taking long again

Rollback Test: Check that system be reverted to the previous rootfs

Re-update Test: Check that rolled-back system can be updated again

Update Test: Check that system by updated to latest rootfs version

(BeagleBoneBlack)ubuntu@localhost:~$ grep core /etc/system-image/channel.ini
channel: ubuntu-core/devel-proposed
(BeagleBoneBlack)ubuntu@localhost:~$ grep core /writable/cache/system/etc/system-image/channel.ini
channel: ubuntu-core/devel-proposed

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy versions --all
 Part                        Tag   Installed  Available  Fingerprint     Active  
 ubuntu-core                 edge  3          220        d3fe721a35104a  *       
 ubuntu-core                 edge  3          -          d3fe721a35104a  -       
 beagleboneblack.sergiusens  edge  1.4        -          no-hash         -       

(BeagleBoneBlack)ubuntu@localhost:~$ snappy-go list --updates
Name                       Date       Version 
ubuntu-core*               2015-04-10 220     
beagleboneblack.sergiusens 2015-04-10 1.4    

this took insanely too long

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy update
ubuntu-core    109 MB     [==========================================]    OK    
Applying: Done
Reboot to use the new ubuntu-core.

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy versions --all
Part                        Tag   Installed  Available  Fingerprint     Active  
ubuntu-core                 edge  3          220        d3fe721a35104a  *       
ubuntu-core                 edge  220        -          922434bfd9cb49  R       
beagleboneblack.sergiusens  edge  1.4        -          no-hash         -       
Reboot to use the new ubuntu-core.
(BeagleBoneBlack)ubuntu@localhost:~$ snappy-go list --updates
Name                       Date       Version 
ubuntu-core                2015-04-10 3       
beagleboneblack.sergiusens 2015-04-10 1.4     
(BeagleBoneBlack)ubuntu@localhost:~$ snappy-go list --verbose
Name                        Date       Version Summary                 
ubuntu-core*                2015-04-10 3       ubuntu-core description 
ubuntu-core                 2015-04-10 220     ubuntu-core description 
beagleboneblack.sergiusens* 2015-04-10 1.4                             
Reboot to use the new ubuntu-core.

sudo reboot

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy list --verbose
Name             Date       Version Developer  
ubuntu-core*     2015-04-10 220                
ubuntu-core      2015-04-10 3                  
beagleboneblack* 2015-04-10 1.4     sergiusens 

The py version fails to work in the latest devel-proposed

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy-py versions --all
Traceback (most recent call last):
  File "/usr/bin/snappy-py", line 25, in <module>
    status = Main().__main__()
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 193, in __main__
    return callback(args)
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 326, in _do_versions
    si_versions = SystemImageDataSource().versions(all)
  File "/usr/lib/python3/dist-packages/snappy/systemimage.py", line 221, in versions
    other_part = self.get_other_part()
  File "/usr/lib/python3/dist-packages/snappy/systemimage.py", line 327, in get_other_part
    other_detail.encode("utf-8")).hexdigest()
AttributeError: 'NoneType' object has no attribute 'encode'

Rollback Test: Check that system be reverted to the previous rootfs

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy rollback ubuntu-core
Setting ubuntu-core to version 3
(BeagleBoneBlack)ubuntu@localhost:~$ snappy list --verbose
Name             Date       Version Developer  
ubuntu-core*     2015-04-10 220                
ubuntu-core!     2015-04-10 3                  
beagleboneblack* 2015-04-10 1.4     sergiusens 
Reboot to use ubuntu-core version 3.

sudo reboot

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy versions --all
Part                        Tag   Installed  Available  Fingerprint     Active  
ubuntu-core                 edge  3          220        d3fe721a35104a  *       
ubuntu-core                 edge  220        -          922434bfd9cb49  R       
beagleboneblack.sergiusens  edge  1.4        -          no-hash         -       
Run 'snappy update' and reboot to use the new ubuntu-core.

Re-update Test: Check that rolled-back system can be updated again

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy update
Reboot to use the new ubuntu-core.
(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy versions --all
Part                        Tag   Installed  Available  Fingerprint     Active  
ubuntu-core                 edge  3          220        d3fe721a35104a  *       
ubuntu-core                 edge  220        -          922434bfd9cb49  R       
beagleboneblack.sergiusens  edge  1.4        -          no-hash         -       
Reboot to use the new ubuntu-core.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment