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
=== modified file 'debian/ubuntu-snappy.firstboot.service'
--- debian/ubuntu-snappy.firstboot.service 2015-04-19 08:21:54 +0000
+++ debian/ubuntu-snappy.firstboot.service 2015-10-22 10:12:56 +0000
@@ -1,6 +1,7 @@
1[Unit]1[Unit]
2Description=Run snappy firstboot setup2Description=Run snappy firstboot setup
3Before=cloud-init.service3After=local-fs.target
4Before=system-ifup.slice cloud-init-local.service cloud-init.service
45
5[Service]6[Service]
6Type=oneshot7Type=oneshot
78
=== modified file 'snappy/firstboot.go'
--- snappy/firstboot.go 2015-09-23 12:07:42 +0000
+++ snappy/firstboot.go 2015-10-22 10:12:56 +0000
@@ -28,7 +28,6 @@
2828
29 "launchpad.net/snappy/helpers"29 "launchpad.net/snappy/helpers"
30 "launchpad.net/snappy/pkg"30 "launchpad.net/snappy/pkg"
31 "launchpad.net/snappy/systemd"
3231
33 "gopkg.in/yaml.v2"32 "gopkg.in/yaml.v2"
34)33)
@@ -140,10 +139,6 @@
140 return err139 return err
141 }140 }
142141
143 if _, err := systemd.SystemctlCmd("restart", "networking", "--no-block"); err != nil {
144 return err
145 }
146
147 return nil142 return nil
148}143}
149144
150145
=== modified file 'snappy/firstboot_test.go'
--- snappy/firstboot_test.go 2015-09-23 12:07:42 +0000
+++ snappy/firstboot_test.go 2015-10-22 10:12:56 +0000
@@ -28,7 +28,6 @@
28 . "gopkg.in/check.v1"28 . "gopkg.in/check.v1"
2929
30 "launchpad.net/snappy/pkg"30 "launchpad.net/snappy/pkg"
31 "launchpad.net/snappy/systemd"
32)31)
3332
34type fakePart struct {33type fakePart struct {
@@ -55,21 +54,11 @@
55 oemConfig map[string]interface{}54 oemConfig map[string]interface{}
56 globs []string55 globs []string
57 ethdir string56 ethdir string
58 sctlargs []string
59 sctlerr error
60}57}
6158
62var _ = Suite(&FirstBootTestSuite{})59var _ = Suite(&FirstBootTestSuite{})
6360
64func (s *FirstBootTestSuite) systemctl(args ...string) (out []byte, err error) {
65 s.sctlargs = args
66 return nil, s.sctlerr
67}
68
69func (s *FirstBootTestSuite) SetUpTest(c *C) {61func (s *FirstBootTestSuite) SetUpTest(c *C) {
70 s.sctlerr = nil
71 s.sctlargs = nil
72 systemd.SystemctlCmd = s.systemctl
73 stampFile = filepath.Join(c.MkDir(), "stamp")62 stampFile = filepath.Join(c.MkDir(), "stamp")
7463
75 configMyApp := make(SystemConfig)64 configMyApp := make(SystemConfig)
@@ -161,20 +150,6 @@
161 c.Assert(err, IsNil)150 c.Assert(err, IsNil)
162 c.Check(string(bs), Equals, "allow-hotplug eth42\niface eth42 inet dhcp\n")151 c.Check(string(bs), Equals, "allow-hotplug eth42\niface eth42 inet dhcp\n")
163152
164 c.Check(s.sctlargs, DeepEquals, []string{"restart", "networking", "--no-block"})
165}
166
167func (s *FirstBootTestSuite) TestEnableFirstEtherSomeEthFailsIfSystemctlFails(c *C) {
168 dir := c.MkDir()
169 _, err := os.Create(filepath.Join(dir, "eth42"))
170 c.Assert(err, IsNil)
171 s.sctlerr = fmt.Errorf("Error")
172
173 globs = []string{filepath.Join(dir, "eth*")}
174 c.Check(enableFirstEther(), Equals, s.sctlerr)
175 fs, _ := filepath.Glob(filepath.Join(ethdir, "*"))
176 c.Check(fs, HasLen, 1)
177 c.Check(s.sctlargs, DeepEquals, []string{"restart", "networking", "--no-block"})
178}153}
179154
180func (s *FirstBootTestSuite) TestEnableFirstEtherBadEthDir(c *C) {155func (s *FirstBootTestSuite) TestEnableFirstEtherBadEthDir(c *C) {

Subscribers

People subscribed via source and target branches