Move the retry mechanism to the client

Bug #1402653 reported by Fernando Correa Neto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Invalid
Undecided
Unassigned

Bug Description

In order to have the package reporter to retry the 'apt-get update' operation a few times before it gives up, the client must have a retry mechanism.

Changed in landscape-client:
importance: Undecided → High
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Note that if you refer to canonical.twisted.retry in the server, I'm not convinced it's a good choice. That machinery implements blind retries, and it's a workaround that we should eventually drop. That code also has the problem of using the Twisted reactor directly, instead of the wrapper that the client uses (landscape.reactor.Landscape.Reactor).

I'd probably go for implementing retries by hand for this specific case, using landscape.reactor.LandscapeReactor.call_later, and be sure to not blindly retry and instead check for expected error conditions (like the apt db is locked).

Later on we could see if we have enough use cases and enough data to modify canonical.twisted.retry with some information about the failures that should be retried, but that's something I'd not do now.

Revision history for this message
Dean Henrichsmeyer (dean) wrote : Re: [Bug 1402653] Re: Move the retry mechanism to the client

As discussed in standup today, I agree with free. I prefer to implement a
by-hand work around for specifically the lock. No need for transient
retries to try and deal with things like network connectivity.

Changed in landscape-client:
status: In Progress → Invalid
importance: High → Undecided
assignee: Fernando Correa Neto (fcorrea) → nobody
Revision history for this message
Fernando Correa Neto (fcorrea) wrote :

Changes were made in the client code so that it could retry upon receiving a error code 100, instead of blindly retrying.
It was landed in r808.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.