trap error on precise

Bug #1019137 reported by Yongqin Liu on 2012-06-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA master image scripts
Medium
Yongqin Liu

Bug Description

not know if have relation the system automatically update

13:16:52 liuyq:lava-master-image-scripts$ ./lava-create-master panda -r 2G
LAVA master images are easy to make, just three steps:
Note: run with --verbose to see details

1) Preparing vanilla Linaro image
2) Converting vanilla image to LAVA master image
add map loop0p1 (253:0): 0 106496 linear /dev/loop0 8192
add map loop0p2 (253:1): 0 1982464 linear /dev/loop0 114688
trap: usage: trap [-lp] [[arg] signal_spec ...]
umount: /tmp/tmp.lV5Zjmsb8D.lava.panda.master: not found
./lava-create-master: line 249: 6637 Terminated udisks --inhibit > /dev/null 2>&1
13:16:58 liuyq:lava-master-image-scripts$

executed with -x option
13:16:20 liuyq:lava-master-image-scripts$ ./lava-create-master panda -r 2G
+ set -e
+ LAVA_VERSION=2012.05
+ LAVA_URL=https://launchpad.net/lava-master-image-scripts
+ COMMON_ROOTFS=linaro-o-nano-tar-20120221-0.tar.gz
+ COMMON_ROOTFS_URL=http://releases.linaro.org/12.02/ubuntu/oneiric-images/nano/linaro-o-nano-tar-20120221-0.tar.gz
+ COMMON_ROOTFS_MD5=0d98d935488b56bbd8b291315944bb7d
+ export VERBOSE=
+ VERBOSE=
+ export DEBUG=
+ DEBUG=
+ export ROOTFS_SIZE=4G
+ ROOTFS_SIZE=4G
+ dev=
+ LAVA_SUPPORTED=0
+ REBUILD_VANILLA=
+ '[' x = x ']'
+ XDG_CACHE_HOME=/home/liuyq/.cache
+ CACHE_DIR=/home/liuyq/.cache/lava/master-image-scripts
+ OUTPUT_IMAGE=
+ main panda -r 2G
+ os_check
+ case `lsb_release -i -s` in
++ lsb_release -i -s
+ case `lsb_release -c -s` in
++ lsb_release -c -s
+ export LAVA_SUPPORTED=1
+ LAVA_SUPPORTED=1
+ '[' 1 = 0 ']'
+ parse_argv panda -r 2G
+ test -n panda
+ case "$1" in
+ '[' -n '' ']'
+ dev=panda
+ '[' x = x ']'
+ OUTPUT_IMAGE=panda-master.img
+ shift
+ test -n -r
+ case "$1" in
+ ROOTFS_SIZE=2G
+ shift 2
+ test -n ''
+ '[' -z panda ']'
+ load_board_config
+ '[' -r boards.d/panda.conf ']'
+ . boards.d/panda.conf
++ DESC='TI Panda Board (43xx and 46xx)'
++ ROOTFS=linaro-o-nano-tar-20120221-0.tar.gz
++ ROOTFS_URL=http://releases.linaro.org/12.02/ubuntu/oneiric-images/nano/linaro-o-nano-tar-20120221-0.tar.gz
++ ROOTFS_MD5=0d98d935488b56bbd8b291315944bb7d
++ ROOTFS_PARTITION=2
++ HWPACK=hwpack_linaro-lt-panda_20120221-1_armel_supported.tar.gz
++ HWPACK_URL=http://releases.linaro.org/12.02/ubuntu/oneiric-images/nano/hwpack_linaro-lt-panda_20120221-1_armel_supported.tar.gz
++ HWPACK_MD5=67da422b8ed81b6dba80fd57882d3ac0
++ LMC_DEV=panda
++ LAVA_DEV=lava:panda
++ LICENSE_WRAP=
+ rerun_via_sudo panda -r 2G
++ id -u
+ '[' 1000 '!=' 0 ']'
+ exec sudo ./lava-create-master panda -r 2G
+ set -e
+ LAVA_VERSION=2012.05
+ LAVA_URL=https://launchpad.net/lava-master-image-scripts
+ COMMON_ROOTFS=linaro-o-nano-tar-20120221-0.tar.gz
+ COMMON_ROOTFS_URL=http://releases.linaro.org/12.02/ubuntu/oneiric-images/nano/linaro-o-nano-tar-20120221-0.tar.gz
+ COMMON_ROOTFS_MD5=0d98d935488b56bbd8b291315944bb7d
+ export VERBOSE=
+ VERBOSE=
+ export DEBUG=
+ DEBUG=
+ export ROOTFS_SIZE=4G
+ ROOTFS_SIZE=4G
+ dev=
+ LAVA_SUPPORTED=0
+ REBUILD_VANILLA=
+ '[' x = x ']'
+ XDG_CACHE_HOME=/home/liuyq/.cache
+ CACHE_DIR=/home/liuyq/.cache/lava/master-image-scripts
+ OUTPUT_IMAGE=
+ main panda -r 2G
+ os_check
+ case `lsb_release -i -s` in
++ lsb_release -i -s
+ case `lsb_release -c -s` in
++ lsb_release -c -s
+ export LAVA_SUPPORTED=1
+ LAVA_SUPPORTED=1
+ '[' 1 = 0 ']'
+ parse_argv panda -r 2G
+ test -n panda
+ case "$1" in
+ '[' -n '' ']'
+ dev=panda
+ '[' x = x ']'
+ OUTPUT_IMAGE=panda-master.img
+ shift
+ test -n -r
+ case "$1" in
+ ROOTFS_SIZE=2G
+ shift 2
+ test -n ''
+ '[' -z panda ']'
+ load_board_config
+ '[' -r boards.d/panda.conf ']'
+ . boards.d/panda.conf
++ DESC='TI Panda Board (43xx and 46xx)'
++ ROOTFS=linaro-o-nano-tar-20120221-0.tar.gz
++ ROOTFS_URL=http://releases.linaro.org/12.02/ubuntu/oneiric-images/nano/linaro-o-nano-tar-20120221-0.tar.gz
++ ROOTFS_MD5=0d98d935488b56bbd8b291315944bb7d
++ ROOTFS_PARTITION=2
++ HWPACK=hwpack_linaro-lt-panda_20120221-1_armel_supported.tar.gz
++ HWPACK_URL=http://releases.linaro.org/12.02/ubuntu/oneiric-images/nano/hwpack_linaro-lt-panda_20120221-1_armel_supported.tar.gz
++ HWPACK_MD5=67da422b8ed81b6dba80fd57882d3ac0
++ LMC_DEV=panda
++ LAVA_DEV=lava:panda
++ LICENSE_WRAP=
+ rerun_via_sudo panda -r 2G
++ id -u
+ '[' 0 '!=' 0 ']'
+ '[' -z liuyq ']'
+ make_master
++ which kpartx
+ '[' -z /sbin/kpartx ']'
+ trap cleanup EXIT
+ echo 'LAVA master images are easy to make, just three steps:'
LAVA master images are easy to make, just three steps:
+ not_verbose 'Note: run with --verbose to see details'
+ test -n ''
+ echo 'Note: run with --verbose to see details'
Note: run with --verbose to see details
+ echo

+ enable_proxy_and_fix_locale
+ . /etc/environment
++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
++ LANG=en_US.UTF-8
++ LANGUAGE=en
++ LC_NUMERIC=zh_CN.UTF-8
++ LC_TIME=zh_CN.UTF-8
++ LC_MONETARY=zh_CN.UTF-8
++ LC_PAPER=zh_CN.UTF-8
++ LC_IDENTIFICATION=zh_CN.UTF-8
++ LC_NAME=zh_CN.UTF-8
++ LC_ADDRESS=zh_CN.UTF-8
++ LC_TELEPHONE=zh_CN.UTF-8
++ LC_MEASUREMENT=zh_CN.UTF-8
+ test -n ''
+ export LANG=C.UTF-8
+ LANG=C.UTF-8
+ echo '1) Preparing vanilla Linaro image'
1) Preparing vanilla Linaro image
++ which dconf
+ '[' -n /usr/bin/dconf ']'
+ '[' -n '' ']'
++ which udisks
+ '[' -n /usr/bin/udisks ']'
+ verbose ' * Inhibiting udisks...'
+ test -n ''
+ :
+ UDISKS_INHIBIT_PID=6507
+ '[' -e /home/liuyq/.cache/lava/master-image-scripts/pristine-images/panda-vanilla.img ']'
+ udisks --inhibit
+ '[' -z '' ']'
+ verbose ' * Re-using existing vanilla image: /home/liuyq/.cache/lava/master-image-scripts/pristine-images/panda-vanilla.img'
+ test -n ''
+ :
+ echo '2) Converting vanilla image to LAVA master image'
2) Converting vanilla image to LAVA master image
+ verbose ' * Creating a copy of vanilla image...'
+ test -n ''
+ :
+ cp /home/liuyq/.cache/lava/master-image-scripts/pristine-images/panda-vanilla.img panda-master.img
+ verbose ' * Attaching master image to loopback device...'
+ test -n ''
+ :
++ losetup --show --find panda-master.img
+ LOOP_DEV=/dev/loop0
+ verbose ' * Adding partitions to the loopback device...'
+ test -n ''
+ :
+ kpartx -av /dev/loop0
add map loop0p1 (253:0): 0 106496 linear /dev/loop0 8192
add map loop0p2 (253:1): 0 1982464 linear /dev/loop0 114688
+ verbose ' * Creating temporary mount point for rootfs...'
+ test -n ''
+ :
++ mktemp --directory --suffix .lava.panda.master
+ MASTER_MNT=/tmp/tmp.FDVgPGa288.lava.panda.master
+ verbose ' * Mounting rootfs...'
+ test -n ''
+ :
++ basename /dev/loop0
+ LOOP_NAME=loop0
+ mount /dev/mapper/loop0p2 /tmp/tmp.FDVgPGa288.lava.panda.master
+ verbose ' * Changing hostname to '\''master'\''...'
+ test -n ''
+ :
+ sed -e s/linaro-nano/master/ -i /tmp/tmp.FDVgPGa288.lava.panda.master/etc/hostname /tmp/tmp.FDVgPGa288.lava.panda.master/etc/hosts
+ grep --quiet '--regexp=auto eth0' /tmp/tmp.FDVgPGa288.lava.panda.master/etc/network/interfaces
+ verbose ' * Applying master image overlay to rootfs...'
+ test -n ''
+ :
+ tar -C master-rootfs-extras -c .
+ tar -C /tmp/tmp.FDVgPGa288.lava.panda.master -x --no-same-owner --no-same-permissions
+ verbose ' * Preparing device.conf file...'
+ test -n ''
+ :
++ python -c 'import uuid; print uuid.uuid1()'
+ sed -e 's!@LAVA_MASTER_IMAGE_UUID@!96b3eedc-c1a9-11e1-95c4-14feb5debdb9!' -e 's!@LAVA_MASTER_IMAGE_ROOTFS@!linaro-o-nano-tar-20120221-0.tar.gz!' -e 's!@LAVA_MASTER_IMAGE_HWPACK@!hwpack_linaro-lt-panda_20120221-1_armel_supported.tar.gz!' -e 's!@LAVA_DEVICE_TYPE@!lava:panda!' -i /tmp/tmp.FDVgPGa288.lava.panda.master/var/lib/lava/device.conf
+ verbose ' * Expanding version strings used by lava scripts...'
+ test -n ''
+ :
+ sed -e 's!@LAVA_VERSION@!2012.05!' -e 's!@LAVA_URL@!https://launchpad.net/lava-master-image-scripts!' -e 's!@LAVA_ROOTFS_SIZE@!2G!' -i /tmp/tmp.FDVgPGa288.lava.panda.master/lib/lava/common
+ chown_to_user panda-master.img
++ id -gn
+ chown liuyq.root panda-master.img
+ cleanup
+ '[' -n /tmp/tmp.FDVgPGa288.lava.panda.master ']'
+ verbose ' * Unmounting master rootfs...'
+ test -n ''
+ :
+ umount /tmp/tmp.FDVgPGa288.lava.panda.master
+ rmdir /tmp/tmp.FDVgPGa288.lava.panda.master
+ '[' -n /dev/loop0 ']'
+ verbose ' * Removing loopback device partitions...'
+ test -n ''
+ :
+ kpartx -d /dev/loop0
+ verbose ' * Detaching loopback device...'
+ test -n ''
+ :
+ losetup --detach /dev/loop0
+ '[' -n 6507 ']'
+ verbose ' * Stopping udisks --inhibit'
+ test -n ''
+ :
+ kill 6507
+ '[' -n '' ']'
+ '[' -n '' ']'
+ trap EXIT
trap: usage: trap [-lp] [[arg] signal_spec ...]
+ cleanup
+ '[' -n /tmp/tmp.FDVgPGa288.lava.panda.master ']'
+ verbose ' * Unmounting master rootfs...'
+ test -n ''
+ :
+ umount /tmp/tmp.FDVgPGa288.lava.panda.master
umount: /tmp/tmp.FDVgPGa288.lava.panda.master: not found
./lava-create-master: line 249: 6507 Terminated udisks --inhibit > /dev/null 2>&1
13:16:32 liuyq:lava-master-image-scripts$

Related branches

Yongqin Liu (liuyq0307) on 2012-06-29
Changed in lava-master-image-scripts:
importance: Undecided → Medium
Yongqin Liu (liuyq0307) wrote :

my bash version.

13:31:42 liuyq:lava-master-image-scripts$ bash -version
GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
13:33:01 liuyq:lava-master-image-scripts$

Seems the need to set the "-" arg for trap on EXIT

Yongqin Liu (liuyq0307) on 2012-06-29
Changed in lava-master-image-scripts:
status: New → In Progress
assignee: nobody → Yongqin Liu (liuyq0307)
Yongqin Liu (liuyq0307) on 2012-07-03
Changed in lava-master-image-scripts:
status: In Progress → Fix Committed
Yongqin Liu (liuyq0307) wrote :

Hi, fabo
there is no 12.07 in the "Target to milestone" for lava-master-image-scripts.

Thanks,
Yongqin Liu

Andy Doan (doanac) wrote :

12.07 milestone created and set for this bug.

Changed in lava-master-image-scripts:
milestone: none → 2012.07
Fathi Boudra (fboudra) on 2012-08-03
Changed in lava-master-image-scripts:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers