Merge lp://qastaging/~mvo/snappy/snappy-lp1488114-msg into lp://qastaging/~snappy-dev/snappy/snappy-moved-to-github

Proposed by Michael Vogt
Status: Needs review
Proposed branch: lp://qastaging/~mvo/snappy/snappy-lp1488114-msg
Merge into: lp://qastaging/~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 388 lines (+141/-21)
17 files modified
_integration-tests/reboot-wrapper (+11/-0)
_integration-tests/tests/autopilot-msg_test.go (+56/-0)
cmd/snappy/cmd_activate.go (+1/-1)
cmd/snappy/cmd_booted.go (+1/-1)
cmd/snappy/cmd_grub_migrate.go (+1/-1)
cmd/snappy/cmd_hwassign.go (+1/-1)
cmd/snappy/cmd_hwinfo.go (+1/-1)
cmd/snappy/cmd_hwunassign.go (+1/-1)
cmd/snappy/cmd_install.go (+1/-1)
cmd/snappy/cmd_purge.go (+1/-1)
cmd/snappy/cmd_remove.go (+1/-1)
cmd/snappy/cmd_rollback.go (+1/-1)
cmd/snappy/cmd_service.go (+6/-6)
cmd/snappy/cmd_set.go (+1/-1)
cmd/snappy/cmd_update.go (+1/-1)
cmd/snappy/common.go (+48/-3)
po/snappy.pot (+8/-0)
To merge this branch: bzr merge lp://qastaging/~mvo/snappy/snappy-lp1488114-msg
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Federico Gimenez continuous-integration Pending
Review via email: mp+269173@code.qastaging.launchpad.net

Commit message

Improved the "another snappy is running" message.

Description of the change

This branch shows a more helpful error message if another snappy is running or if the autopilot is running.

Note that I could not verify the integration test :/ I ran:
$ go run _integration-tests/main.go --snappy-from-branch --filter autopilotMsgSuite.TestAutoPilotMessageIsPrinted

to test it but got:
... value string = "another snappy is running, try again later\n"
... regex string = "" +
... "(?ms).*^The snappy autopilot is updating your system.*\n" +
... ".*"
which indicates that the snappy from the image was used, not the one build from the branch.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

This was the less ugly way I found to solve the sudo with snappy-from-branch: https://code.launchpad.net/~elopio/snappy/sudo_path/+merge/269252

Your branch looks great. Maybe I would rename withMutex to something like withMutexAndRetry. But as its private, not a big deal.

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

Thanks Leo, good catch on the figuring out the sudo behavior. I merged your branch here and also renamed the withMutex function, thanks for this suggestion.

Revision history for this message
Leo Arias (elopio) wrote :

There's one problem here. After printing "The snappy autopilot is updating your system.", snappy will retry the hello-world installation until it succeeds. So, this will conflict with the other tests that try to install hello-world.

You can add this before the install command:

s.AddCleanup(func() {
  RemoveSnap(c, "hello-world")
})

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

Thanks Leo and sorry for the slow reply. I updated the branch accordingly.

Revision history for this message
Leo Arias (elopio) wrote :

I'm sorry, I thought this landed ages ago.

Now it needs these two files to be updated:

cmd/snappy/cmd_service.go: return withMutex(func() error {
cmd/snappy/cmd_grub_migrate.go: return withMutex(x.doGrubMigrate)

review: Needs Fixing
Revision history for this message
Leo Arias (elopio) wrote :

Also, now in the test instead of common.ExecCommand it is cli.ExecCommand.

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

Thanks again, I update the branch and it should build now again.

Revision history for this message
Leo Arias (elopio) wrote :

My error from the morning was my fault, I was using the wrong snappy bin. I'm getting some unrelated errors today, but I prefer to land this branch before we forget about it again. Thanks mvo.

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

The attempt to merge lp:~mvo/snappy/snappy-lp1488114-msg 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.Q0yBcM1M2E/src/launchpad.net/snappy
? launchpad.net/snappy/cmd/snapd [no test files]
=== RUN Test
OK: 12 passed
--- PASS: Test (0.02 seconds)
PASS
coverage: 20.5% of statements
ok launchpad.net/snappy/cmd/snappy 0.028s coverage: 20.5% of statements
=== RUN Test
OK: 53 passed
--- PASS: Test (0.31 seconds)
PASS
coverage: 91.7% of statements
ok launchpad.net/snappy/coreconfig 0.315s coverage: 91.7% of statements
=== RUN Test
OK: 39 passed
--- PASS: Test (0.17 seconds)
PASS
coverage: 69.8% of statements
ok launchpad.net/snappy/daemon 0.176s coverage: 69.8% of statements
? launchpad.net/snappy/dirs [no test files]
=== RUN Test
OK: 65 passed
--- PASS: Test (0.32 seconds)
PASS
coverage: 79.2% of statements
ok launchpad.net/snappy/helpers 0.330s coverage: 79.2% of statements
=== RUN Test
OK: 0 passed, 2 skipped
-...

Unmerged revisions

648. By Michael Vogt

update to compile with trunk

647. By Michael Vogt

merged lp:snappy

646. By Michael Vogt

merged lp:snappy and resolved conflicts

645. By Michael Vogt

_integration-tests/tests/autopilot-msg_test.go: add missing cleanup

644. By Michael Vogt

rename withMutex->withMutexAndRetry (thanks Leo!)

643. By Michael Vogt

merged lp:~elopio/snappy/sudo_path (many thanks)

642. By Michael Vogt

show autopilot specific message if its running and add integration test

641. By Michael Vogt

auto-retry if the lock is taken

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches