Merge lp:~alan-griffiths/mir/fix-1486496 into lp:mir
| Status: | Merged |
|---|---|
| Merged at revision: | 2893 |
| Proposed branch: | lp:~alan-griffiths/mir/fix-1486496 |
| Merge into: | lp:mir |
| Prerequisite: | lp:~alan-griffiths/mir/workaround-1441553 |
| Diff against target: |
296 lines (+152/-7) 8 files modified
src/client/mir_connection.cpp (+2/-2) src/client/rpc/mir_basic_rpc_channel.cpp (+24/-2) src/client/rpc/mir_basic_rpc_channel.h (+1/-0) src/include/common/mir/protobuf/protocol_version.h (+49/-0) src/server/frontend/socket_connection.cpp (+8/-1) tests/acceptance-tests/test_client_library.cpp (+65/-0) tests/integration-tests/test_error_reporting.cpp (+1/-1) tests/unit-tests/frontend/test_socket_connection.cpp (+2/-1) |
| To merge this branch: | bzr merge lp:~alan-griffiths/mir/fix-1486496 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | 2015-08-25 | Needs Fixing on 2015-09-01 |
| Daniel van Vugt | Approve on 2015-08-31 | ||
| Alexandros Frantzis (community) | Approve on 2015-08-27 | ||
| Kevin DuBois (community) | Approve on 2015-08-25 | ||
| Alan Griffiths | Pending | ||
| Chris Halse Rogers | 2015-08-25 | Pending | |
|
Review via email:
|
|||
Commit Message
client, frontend: Introduce meaningful versioning into the protobuf protocol and check it.
(LP: #1486496)
Description of the Change
client, frontend: Introduce meaningful versioning into the protobuf protocol and check it.
Because the server simply disconnects on a connection failure the client doesn't receive any reason for the failure. However, reporting a connection failure is better than hanging.
| Alexandros Frantzis (afrantzis) wrote : | # |
What if we break the protocol without an API change?
| Alan Griffiths (alan-griffiths) wrote : | # |
> What if we break the protocol without an API change?
Then the soname doesn't change, clients links to the new libmirclient and everything works.
But I see your point - calling it the protocol version is misleading. Suggestions for a better name please?
| Chris Halse Rogers (raof) wrote : | # |
There's actually no guarantee that the client code will link with the new libmirclient. It could be statically linked, or provided by the .snap rather than the system (Snappy core doesn't have mirclient in the base image)
-----Original Message-----
From: "Alan Griffiths" <email address hidden>
Sent: 27/08/2015 18:28
To: "Alexandros Frantzis" <email address hidden>
Subject: Re: [Merge] lp:~alan-griffiths/mir/fix-1486496 into lp:mir
> What if we break the protocol without an API change?
Then the soname doesn't change, clients links to the new libmirclient and everything works.
But I see your point - calling it the protocol version is misleading. Suggestions for a better name please?
--
https:/
You are requested to review the proposed merge of lp:~alan-griffiths/mir/fix-1486496 into lp:mir.
| Alan Griffiths (alan-griffiths) wrote : | # |
> There's actually no guarantee that the client code will link with the new
> libmirclient. It could be statically linked, or provided by the .snap rather
> than the system (Snappy core doesn't have mirclient in the base image)
| Alexandros Frantzis (afrantzis) wrote : | # |
> > What if we break the protocol without an API change?
>
> Then the soname doesn't change, clients links to the new libmirclient and
> everything works.
>
> But I see your point - calling it the protocol version is misleading.
> Suggestions for a better name please?
How about using protocol(epoch, major, minor), where epoch is a value we can increase manually as needed:
current client API -> supported protocol versions
1:3.0 -> 1:3.0
1:3.1 -> 1:3.0, 1:3.1
<protocol break without API break> 2:3.1 -> (2:3.0 which doesn't exist) and 2:3.1
| Alexandros Frantzis (afrantzis) wrote : | # |
> current client API -> supported protocol versions
epoch:current_
| Alan Griffiths (alan-griffiths) wrote : | # |
> epoch:current_
OK, added epoch
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2882
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Kevin DuBois (kdub) wrote : | # |
still lgtm
| Daniel van Vugt (vanvugt) wrote : | # |
Tested: Client built from this branch, server built from lp:mir/0.14.
Indeed the hang is now replaced with an inexplicable failure to connect. Even mir_connection_
We need a custom error message so clients that bother to call mir_connection_
| Alan Griffiths (alan-griffiths) wrote : | # |
> Tested: Client built from this branch, server built from lp:mir/0.14.
>
> Indeed the hang is now replaced with an inexplicable failure to connect. Even
> mir_connection_
> is kind of worse, because the user will be even more confused than before.
>
> We need a custom error message so clients that bother to call
> mir_connection_
> really is a server at the other end that's just rejecting us.
All that the client sees is the connection being dropped. Even if we were to change that handshake in current servers it wouldn't help with 0.14 servers which just close the socket.
There are other failure modes, e.g.
"Failed to connect to server `/tmp/mir_socket': Failed to connect to server socket: Permission denied"
So I've updated the message to:
"Failed to connect to server `/tmp/mir_socket': Failed to connect: not accepted by server"
Which is a little less opaque but not specific beyond what the client really knows. (E.g. it could be the SessionAuthorizer that forces the disconnect.)
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2884
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://

PASSED: Continuous integration, rev:2880 jenkins. qa.ubuntu. com/job/ mir-ci/ 4675/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/3669 s-jenkins. ubuntu- ci:8080/ job/mir- clang-ts- vivid-amd64- build/90 jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/2580 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/3619 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 824 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 824/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3619 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3619/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/6391 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 22820
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/4675/ rebuild
http://