docker framework does not install via ubuntu-device-flash

Bug #1465879 reported by Ben Howard
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
High
Sergio Schvezov

Bug Description

The Cloud Image team is looking at making images available with container frameworks pre-installed. However, we are unable to pre-install the Docker framework:

utlemming@utl-docker:/tmp$ sudo ubuntu-device-flash core rolling --channel=edge --output=/tmp/test2.img --cloud --size=10 --install=docker
Determining oem configuration
Starting download of generic-amd64
40.93 KB / 40.93 KB [======================================================================================] 100.00 % 160.98 KB/s
Done
Fetching information from server...
Downloading and setting up...
41.48 MB / 41.48 MB [========================================================================================] 100.00 % 9.03 MB/s
97.68 MB / 97.68 MB [=======================================================================================] 100.00 % 16.51 MB/s
Installing generic-amd64
Starting download of generic-amd64
40.93 KB / 40.93 KB [======================================================================================] 100.00 % 188.38 KB/s
Done
Installing docker
Starting download of docker
8.36 MB / 8.36 MB [========================================================================================] 100.00 % 134.37 KB/s
Done
unable to unmount dir for image: umount: /tmp/diskimage026966305/system: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

panic: cannot unmap mounted partitions

goroutine 1 [running, locked to thread]:
launchpad.net/goget-ubuntu-touch/diskimage.(*CoreGrubImage).Unmap(0xc208284500, 0x0, 0x0)
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/diskimage/core_grub.go:176 +0x9c
main.func·005()
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/ubuntu-device-flash/core.go:332 +0x11a
main.(*CoreCmd).setup(0xcf0920, 0x7fc3bc040110, 0xc208284500, 0xc2081c6180, 0x3, 0x7fc3bc041620, 0xc208251e80)
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/ubuntu-device-flash/core.go:367 +0xc37
main.func·004(0x0, 0x0)
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/ubuntu-device-flash/core.go:280 +0x171
main.(*CoreCmd).Execute(0xcf0920, 0xc20800a100, 0x1, 0x8, 0x0, 0x0)
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/ubuntu-device-flash/core.go:285 +0x20d9
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc2080566c0, 0xc20800a000, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0)
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/github.com/jessevdk/go-flags/parser.go:241 +0x8b8
main.main()
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/ubuntu-device-flash/main.go:62 +0x3ac

goroutine 5 [syscall, 1 minutes]:
os/signal.loop()
 /usr/lib/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
 /usr/lib/go/src/os/signal/signal_unix.go:27 +0x35

goroutine 6 [chan receive, 1 minutes]:
launchpad.net/snappy/partition.func·005()
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/snappy/partition/partition.go:270 +0x52
created by launchpad.net/snappy/partition.setupSignalHandler
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/snappy/partition/partition.go:275 +0x21e

goroutine 17 [syscall, 1 minutes, locked to thread]:
runtime.goexit()
 /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 109 [select]:
net/http.(*persistConn).writeLoop(0xc208296580)
 /usr/lib/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
 /usr/lib/go/src/net/http/transport.go:661 +0xcbc

goroutine 108 [IO wait]:
net.(*pollDesc).Wait(0xc208399330, 0x72, 0x0, 0x0)
 /usr/lib/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208399330, 0x0, 0x0)
 /usr/lib/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc2083992d0, 0xc208260000, 0x2000, 0x2000, 0x0, 0x7fc3bc033c40, 0xc2082526f0)
 /usr/lib/go/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc208036428, 0xc208260000, 0x2000, 0x2000, 0x0, 0x0, 0x0)
 /usr/lib/go/src/net/net.go:121 +0xdc
crypto/tls.(*block).readFromUntil(0xc20822c840, 0x7fc3bc0353e0, 0xc208036428, 0x5, 0x0, 0x0)
 /usr/lib/go/src/crypto/tls/conn.go:454 +0xe6
crypto/tls.(*Conn).readRecord(0xc20826c580, 0x17, 0x0, 0x0)
 /usr/lib/go/src/crypto/tls/conn.go:539 +0x2da
crypto/tls.(*Conn).Read(0xc20826c580, 0xc208287000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
 /usr/lib/go/src/crypto/tls/conn.go:904 +0x166
net/http.noteEOFReader.Read(0x7fc3bc03ae18, 0xc20826c580, 0xc2082965d8, 0xc208287000, 0x1000, 0x1000, 0x7dd8a0, 0x0, 0x0)
 /usr/lib/go/src/net/http/transport.go:1270 +0x6e
net/http.(*noteEOFReader).Read(0xc208248c00, 0xc208287000, 0x1000, 0x1000, 0xc208010000, 0x0, 0x0)
 <autogenerated>:125 +0xd4
bufio.(*Reader).fill(0xc208243ce0)
 /usr/lib/go/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).Peek(0xc208243ce0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
 /usr/lib/go/src/bufio/bufio.go:132 +0xf0
net/http.(*persistConn).readLoop(0xc208296580)
 /usr/lib/go/src/net/http/transport.go:842 +0xa4
created by net/http.(*Transport).dialConn
 /usr/lib/go/src/net/http/transport.go:660 +0xc9f

goroutine 81 [chan receive, 1 minutes]:
main.func·003()
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/ubuntu-device-flash/core.go:261 +0x1e8
created by main.(*CoreCmd).Execute
 /build/buildd/goget-ubuntu-touch-0.23/obj-x86_64-linux-gnu/src/launchpad.net/goget-ubuntu-touch/ubuntu-device-flash/core.go:264 +0x2015

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

With latest ubuntu-device-flash (from trunk) the error is different, and still fails:
rsalveti@evasys:/tmp/snappy$ sudo ubuntu-device-flash core 15.04 --channel edge --enable-ssh --developer-mode --install=docker --output x86.img
Determining oem configuration
Starting download of generic-amd64
40.93 KB / 40.93 KB [===============================================================================================================================================================================================================================] 100.00 % 58.47 KB/s
Done
Fetching information from server...
Downloading and setting up...
Installing generic-amd64
Starting download of generic-amd64
40.93 KB / 40.93 KB [===============================================================================================================================================================================================================================] 100.00 % 87.16 KB/s
Done
Installing docker
Starting download of docker
8.36 MB / 8.36 MB [================================================================================================================================================================================================================================] 100.00 % 498.45 KB/s
Done
docker failed to install: exit status 1

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Should we create a set of oem/gadgets that would include docker by default? Or you prefer using a generic oem and sideload additional snaps with --install?

Changed in snappy:
assignee: nobody → Sergio Schvezov (sergiusens)
Revision history for this message
Oliver Grawert (ogra) wrote :

btw, note that the "unable to unmount" error is most likely caused by using an outdated ubuntu-device-flash ...

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

ubuntu-device-flash 0.24-0ubuntu2 allows running with --install docker

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Can you give the PPA https://launchpad.net/~snappy-dev/+archive/ubuntu/tools-proposed a try and report back the results?

With that PPA (and ubuntu-device-flash 0.24-0ubuntu2), I was able to create an image with docker pre-installed:

rsalveti@evasys:/tmp/init$ sudo ubuntu-device-flash core 15.04 --channel edge --enable-ssh --developer-mode --install docker --output x86.img
[sudo] password for rsalveti:
Determining oem configuration
Starting download of generic-amd64
40.93 KB / 40.93 KB [] 100.00 % 89.51 KB/s
Done
Fetching information from server...
Downloading and setting up...
Installing generic-amd64
Starting download of generic-amd64
40.93 KB / 40.93 KB [] 100.00 % 89.25 KB/s
Done
Installing docker
Starting download of docker
8.36 MB / 8.36 MB [_] 100.00 % 617.14 KB/s
Done
Enabling developer mode...
New image complete
Summary:
 Output: x86.img
 Architecture: amd64
 Channel: edge
 Version: 92
Launch by running: kvm -m 768 x86.img

Changed in snappy:
status: Confirmed → Fix Committed
Revision history for this message
Michał Sawicz (saviq) wrote :

I had a similar error and the -proposed PPA did help (after a reboot, as I had some stale mounts and loop devices).

Changed in snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.