Skip to content
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
Merged

Conversation

yifan-gu
Copy link
Contributor

@yifan-gu 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.

uid := pod.UID

if len(runningPod.Containers) == 0 {
glog.V(4).Infof("Pod is not running, start it")
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@yifan-gu
Copy link
Contributor Author

yifan-gu commented May 1, 2015

Need work around pod volumes.

readinessManager *kubecontainer.ReadinessManager
prober prober.Prober
systemd *dbus.Conn
absPath string
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, the name is confusing actually :(

@vmarmol
Copy link
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
Copy link
Contributor Author

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
Copy link
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
Copy link
Contributor Author

yifan-gu commented May 1, 2015

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

@yujuhong
Copy link
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
Copy link
Contributor Author

yifan-gu commented May 1, 2015

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

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

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

@yifan-gu yifan-gu force-pushed the rkt_syncPod branch 2 times, most recently from 195940a to 1b77615 Compare May 1, 2015 20:01
@vmarmol
Copy link
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
Copy link
Contributor Author

yifan-gu commented May 1, 2015

Thanks @vmarmol !

@vmarmol
Copy link
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
kubelet/rkt: Add SyncPod() to rkt.
@vmarmol vmarmol merged commit e3fc039 into kubernetes:master May 1, 2015
@yifan-gu yifan-gu deleted the rkt_syncPod branch May 7, 2015 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants