1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296 | vrruiz@vrruiz-MacBookPro:~/snap/snapd$ spreadtests.sh 192.168.1.43
+ INSTANCE_IP=192.168.1.43
+ INSTANCE_PORT=22
+ whoami
+ USER=vrruiz
+ execute_remote sudo adduser --extrausers --quiet --disabled-password --gecos '' test
+ ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22 vrruiz@192.168.1.43 sudo adduser --extrausers --quiet --disabled-password --gecos '' test
2016/12/16 16:28:25 Found /home/vrruiz/snap/snapd/spread.yaml.
error: $(HOST: ./generate-packaging-dir ubuntu 14.04) in project environment returned error: exit status 1
vrruiz@vrruiz-MacBookPro:~/snap/snapd$ vim generate-packaging-dir
vrruiz@vrruiz-MacBookPro:~/snap/snapd$ mv tests/main/ubuntu-core-upgrade
ubuntu-core-upgrade/ ubuntu-core-upgrade-no-gc/
vrruiz@vrruiz-MacBookPro:~/snap/snapd$ mv tests/main/ubuntu-core-upgrade* .
vrruiz@vrruiz-MacBookPro:~/snap/snapd$ vim spread.yaml
vrruiz@vrruiz-MacBookPro:~/snap/snapd$ spreadtests.sh 192.168.1.43
+ INSTANCE_IP=192.168.1.43
+ INSTANCE_PORT=22
+ whoami
+ USER=vrruiz
+ execute_remote sudo adduser --extrausers --quiet --disabled-password --gecos '' test
+ ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22 vrruiz@192.168.1.43 sudo adduser --extrausers --quiet --disabled-password --gecos '' test
2016/12/16 16:35:45 Found /home/vrruiz/snap/snapd/spread.yaml.
2016/12/16 16:35:46 Project content is packed for delivery (929.75KB).
2016/12/16 16:35:46 Reusing external:ubuntu-core-16-arm-64...
2016/12/16 16:35:48 Discarding external:ubuntu-core-16-arm-64, cannot connect: cannot connect to external:ubuntu-core-16-arm-64: dial tcp 192.168.1.43:22: getsockopt: no route to host
2016/12/16 16:35:48 Allocating external:ubuntu-core-16-arm-64...
2016/12/16 16:35:48 Waiting for external:ubuntu-core-16-arm-64 to make SSH available at 192.168.1.43:22...
2016/12/16 16:36:07 Cannot connect to external:ubuntu-core-16-arm-64: dial tcp 192.168.1.43:22: getsockopt: no route to host
2016/12/16 16:36:25 Cannot connect to external:ubuntu-core-16-arm-64: dial tcp 192.168.1.43:22: getsockopt: no route to host
2016/12/16 16:36:34 Cannot connect to external:ubuntu-core-16-arm-64: dial tcp 192.168.1.43:22: getsockopt: no route to host
2016/12/16 16:36:50 Cannot connect to external:ubuntu-core-16-arm-64: dial tcp 192.168.1.43:22: getsockopt: no route to host
2016/12/16 16:37:14 Cannot connect to external:ubuntu-core-16-arm-64: dial tcp 192.168.1.43:22: getsockopt: no route to host
2016/12/16 16:37:27 Cannot connect to external:ubuntu-core-16-arm-64: dial tcp 192.168.1.43:22: getsockopt: no route to host
2016/12/16 16:37:32 Allocated external:ubuntu-core-16-arm-64.
2016/12/16 16:37:32 Connecting to external:ubuntu-core-16-arm-64...
2016/12/16 16:37:32 Connected to external:ubuntu-core-16-arm-64 at 192.168.1.43:22.
2016/12/16 16:37:32 Sending project content to external:ubuntu-core-16-arm-64...
2016/12/16 16:37:33 Preparing project on external:ubuntu-core-16-arm-64...
2016/12/16 16:42:33 WARNING: external:ubuntu-core-16-arm-64 running late. Current output:
-----
mesg: ttyname failed: Inappropriate ioctl for device
+ '[' '' '!=' 1 ']'
+ . /home/gopath/src/github.com/snapcore/snapd/tests/lib/boot.sh
++ bootenv snap_mode
++ '[' 1 -eq 0 ']'
++ command -v grub-editenv
++ sed 's/^snap_mode=//'
++ fw_printenv snap_mode
+ '[' '' = try ']'
+ mkdir -p /etc/systemd/system/snapd.service.d
+ cat
+ mkdir -p /etc/systemd/system/snapd.socket.d
+ cat
+ '[' external = external ']'
+ '[' '!' -f /home/gopath/bin/snapbuild ']'
+ mkdir -p /home/gopath/bin
+ snap install --devmode --edge classic
classic (edge) 16.04 from 'canonical' installed
+ classic 'sudo apt update && apt install -y git golang-go build-essential'
Creating classic environment
Parallel unsquashfs: Using 4 processors
10609 inodes (11642 blocks) to write
[===========================================================|] 11642/11642 100%
created 8190 files
created 1411 directories
created 2330 symlinks
created 79 devices
created 0 fifos
(Reading database ... 12460 files and directories currently installed.)
Preparing to unpack .../apt_1.2.15ubuntu0.2_arm64.deb ...
Unpacking apt (1.2.15ubuntu0.2) over (1.2.15ubuntu0.2) ...
Selecting previously unselected package locales.
Preparing to unpack .../locales_2.23-0ubuntu5_all.deb ...
Unpacking locales (2.23-0ubuntu5) ...
Setting up apt (1.2.15ubuntu0.2) ...
Setting up locales (2.23-0ubuntu5) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/aarch64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Generating locales (this might take a while)...
Generation complete.
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Cannot determine calling user, logging into classic as root
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease [247 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease [102 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease [102 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease [102 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 Packages [1130 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports xenial/main Translation-en [568 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports xenial/restricted Translation-en [2908 B]
Get:8 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 Packages [7275 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports xenial/universe Translation-en [4354 kB]
63% [8 Packages store 0 B] [9 Translation-en 345 kB/4354 kB 8%]
-----
2016/12/16 16:45:11 Preparing external:ubuntu-core-16-arm-64:tests/main/...
2016/12/16 16:46:33 Preparing external:ubuntu-core-16-arm-64:tests/main/ubuntu-core-reboot...
2016/12/16 16:48:51 Executing external:ubuntu-core-16-arm-64:tests/main/ubuntu-core-reboot (1/85)...
2016/12/16 16:48:52 Rebooting external:ubuntu-core-16-arm-64 as requested...
2016/12/16 16:50:11 Error executing external:ubuntu-core-16-arm-64:tests/main/ubuntu-core-reboot :
-----
mesg: ttyname failed: Inappropriate ioctl for device
+ echo 'Ensure snaps are (still) there.'
Ensure snaps are (still) there.
+ snap list
+ grep test-snapd-tools
test-snapd-tools 1.0 x1 -
+ snap list
+ grep network-bind-consumer
network-bind-consumer 1.0 x1 -
+ echo 'Ensure the service is (still) running.'
Ensure the service is (still) running.
+ retries=10
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
active
+ echo 'Ensure apparmor profiles are (still) loaded.'
Ensure apparmor profiles are (still) loaded.
+ for app in success fail echo head env block cat
+ grep 'snap.test-snapd-tools.success (enforce)' /sys/kernel/security/apparmor/profiles
snap.test-snapd-tools.success (enforce)
+ for app in success fail echo head env block cat
+ grep 'snap.test-snapd-tools.fail (enforce)' /sys/kernel/security/apparmor/profiles
snap.test-snapd-tools.fail (enforce)
+ for app in success fail echo head env block cat
+ grep 'snap.test-snapd-tools.echo (enforce)' /sys/kernel/security/apparmor/profiles
snap.test-snapd-tools.echo (enforce)
+ for app in success fail echo head env block cat
+ grep 'snap.test-snapd-tools.head (enforce)' /sys/kernel/security/apparmor/profiles
snap.test-snapd-tools.head (enforce)
+ for app in success fail echo head env block cat
+ grep 'snap.test-snapd-tools.env (enforce)' /sys/kernel/security/apparmor/profiles
snap.test-snapd-tools.env (enforce)
+ for app in success fail echo head env block cat
+ grep 'snap.test-snapd-tools.block (enforce)' /sys/kernel/security/apparmor/profiles
snap.test-snapd-tools.block (enforce)
+ for app in success fail echo head env block cat
+ grep 'snap.test-snapd-tools.cat (enforce)' /sys/kernel/security/apparmor/profiles
snap.test-snapd-tools.cat (enforce)
+ '[' 0 = 0 ']'
+ REBOOT
<REBOOT>
+ echo 'Ensure snaps are (still) there.'
Ensure snaps are (still) there.
+ snap list
+ grep test-snapd-tools
test-snapd-tools 1.0 x1 -
+ snap list
+ grep network-bind-consumer
network-bind-consumer 1.0 x1 -
+ echo 'Ensure the service is (still) running.'
Ensure the service is (still) running.
+ retries=10
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 10 -eq 0 ']'
+ retries=9
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 9 -eq 0 ']'
+ retries=8
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 8 -eq 0 ']'
+ retries=7
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 7 -eq 0 ']'
+ retries=6
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 6 -eq 0 ']'
+ retries=5
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 5 -eq 0 ']'
+ retries=4
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 4 -eq 0 ']'
+ retries=3
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 3 -eq 0 ']'
+ retries=2
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 2 -eq 0 ']'
+ retries=1
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 1 -eq 0 ']'
+ retries=0
+ sleep 2
+ systemctl is-active snap.network-bind-consumer.network-consumer.service
inactive
+ '[' 0 -eq 0 ']'
+ echo 'Service did not activate.'
Service did not activate.
+ exit 1
-----
2016/12/16 16:51:07 Error debugging external:ubuntu-core-16-arm-64:tests/main/ubuntu-core-reboot :
-----
+ journalctl -u snapd
-- Logs begin at Fri 2016-12-16 09:12:11 UTC, end at Fri 2016-12-16 16:50:29 UTC. --
Dec 16 09:12:17 localhost.localdomain systemd[1]: Started Snappy daemon.
Dec 16 09:12:20 localhost.localdomain /usr/lib/snapd/snapd[1391]: daemon.go:207: DEBUG: init done in 3.156ms
Dec 16 09:12:26 localhost.localdomain /usr/lib/snapd/snapd[1391]: daemon.go:172: DEBUG: uid=0;@ GET /v2/snaps 5.868ms 200
Dec 16 09:12:26 localhost.localdomain /usr/lib/snapd/snapd[1391]: daemon.go:172: DEBUG: uid=0;@ GET /v2/snaps 5.402ms 200
+ dmesg
+ grep DENIED
-----
2016/12/16 16:51:07 Restoring external:ubuntu-core-16-arm-64:tests/main/ubuntu-core-reboot...
2016/12/16 16:51:49 Preparing external:ubuntu-core-16-arm-64:tests/main/snap-run-hook...
2016/12/16 16:51:56 Executing external:ubuntu-core-16-arm-64:tests/main/snap-run-hook (2/85)...
2016/12/16 16:52:03 Restoring external:ubuntu-core-16-arm-64:tests/main/snap-run-hook...
2016/12/16 16:52:41 Preparing external:ubuntu-core-16-arm-64:tests/main/op-remove-retry...
2016/12/16 16:52:56 Executing external:ubuntu-core-16-arm-64:tests/main/op-remove-retry (3/85)...
2016/12/16 16:53:11 Restoring external:ubuntu-core-16-arm-64:tests/main/op-remove-retry...
2016/12/16 16:53:46 Preparing external:ubuntu-core-16-arm-64:tests/main/interfaces-snapd-control...
2016/12/16 16:53:55 Executing external:ubuntu-core-16-arm-64:tests/main/interfaces-snapd-control (4/85)...
2016/12/16 16:54:12 Restoring external:ubuntu-core-16-arm-64:tests/main/interfaces-snapd-control...
2016/12/16 16:54:53 Preparing external:ubuntu-core-16-arm-64:tests/main/interfaces-udev...
2016/12/16 16:59:53 WARNING: external:ubuntu-core-16-arm-64 running late. Current output:
-----
mesg: ttyname failed: Inappropriate ioctl for device
+ '[' ubuntu-core-16-arm-64 '!=' ubuntu-14.04-64 ']'
+ journalctl --rotate
+ sleep .1
+ journalctl --vacuum-time=1ms
Deleted archived journal /run/log/journal/c6e4bae9916a4c60938e7b6cb1732d85/system@f303f167447d4e32881a0b1218aecc98-00000000000003de-000543c969dcf6f5.journal (1012.0K).
Vacuuming done, freed 1012.0K of archived journals on disk.
+ dmesg -c
+ echo 'Given a snap declaring a slot with associated udev rules is installed'
Given a snap declaring a slot with associated udev rules is installed
+ snapbuild /home/gopath/src/github.com/snapcore/snapd/tests/lib/snaps/modem-manager-consumer .
built: modem-manager-consumer_1.0_all.snap
+ snap install --dangerous modem-manager-consumer_1.0_all.snap
[\] Copy snap "modem-manager-consumer" data
-----
2016/12/16 17:04:53 WARNING: external:ubuntu-core-16-arm-64 running late. Current output:
-----
(...)
[\] Copy snap "modem-manager-consumer" data
-----
2016/12/16 17:09:52 Error preparing external:ubuntu-core-16-arm-64:tests/main/interfaces-udev :
-----
+ '[' ubuntu-core-16-arm-64 '!=' ubuntu-14.04-64 ']'
+ journalctl --rotate
+ sleep .1
+ journalctl --vacuum-time=1ms
Deleted archived journal /run/log/journal/c6e4bae9916a4c60938e7b6cb1732d85/system@f303f167447d4e32881a0b1218aecc98-00000000000003de-000543c969dcf6f5.journal (1012.0K).
Vacuuming done, freed 1012.0K of archived journals on disk.
+ dmesg -c
+ echo 'Given a snap declaring a slot with associated udev rules is installed'
Given a snap declaring a slot with associated udev rules is installed
+ snapbuild /home/gopath/src/github.com/snapcore/snapd/tests/lib/snaps/modem-manager-consumer .
built: modem-manager-consumer_1.0_all.snap
+ snap install --dangerous modem-manager-consumer_1.0_all.snap
[\] Copy snap "modem-manager-consumer" data
<kill-timeout reached>
-----
2016/12/16 17:25:17 Error debugging external:ubuntu-core-16-arm-64:tests/main/interfaces-udev : ssh: unexpected packet in response to channel open: <nil>
2016/12/16 17:25:17 Restoring external:ubuntu-core-16-arm-64:tests/main/interfaces-udev...
2016/12/16 17:25:17 Error restoring external:ubuntu-core-16-arm-64:tests/main/interfaces-udev : read tcp 192.168.1.47:44228->192.168.1.43:22: read: no route to host
2016/12/16 17:25:17 Restoring external:ubuntu-core-16-arm-64:tests/main/...
2016/12/16 17:25:17 Error restoring external:ubuntu-core-16-arm-64:tests/main/ : read tcp 192.168.1.47:44228->192.168.1.43:22: read: no route to host
2016/12/16 17:25:17 Restoring project on external:ubuntu-core-16-arm-64...
2016/12/16 17:25:17 Error restoring project on external:ubuntu-core-16-arm-64 : read tcp 192.168.1.47:44228->192.168.1.43:22: read: no route to host
2016/12/16 17:25:17 Successful tasks: 3
2016/12/16 17:25:17 Aborted tasks: 81
2016/12/16 17:25:17 Failed tasks: 1
- external:ubuntu-core-16-arm-64:tests/main/ubuntu-core-reboot
2016/12/16 17:25:17 Failed task prepare: 1
- external:ubuntu-core-16-arm-64:tests/main/interfaces-udev
2016/12/16 17:25:17 Failed task restore: 1
- external:ubuntu-core-16-arm-64:tests/main/interfaces-udev
2016/12/16 17:25:17 Failed suite restore: 1
- external:ubuntu-core-16-arm-64:tests/main/
2016/12/16 17:25:17 Failed project restore: 1
- external:ubuntu-core-16-arm-64:project
2016/12/16 17:25:17 Keeping external:ubuntu-core-16-arm-64 at 192.168.1.43:22
error: unsuccessful run
|