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

pkg/kubelet: Add initial node info to cache #26602

Closed

Conversation

derekparker
Copy link
Contributor

@derekparker derekparker commented Jun 1, 2016

Add initial node information to nodeInfo cache when registering with the
apiserver. This allows the kubelet to obtain node information in the
future, even if it is unable to contact the API server.

Fixes #26590

Add initial node information to nodeInfo cache when registering with the
apiserver. This allows the kubelet to obtain node information in the
future, even if it is unable to contact the API server.

Fixes kubernetes#26590
@k8s-bot
Copy link

k8s-bot commented Jun 1, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

1 similar comment
@k8s-bot
Copy link

k8s-bot commented Jun 1, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Jun 1, 2016
@k8s-bot
Copy link

k8s-bot commented Jun 1, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@derekparker
Copy link
Contributor Author

Can I get a look at this, please? cc @dchen1107 @vishh @mikedanese

@vishh
Copy link
Contributor

vishh commented Jun 8, 2016

What is the use case?

@vishh vishh self-assigned this Jun 8, 2016
@derekparker
Copy link
Contributor Author

derekparker commented Jun 8, 2016

@vishh our (coreos) personal use case is that, due to lack of kubelet checkpointing, we're working on a (temporary solution) "user-space" checkpointing system to checkpoint the apiserver pod manifest in a self-hosted cluster. This is so that if the system ever reboots/crashes we have a "checkpointed" apiserver manifest that we expose as a static manifest on disk that the kubelet can pick up and run. From there the cluster can heal itself.

That static manifest makes use of the downward API for the IP address. When the pod is using host networking, the kubelet looks in the node store for the IP. That store is filled from the API server exclusively. In that scenario, there is no API server for the kubelet to talk to to get this information, so the value is the empty string.

The information should be available regardless of if the node can reach the API server. It is local information, after all, so we shouldn't have to rely on contacting an API server to retrieve it. In this patch, I simply pre-fill the cache store with the node information.

@vishh
Copy link
Contributor

vishh commented Jun 10, 2016

@derekparker #27107 does something similar. Does that satisfy your use case?

@aaronlevy
Copy link
Contributor

@derekparker is out of office this week

@vishh I tested #27303 and it doesn't resolve this issue.

Repro is adding a simple api pod manifest with hostNetwork: true to a static-pod dir, then starting a kubelet which can't contact an api-server. Example pod:

apiVersion: v1
kind: Pod
metadata:
  name: dapi-test-pod
spec:
  hostNetwork: true
  containers:
    - name: test-container
      image: gcr.io/google_containers/busybox
      command: [ "$(MY_POD_IP)" ]
      env:
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
  restartPolicy: Never

@k8s-bot
Copy link

k8s-bot commented Jun 14, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 15, 2016
@aaronlevy
Copy link
Contributor

Fwiw, I opened an alternative PR here: #27508

@k8s-github-robot
Copy link

@derekparker PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2016
@vishh
Copy link
Contributor

vishh commented Jun 23, 2016

@derekparker @aaronlevy Can we close this PR in favor of #27508 ?

@derekparker
Copy link
Contributor Author

@vishh I'm fine with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants