Merge lp:~chipaca/snappy/firstboot-ordering into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by John Lenton
Status: Merged
Approved by: Michael Vogt
Approved revision: 795
Merged at revision: 794
Proposed branch: lp:~chipaca/snappy/firstboot-ordering
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 90 lines (+2/-31)
3 files modified
debian/ubuntu-snappy.firstboot.service (+2/-1)
snappy/firstboot.go (+0/-5)
snappy/firstboot_test.go (+0/-25)
To merge this branch: bzr merge lp:~chipaca/snappy/firstboot-ordering
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Federico Gimenez (community) test Approve
Review via email: mp+275244@code.launchpad.net

Commit message

Make firstboot happen before ifup.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

This is not the whole story.

cloud-init.service needs a Requires=networking.service

(or networking.target needs a Requires=networking.service, or something like that)

...

and on further testing, that might not be enough.

WIll conitnue with this in the morning.

Revision history for this message
Michael Vogt (mvo) wrote :

\o/

Revision history for this message
Michael Vogt (mvo) wrote :

Nice! Thanks a lot for finding this.

review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (9.3 KiB)

The attempt to merge lp:~chipaca/snappy/firstboot-ordering into lp:snappy failed. Below is the output from the failed tests.

Checking docs
Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/blakesmith/ar failed; trying to fetch newer version
update github.com/coreos/go-systemd failed; trying to fetch newer version
github.com/blakesmith/ar now at c9a977dd0cc1392b023382c7bfa5a22af8d3b730
update github.com/gorilla/context failed; trying to fetch newer version
github.com/coreos/go-systemd now at f743bc15d6bddd23662280b4ad20f7c874cdd5ad
update github.com/jessevdk/go-flags failed; trying to fetch newer version
github.com/gorilla/context now at 1c83b3eabd45b6d76072b66b746c20815fb2872d
update golang.org/x/crypto failed; trying to fetch newer version
github.com/jessevdk/go-flags now at 1acbbaff2f347c412a0c7884873bd72cc9c1f5b4
update gopkg.in/yaml.v2 failed; trying to fetch newer version
golang.org/x/crypto now at 60052bd85f2d91293457e8811b0cf26b773de469
update github.com/gorilla/mux failed; trying to fetch newer version
gopkg.in/yaml.v2 now at 49c95bdc21843256fb6c4e0d370a05f24a0bf213
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/gorilla/mux now at ee1815431e497d3850809578c93ab6705f1a19f7
update github.com/cheggaaa/pb failed; trying to fetch newer version
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
update github.com/mvo5/uboot-go failed; trying to fetch newer version
github.com/cheggaaa/pb now at e8c7cc515bfde3e267957a3b110080ceed51354e
update gopkg.in/check.v1 failed; trying to fetch newer version
github.com/mvo5/uboot-go now at 361f6ebcbb54f389d15dc9faefa000e996ba3e37
update github.com/gosexy/gettext failed; trying to fetch newer version
gopkg.in/check.v1 now at 64131543e7896d5bcc6bd5a76287eb75ea96c673
update github.com/peterh/liner failed; trying to fetch newer version
github.com/gosexy/gettext now at 98b7b91596d20b96909e6b60d57411547dd9959c
update gopkg.in/tomb.v2 failed; trying to fetch newer version
github.com/peterh/liner now at 1bb0d1c1a25ed393d8feb09bab039b2b1b1fbced
update code.google.com/p/go.crypto failed; trying to fetch newer version
gopkg.in/tomb.v2 now at 14b3d72120e8d10ea6e6b7f87f7175734b1faab8
code.google.com/p/go.crypto now at 69e2a90ed92d03812364aeb947b7068dc42e561e
Building
Running tests from /tmp/tmp.A55ZfXiwFN/src/launchpad.net/snappy
? launchpad.net/snappy/cmd/snapd [no test files]
=== RUN Test
OK: 12 passed
--- PASS: Test (0.03 seconds)
PASS
coverage: 21.2% of statements
ok launchpad.net/snappy/cmd/snappy 0.041s coverage: 21.2% of statements
=== RUN Test
OK: 53 passed
--- PASS: Test (0.44 seconds)
PASS
coverage: 91.7% of statements
ok launchpad.net/snappy/coreconfig 0.452s coverage: 91.7% of statements
=== RUN Test
OK: 39 passed
--- PASS: Test (0.22 seconds)
PASS
coverage: 69.8% of statements
ok launchpad.net/snappy/daemon 0.239s coverage: 69.8% of statements
? launchpad.net/snappy/dirs [no test files]
=== RUN Test
OK: 59 passed
--- PASS: Test (0.46 seconds)
PASS
coverage: 78.9% of statements
ok launchpad.net/snappy/helpers 0.472s coverage: 78.9% of statements
=== RUN Test
OK: 0 passed, 2 skipped...

Read more...

795. By John Lenton

nuke tests that aren't applicable any more

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Works fine on amd64 after adding the new binary and the modified unit to the image

review: Approve (test)
Revision history for this message
Michael Vogt (mvo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/ubuntu-snappy.firstboot.service'
2--- debian/ubuntu-snappy.firstboot.service 2015-04-19 08:21:54 +0000
3+++ debian/ubuntu-snappy.firstboot.service 2015-10-22 10:12:56 +0000
4@@ -1,6 +1,7 @@
5 [Unit]
6 Description=Run snappy firstboot setup
7-Before=cloud-init.service
8+After=local-fs.target
9+Before=system-ifup.slice cloud-init-local.service cloud-init.service
10
11 [Service]
12 Type=oneshot
13
14=== modified file 'snappy/firstboot.go'
15--- snappy/firstboot.go 2015-09-23 12:07:42 +0000
16+++ snappy/firstboot.go 2015-10-22 10:12:56 +0000
17@@ -28,7 +28,6 @@
18
19 "launchpad.net/snappy/helpers"
20 "launchpad.net/snappy/pkg"
21- "launchpad.net/snappy/systemd"
22
23 "gopkg.in/yaml.v2"
24 )
25@@ -140,10 +139,6 @@
26 return err
27 }
28
29- if _, err := systemd.SystemctlCmd("restart", "networking", "--no-block"); err != nil {
30- return err
31- }
32-
33 return nil
34 }
35
36
37=== modified file 'snappy/firstboot_test.go'
38--- snappy/firstboot_test.go 2015-09-23 12:07:42 +0000
39+++ snappy/firstboot_test.go 2015-10-22 10:12:56 +0000
40@@ -28,7 +28,6 @@
41 . "gopkg.in/check.v1"
42
43 "launchpad.net/snappy/pkg"
44- "launchpad.net/snappy/systemd"
45 )
46
47 type fakePart struct {
48@@ -55,21 +54,11 @@
49 oemConfig map[string]interface{}
50 globs []string
51 ethdir string
52- sctlargs []string
53- sctlerr error
54 }
55
56 var _ = Suite(&FirstBootTestSuite{})
57
58-func (s *FirstBootTestSuite) systemctl(args ...string) (out []byte, err error) {
59- s.sctlargs = args
60- return nil, s.sctlerr
61-}
62-
63 func (s *FirstBootTestSuite) SetUpTest(c *C) {
64- s.sctlerr = nil
65- s.sctlargs = nil
66- systemd.SystemctlCmd = s.systemctl
67 stampFile = filepath.Join(c.MkDir(), "stamp")
68
69 configMyApp := make(SystemConfig)
70@@ -161,20 +150,6 @@
71 c.Assert(err, IsNil)
72 c.Check(string(bs), Equals, "allow-hotplug eth42\niface eth42 inet dhcp\n")
73
74- c.Check(s.sctlargs, DeepEquals, []string{"restart", "networking", "--no-block"})
75-}
76-
77-func (s *FirstBootTestSuite) TestEnableFirstEtherSomeEthFailsIfSystemctlFails(c *C) {
78- dir := c.MkDir()
79- _, err := os.Create(filepath.Join(dir, "eth42"))
80- c.Assert(err, IsNil)
81- s.sctlerr = fmt.Errorf("Error")
82-
83- globs = []string{filepath.Join(dir, "eth*")}
84- c.Check(enableFirstEther(), Equals, s.sctlerr)
85- fs, _ := filepath.Glob(filepath.Join(ethdir, "*"))
86- c.Check(fs, HasLen, 1)
87- c.Check(s.sctlargs, DeepEquals, []string{"restart", "networking", "--no-block"})
88 }
89
90 func (s *FirstBootTestSuite) TestEnableFirstEtherBadEthDir(c *C) {

Subscribers

People subscribed via source and target branches