Skip to content

Conversation

@duglin
Copy link
Contributor

@duglin duglin commented Apr 9, 2015

Signed-off-by: Doug Davis dug@us.ibm.com

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the signal should be converted to an int in the API layer so that a StatusBadRequest can be returned for things like this as int is the final type for this var.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1
Then we can remove daemon.ContainerKill

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 thought about that, but I wasn't sure if we wanted callers to ContainerKill be able to pass in both ints and the string version w/o forcing everyone to convert it themselves.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should enforce type. That was whole idea of removing jobs.

@duglin duglin force-pushed the RemoveJobKill branch 2 times, most recently from 9be85f3 to dc90e66 Compare April 9, 2015 22:24
Copy link
Contributor

Choose a reason for hiding this comment

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

What will be if sig == ""?
Can we move whole ContainerKill here to work with container instance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If sig == "" then the normal container.Kill() will be done.

I thought about removing ContainerKill() but then each potential caller would need to do the logging themselves and I didn't like the idea of that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, just looks weird comparing to other merged PRs. pause/unpause in particular. Also I think there won't be other callers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be a bigger discussion (bordering on bikeshedding :-) ) but to me the api/server code is all about the http transport and I expect we'll eventually have others, so when that day comes I would want logic that isn't specific to the transport to be done within the daemon itself. And I consider logging of a container being killed to be the job of the deamon (or the container itself) but not the api/http/transport layer. So, in that respect I would prefer if we didn't remove those other daemon funcs, if nothing else to have consistency and proper separation of concern.

daemon/kill.go Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that I want introduce new event in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, is there a formal process to get events approved? I assumed this was an old comment and would be easy to fix. I'll revert it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, can I just reuse the same event from above?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be sort of separate PR.
I don't know how to post signal to events - it is sorta break events format.

@duglin duglin force-pushed the RemoveJobKill branch 2 times, most recently from 382026d to d7ad0f2 Compare April 9, 2015 23:02
Signed-off-by: Doug Davis <dug@us.ibm.com>
@duglin
Copy link
Contributor Author

duglin commented Apr 9, 2015

ok I think I addressed all of the comments.

@cpuguy83
Copy link
Member

LGTM

1 similar comment
@crosbymichael
Copy link
Contributor

LGTM

crosbymichael added a commit that referenced this pull request Apr 10, 2015
Remove Job from `docker kill`
@crosbymichael crosbymichael merged commit 267bd51 into moby:master Apr 10, 2015
@duglin duglin deleted the RemoveJobKill branch April 16, 2015 02:08
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.

6 participants