Merge lp://qastaging/~ack/landscape-client/max-pending-computers-message into lp://qastaging/~landscape/landscape-client/trunk

Proposed by Alberto Donato
Status: Merged
Approved by: Alberto Donato
Approved revision: 948
Merged at revision: 935
Proposed branch: lp://qastaging/~ack/landscape-client/max-pending-computers-message
Merge into: lp://qastaging/~landscape/landscape-client/trunk
Diff against target: 608 lines (+194/-83)
6 files modified
debian/changelog (+6/-0)
landscape/__init__.py (+10/-9)
landscape/broker/registration.py (+10/-9)
landscape/broker/tests/test_registration.py (+61/-12)
landscape/configuration.py (+45/-33)
landscape/tests/test_configuration.py (+62/-20)
To merge this branch: bzr merge lp://qastaging/~ack/landscape-client/max-pending-computers-message
Reviewer Review Type Date Requested Status
Chad Smith Approve
🤖 Landscape Builder test results Approve
Free Ekanayaka (community) Approve
Review via email: mp+317961@code.qastaging.launchpad.net

Commit message

This adds support in the client to handle a new error condition when trying to register a client, when there are too many pending computers already.
To do that, the client API version has been bumped, since the server needs to know if the client knows about this new error code.

Description of the change

This adds support in the client to handle a new error condition when trying to register a client, when there are too many pending computers already.
To do that, the client API version has been bumped, since the server needs to know if the client knows about this new error code.
The server side of this change is lp:~ack/landscape/max-pending-computers-message (which needs this branch landed because of the version bump).

Testing instructions:

I tested the changes as follows:

 - deploy an LDS from lp:~ack/landscape/max-pending-computers-message (make stage-landscape-charm ...)
 - create a LXD and install landscape-client, configure it to point to the LDS.
 - register the client 20 times (without accepting it) to create pending computers with: landscape-client --silent
 - try to register again, get the "Invalid account name or registration key." error (current client still works as previously)
 - make package from the client branch, install those packages in the LXD
 - the error message will be "Maximum number of computers pending approval reached."

To post a comment you must log in.
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: TRIAL_ARGS=-j4 make check
Result: Success
Revno: 946
Branch: lp:~ack/landscape-client/max-pending-computers-message
Jenkins: https://ci.lscape.net/job/latch-test-precise/867/

review: Approve (test results)
Revision history for this message
Chad Smith (chad.smith) wrote :

just a couple nits so far. Going through deploy testing now.

Revision history for this message
Chad Smith (chad.smith) :
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

+1 with a few nits

review: Approve
Revision history for this message
Alberto Donato (ack) :
947. By Alberto Donato

Address review comments.

Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: TRIAL_ARGS=-j4 make check
Result: Fail
Revno: 947
Branch: lp:~ack/landscape-client/max-pending-computers-message
Jenkins: https://ci.lscape.net/job/latch-test-precise/868/

review: Needs Fixing (test results)
948. By Alberto Donato

Fix test.

Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: TRIAL_ARGS=-j4 make check
Result: Success
Revno: 948
Branch: lp:~ack/landscape-client/max-pending-computers-message
Jenkins: https://ci.lscape.net/job/latch-test-precise/869/

review: Approve (test results)
Revision history for this message
Chad Smith (chad.smith) :
review: Approve

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: