Merge lp://qastaging/~doanac/uci-engine/lander-logs-multi into lp://qastaging/uci-engine

Proposed by Andy Doan
Status: Merged
Approved by: Andy Doan
Approved revision: 602
Merged at revision: 621
Proposed branch: lp://qastaging/~doanac/uci-engine/lander-logs-multi
Merge into: lp://qastaging/uci-engine
Diff against target: 265 lines (+48/-9)
12 files modified
charms/precise/lander/hooks/hooks.py (+3/-0)
charms/precise/webui/hooks/hooks.py (+2/-2)
lander/lander/ticket_api.py (+12/-4)
ticket_system/ticket/api.py (+1/-1)
ticket_system/ticket/migrations/0002_uce0.py (+9/-0)
ticket_system/ticket/models.py (+4/-0)
ticket_system/ticket/tests/test_full_read_api.py (+1/-0)
ticket_system/ticket/tests/test_read_api.py (+7/-0)
ticket_system/ticket/tests/test_write_api.py (+6/-0)
webui/tickets/static/tickets/webui.js (+1/-1)
webui/tickets/templates/tickets/logview.html (+1/-1)
webui/tickets/views.py (+1/-0)
To merge this branch: bzr merge lp://qastaging/~doanac/uci-engine/lander-logs-multi
Reviewer Review Type Date Requested Status
Evan (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+223577@code.qastaging.launchpad.net

Commit message

Allow ticket-system/lander/webui to coordinate about which lander is processing a ticket.

Description of the change

reviving this old MP. we need to be able to support running multiple landers:

The webui currently assumes we have a single lander for providing a proxy URL to the lander logs. This allows the lander to update the ticket so we know which lander is processing it. Then we can
have multiple landers running and know which proxy URL to follow for a given ticket.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:600
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/887/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/887/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:601
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/898/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/898/rebuild

review: Approve (continuous-integration)
Revision history for this message
Evan (ev) wrote :

Great stuff, Andy. Can I just check to make sure I understand it all correctly?

So the lander worker pushes a notification to the ticket system that it's currently handling a ticket. If the lander worker falls apart, the message will get NACKed back onto the queue and the next worker picks it up. In that space between worker 1 and worker 2 handling the ticket, the webui might go to the wrong place for the logs (or just get stale logs if we can later stream this to Swift), but there's little we can do about that.

The model is push. It doesn't compromise what we get in having workers feeding off a queue by carefully trying to coordinate work in a top-down way, correct?

Revision history for this message
Andy Doan (doanac) wrote :

On 06/23/2014 07:43 AM, Evan Dandrea wrote:
> Great stuff, Andy. Can I just check to make sure I understand it all correctly?
>
> So the lander worker pushes a notification to the ticket system that it's currently handling a ticket. If the lander worker falls apart, the message will get NACKed back onto the queue and the next worker picks it up. In that space between worker 1 and worker 2 handling the ticket, the webui might go to the wrong place for the logs (or just get stale logs if we can later stream this to Swift), but there's little we can do about that.

correct. its basically piggy-backing on the status updates we were
already doing.

> The model is push. It doesn't compromise what we get in having workers feeding off a queue by carefully trying to coordinate work in a top-down way, correct?

Correct. Even though we *push* work to the queues. We still need to
update the ticket with the status changes taking place.

I suspect this will need to become a little more robust over time, but
that's really orthogonal to this.

Revision history for this message
Evan (ev) wrote :

Yup, looks good then. +1

review: Approve
Revision history for this message
Ubuntu CI Bot (uci-bot) wrote :

Attempt to merge into lp:uci-engine failed due to conflicts:

text conflict in charms/precise/lander/hooks/hooks.py

602. By Andy Doan

merge with trunk

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