Skip to content

Conversation

@tiborvass
Copy link
Contributor

Signed-off-by: Tibor Vass tibor@docker.com

Ping @LK4D4

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 5, 2015

@tiborvass Something failed.

@tiborvass tiborvass force-pushed the no-jobs-networkdriver-bridge branch 5 times, most recently from e524e35 to 90d2124 Compare April 7, 2015 18:15
@icecrime icecrime mentioned this pull request Apr 7, 2015
41 tasks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need _ = or the commented code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was to make it obvious the error was ignored. I can remove it if you don't want it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i kinda like the _, but dont care either way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we ignoring it? Maybe at least log it? Or log inside and remove returning error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tiborvass What's here? This error is never checked.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LK4D4 I know, that's why I put the _ =. I'm fine with logging it. Info?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that this error not checked at all in code. No one uses it. Maybe better to log it inside function and not return err.
I thought about Warn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LK4D4 okay

@tiborvass tiborvass force-pushed the no-jobs-networkdriver-bridge branch from 90d2124 to 14f6882 Compare April 7, 2015 19:14
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also hope this is alright

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^ Just to be sure, this was alright? (In case someone visits this at a later stage)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thaJeztah Well I am not sure, I needed it to fix an error case and it makes sense to me, but maybe I could be missing something. That's why I need people to review it. @LK4D4 maybe you know why this would be bad?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 port is random port. What error you tried to fix?

@tiborvass tiborvass force-pushed the no-jobs-networkdriver-bridge branch 2 times, most recently from d9250ec to 44a762e Compare April 7, 2015 22:27
@tiborvass
Copy link
Contributor Author

Ping @jfrazelle @crosbymichael

@crosbymichael
Copy link
Contributor

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be %T :) Yes, I'm checking with vet all PRs now until we merge autocheck.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 8, 2015

@tiborvass Is it in plans to convert bridge package to datastructure?

@tiborvass
Copy link
Contributor Author

@LK4D4 I don't know if it's in the plans, but I did it. It's bridge.Config.

@tiborvass tiborvass force-pushed the no-jobs-networkdriver-bridge branch from 44a762e to 30325ac Compare April 8, 2015 21:19
@LK4D4
Copy link
Contributor

LK4D4 commented Apr 8, 2015

@tiborvass No, it is still bridge.Allocate and I'm talking about daemon.network.Allocate or something like this. bridge package still behaving like datastructure.

@tiborvass
Copy link
Contributor Author

@LK4D4 I see. I'll try to do that.

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 8, 2015

@tiborvass In this PR or later?

@tiborvass
Copy link
Contributor Author

@LK4D4 i can do it here if you want

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 8, 2015

@tiborvass Would be cool.

@tiborvass
Copy link
Contributor Author

@LK4D4 Actually let's leave it for another PR. This PR is about networkdriver/bridge, you're asking to put networkdriver as a NetworkService in Daemon.

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 8, 2015

ok

Signed-off-by: Tibor Vass <tibor@docker.com>
@tiborvass tiborvass force-pushed the no-jobs-networkdriver-bridge branch from 30325ac to 5358232 Compare April 8, 2015 22:50
@tiborvass
Copy link
Contributor Author

Ping @LK4D4 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LK4D4 this here would panic without my change in nat/nat.go. It is replacing GetenvInt("ContainerPort"), which was returning 0 in case ParseInt was erroring out: https://github.com/docker/docker/blob/2052d01b1e52a4b1fa79fdc73c52a7b52f6d88a7/engine/env.go#L90

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's sucks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LK4D4 Solution?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know. Maybe we can leave it as it is. But this port type is really awful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LK4D4 at least I don't think I'm modifying any behavior in this PR. Actually the only modification I'm making is that if somebody types in a negative port, then this PR will error out, while master would just consider it 0 (to be verified but that's what i see from the code)

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 9, 2015

LGTM

LK4D4 added a commit that referenced this pull request Apr 9, 2015
Remove jobs from daemon/networkdriver/bridge
@LK4D4 LK4D4 merged commit 6767652 into moby:master Apr 9, 2015
@tiborvass tiborvass deleted the no-jobs-networkdriver-bridge branch July 17, 2019 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants