Merge lp://staging/~tribaal/landscape-client/more-information-on-ssl-errors into lp://staging/~landscape/landscape-client/trunk

Proposed by Chris Glass
Status: Merged
Approved by: Chris Glass
Approved revision: 811
Merged at revision: 807
Proposed branch: lp://staging/~tribaal/landscape-client/more-information-on-ssl-errors
Merge into: lp://staging/~landscape/landscape-client/trunk
Diff against target: 291 lines (+141/-19)
8 files modified
landscape/broker/amp.py (+2/-1)
landscape/broker/exchange.py (+13/-2)
landscape/broker/server.py (+2/-2)
landscape/broker/tests/test_amp.py (+1/-1)
landscape/broker/tests/test_exchange.py (+39/-2)
landscape/broker/tests/test_server.py (+18/-4)
landscape/configuration.py (+14/-6)
landscape/tests/test_configuration.py (+52/-1)
To merge this branch: bzr merge lp://staging/~tribaal/landscape-client/more-information-on-ssl-errors
Reviewer Review Type Date Requested Status
Данило Шеган (community) Approve
Free Ekanayaka (community) Approve
Review via email: mp+246090@code.staging.launchpad.net

Commit message

Add a specific error message when the cause of registration failure is an SSL error.

Description of the change

This branch adds a specific error message when the cause of registration failure is an SSL error, since it's a common pitfall for new users, this makes the failure more explicit.

Hopefully, this should put users on the right track when try to report/fix the problem.

It's implemented by simply firing a custom message when the SSL failure is detected, and making the GUI react to this message by printing a more specific error message in this particular case.

How to test:
- Build this branche's packages with "make package", install them on a machine
- Try to register against LDS without specifying an SSL certificate. You should see the new message.
- Try to register against hosted, specifying the LDS's instance certificate. You should see the new message as well.
- Registering using a valid certificate (LDS) or no certificate (hosted) should work.

To post a comment you must log in.
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Looks good, but I'd suggest to not introduce a new event (see below). +1 with that addressed

review: Approve
Revision history for this message
Chris Glass (tribaal) :
809. By Chris Glass

Changed code to use a parameter to the exchange-failed message as per code review.

It seems the mocking infrastructure is not able to handle parameters, however,
a test is still failing.

810. By Chris Glass

Fixed parameter name. Test still fails though.

Revision history for this message
Free Ekanayaka (free.ekanayaka) :
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Please also file a bug for this MP.

Revision history for this message
Данило Шеган (danilo) wrote :

Free's test fixes from https://pastebin.canonical.com/123160/ do indeed fix tests for me for all but

landscape.broker.tests.test_amp.RemoteBrokerTest.test_listen_events

which fails with https://pastebin.canonical.com/123161/

Revision history for this message
Данило Шеган (danilo) wrote :

FWIW, while testing this, landscape-config fails nicely with this error message (yet it still hangs for a while [like 20-30s] after that), yet landscape-client-install-ui just hangs for a while without any information on what's going on and then just exits. I'd lean on that being fixed in a new branch, though.

Otherwise, the code looks good.

review: Approve
811. By Chris Glass

Added free's fix for the AMQ handling of kwargs.
Small test fix on top.

Revision history for this message
Chris Glass (tribaal) wrote :

Thanks for the help Free!

@Danilo: I'll open a bug for the UI part since non-SSL failures have the same problem, AFAICT.

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

to all changes: