New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubelet/rkt: Add SyncPod() to rkt. #7611

Merged
merged 1 commit into from May 1, 2015

Conversation

Projects
None yet
5 participants
@yifan-gu
Member

yifan-gu commented May 1, 2015

@vmarmol @yujuhong @dchen1107 @jonboulle @bakins

Currently, if any containers in the pod need to be restarted, the whole pod will be restarted.

WIP, need to move shouldContainerBeRestarted to hooks so we can reuse the code.

@googlebot googlebot added the cla: yes label May 1, 2015

Show outdated Hide outdated pkg/kubelet/rkt/sync.go
uid := pod.UID
if len(runningPod.Containers) == 0 {
glog.V(4).Infof("Pod is not running, start it")

This comment has been minimized.

@xiang90

xiang90 May 1, 2015

Contributor

does the running pod has an identity/description at this point? The log is very vague.

@xiang90

xiang90 May 1, 2015

Contributor

does the running pod has an identity/description at this point? The log is very vague.

Show outdated Hide outdated pkg/kubelet/rkt/sync.go
"github.com/golang/glog"
)
// SyncPod makes

This comment has been minimized.

@xiang90

xiang90 May 1, 2015

Contributor

?

@xiang90

xiang90 May 1, 2015

Contributor

?

Show outdated Hide outdated pkg/kubelet/rkt/sync.go
continue
}
glog.Infof("Pod %q container %q is unhealthy (probe result: %v), it will be killed and re-created.", podFullName, container.Name, result)
restartPod = true

This comment has been minimized.

@xiang90

xiang90 May 1, 2015

Contributor

shall we also break out in this case? Actually i think we should follow the previous logic here. If ...{ restartPod = true; break}; normal logic

@xiang90

xiang90 May 1, 2015

Contributor

shall we also break out in this case? Actually i think we should follow the previous logic here. If ...{ restartPod = true; break}; normal logic

@vmarmol vmarmol self-assigned this May 1, 2015

@yifan-gu

This comment has been minimized.

Show comment
Hide comment
@yifan-gu

yifan-gu May 1, 2015

Member

Need work around pod volumes.

Member

yifan-gu commented May 1, 2015

Need work around pod volumes.

Show outdated Hide outdated pkg/kubelet/rkt/rkt.go
readinessManager *kubecontainer.ReadinessManager
prober prober.Prober
systemd *dbus.Conn
absPath string

This comment has been minimized.

@vmarmol

vmarmol May 1, 2015

Contributor

nit: I know this was here before, but can we document absPath?

@vmarmol

vmarmol May 1, 2015

Contributor

nit: I know this was here before, but can we document absPath?

This comment has been minimized.

@yifan-gu

yifan-gu May 1, 2015

Member

Sure, the name is confusing actually :(

@yifan-gu

yifan-gu May 1, 2015

Member

Sure, the name is confusing actually :(

@vmarmol

This comment has been minimized.

Show comment
Hide comment
@vmarmol

vmarmol May 1, 2015

Contributor

Looks good overall, couple of things to node

  • Missing restarting if pod spec changed: ports and host networking mode (can be a TODO)
  • Add a TODO for supporting network plugins (we need to figure out how they'd work in rkt)

What's missing from the volume stuff?

Contributor

vmarmol commented May 1, 2015

Looks good overall, couple of things to node

  • Missing restarting if pod spec changed: ports and host networking mode (can be a TODO)
  • Add a TODO for supporting network plugins (we need to figure out how they'd work in rkt)

What's missing from the volume stuff?

@yifan-gu

This comment has been minimized.

Show comment
Hide comment
@yifan-gu

yifan-gu May 1, 2015

Member

@vmarmol Thanks!
I think ports and host networking changes will change the hash, no?

Volumes are required for launching a pod since now Im not using RunContainerOptions. Hmm, I am just going to bypass the volumes, and figure out how to inject RunContainerOptionsGenerator in rkt after this PR, opinions?

Member

yifan-gu commented May 1, 2015

@vmarmol Thanks!
I think ports and host networking changes will change the hash, no?

Volumes are required for launching a pod since now Im not using RunContainerOptions. Hmm, I am just going to bypass the volumes, and figure out how to inject RunContainerOptionsGenerator in rkt after this PR, opinions?

@vmarmol

This comment has been minimized.

Show comment
Hide comment
@vmarmol

vmarmol May 1, 2015

Contributor

The ports yes, the network mode no since it is as the pod level.

I'm fine doing the volumes later. You're already injecting the generator can you use that?

Contributor

vmarmol commented May 1, 2015

The ports yes, the network mode no since it is as the pod level.

I'm fine doing the volumes later. You're already injecting the generator can you use that?

@yifan-gu

This comment has been minimized.

Show comment
Hide comment
@yifan-gu

yifan-gu May 1, 2015

Member

@vmarmol That requires some modification to the RunPod(), I will figure out.

Member

yifan-gu commented May 1, 2015

@vmarmol That requires some modification to the RunPod(), I will figure out.

@yujuhong

This comment has been minimized.

Show comment
Hide comment
@yujuhong

yujuhong May 1, 2015

Contributor

@vmarmol, @yifan-gu, do we still want to keep RunPod in the interface? Kubelet doesn't distinguish between a new and an existing pod, so it calls only SyncPod anyway...

DockerManager does not haveRunPod and this is last function blocking it from implementing the Runtime interface. I can put a placeholder there if we want to keep this function, or I can just delete it :)

Contributor

yujuhong commented May 1, 2015

@vmarmol, @yifan-gu, do we still want to keep RunPod in the interface? Kubelet doesn't distinguish between a new and an existing pod, so it calls only SyncPod anyway...

DockerManager does not haveRunPod and this is last function blocking it from implementing the Runtime interface. I can put a placeholder there if we want to keep this function, or I can just delete it :)

@yifan-gu

This comment has been minimized.

Show comment
Hide comment
@yifan-gu

yifan-gu May 1, 2015

Member

@yujuhong We can delete it I think! Thanks for the reminder

Member

yifan-gu commented May 1, 2015

@yujuhong We can delete it I think! Thanks for the reminder

@yifan-gu yifan-gu changed the title from WIP kubelet/rkt: Add SyncPod() to rkt. to kubelet/rkt: Add SyncPod() to rkt. May 1, 2015

@yifan-gu

This comment has been minimized.

Show comment
Hide comment
@yifan-gu

yifan-gu May 1, 2015

Member

Have kicked the volumes out from the rkt's syncPod()'s signature. Now volume gets unsupported, but I will use RunContainerOptions soon.
I think we can merge this once green and add switches for kubelet to choose docker/rkt next.

There are pumps in rkt's syncPod now, which I will figure out today or tomorrow.

@vmarmol @yujuhong

Member

yifan-gu commented May 1, 2015

Have kicked the volumes out from the rkt's syncPod()'s signature. Now volume gets unsupported, but I will use RunContainerOptions soon.
I think we can merge this once green and add switches for kubelet to choose docker/rkt next.

There are pumps in rkt's syncPod now, which I will figure out today or tomorrow.

@vmarmol @yujuhong

@vmarmol

This comment has been minimized.

Show comment
Hide comment
@vmarmol

vmarmol May 1, 2015

Contributor

+1 to removing @yujuhong

@yifan-gu we (@yujuhong or I) can work on the switch in Kubelet to free you up for rkt support (unless you've already started)

Contributor

vmarmol commented May 1, 2015

+1 to removing @yujuhong

@yifan-gu we (@yujuhong or I) can work on the switch in Kubelet to free you up for rkt support (unless you've already started)

@yifan-gu

This comment has been minimized.

Show comment
Hide comment
@yifan-gu

yifan-gu May 1, 2015

Member

Thanks @vmarmol !

Member

yifan-gu commented May 1, 2015

Thanks @vmarmol !

@vmarmol

This comment has been minimized.

Show comment
Hide comment
@vmarmol

vmarmol May 1, 2015

Contributor

LGTM, thanks @yifan-gu! Will start getting the Kubelet switch in. @yujuhong is working on the Runtime interface.

Contributor

vmarmol commented May 1, 2015

LGTM, thanks @yifan-gu! Will start getting the Kubelet switch in. @yujuhong is working on the Runtime interface.

vmarmol added a commit that referenced this pull request May 1, 2015

Merge pull request #7611 from yifan-gu/rkt_syncPod
kubelet/rkt: Add SyncPod() to rkt.

@vmarmol vmarmol merged commit e3fc039 into kubernetes:master May 1, 2015

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Shippable Shippable builds completed
Details
cla/google All necessary CLAs are signed

@yifan-gu yifan-gu deleted the yifan-gu:rkt_syncPod branch May 7, 2015

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