Add a start time parameter to debug-log endpoint #6633

Merged
merged 3 commits into from Nov 30, 2016

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Nov 30, 2016

This is needed to make the migration log transfer step
restartable without too many duplicated log records.

Add the start time parameter to the client, but not to the debug-log
command at the moment. I'll add a bug to add it there.

Add a start time parameter to debug-log endpoint
This is needed to make the migration log transfer process step
restartable without too many duplicated log records.

Add the start time parameter to the client, but not to the debug-log
command at the moment. I'll add a bug to add it there.

mjs approved these changes Nov 30, 2016

apiserver/debuglog.go
+ if err != nil {
+ return nil, errors.Errorf("start time %q is not a valid time in RFC3339 format", value)
+ }
+ if startTime.After(time.Now()) {
@mjs

mjs Nov 30, 2016

Contributor

I'm a bit sceptical about this one. What if the controller's clock currently wrong and it has logs from the "future"?

@babbageclunk

babbageclunk Nov 30, 2016

Member

Yeah, fair point - I'll remove that check.

Member

babbageclunk commented Nov 30, 2016

Merge error - correcting now.

babbageclunk added some commits Nov 30, 2016

Remove future check
Paranoid reviewer pointed out that it's possible for the controller to
have logs from the future (as far as it's concerned), we should allow
starting from there.
Fix merge error
Another PR of mine moved these but this is a new test so didn't get updated.
Member

babbageclunk commented Nov 30, 2016

$$merge$$

Contributor

jujubot commented Nov 30, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 2f1e53a into juju:develop Nov 30, 2016

@babbageclunk babbageclunk deleted the babbageclunk:debuglog-start branch Nov 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment