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

Make Reflector helpers reusable. #3285

Merged
merged 1 commit into from
Jan 7, 2015

Conversation

erictune
Copy link
Member

@erictune erictune commented Jan 7, 2015

Scheduler uses Reflector from pkg/client/cache.
It defines some helper classes.
I'd like to use those helpers with pkg/client/cache
in kube-proxy and kubelet too.

Scheduler uses Reflector from pkg/client/cache.
It defines some helper classes.
I'd like to use those helpers with pkg/client/cache
in kube-proxy and kubelet too.
@lavalamp lavalamp self-assigned this Jan 7, 2015
@@ -44,9 +44,9 @@ kube::test::find_pkgs() {
}

# -covermode=atomic becomes default with -race in Go >=1.3
KUBE_COVER=${KUBE_COVER:--cover -covermode=atomic}
KUBE_COVER="" #${KUBE_COVER:--cover -covermode=atomic}
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated? Debug changes?

@lavalamp
Copy link
Member

lavalamp commented Jan 7, 2015

LGTM

thockin added a commit that referenced this pull request Jan 7, 2015
@thockin thockin merged commit d314862 into kubernetes:master Jan 7, 2015
@erictune erictune deleted the public_reflectors branch January 8, 2015 00:22
// ListWatch knows how to list and watch a set of apiserver resources.
func (lw *ListWatch) List() (runtime.Object, error) {
return lw.Client.
Get().
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @erictune

I'm trying to run a kubelet from head in standalone mode (containervm with a --manifest_url flag) and it's crashing on this line, I assume lw.Client is undefined in that specific case... Can you please have a look?

@dchen1107 who is probably also interested in containervm.

Cheers,
Filipe

Copy link
Member Author

Choose a reason for hiding this comment

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

taking a look now

Copy link
Member Author

Choose a reason for hiding this comment

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

can you post the complete list of flags (okay to obscure values if needed) you used?

Copy link
Member Author

Choose a reason for hiding this comment

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

nevermind I see the problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure.

kubelet --manifest_url=http://metadata.google.internal/computeMetadata/v1beta1/instance/attributes/google-container-manifest --config=/etc/kubernetes/manifests

You can reproduce this easily by starting a new containervm instance:

gcloud compute instances create --image container-vm ... --metadata-from-file google-container-manifest=<yamlfile>.yaml

This is roughly the YAML snippet I'm using, I'm fairly certain you'll reproduce it with this:
https://cloud.google.com/compute/docs/containers/container_vms#create_the_manifest

Then SSH to your image, replace the kubelet binary with the one from head, edit /etc/default/kubelet to replace the flags with a single dash with two dashes (required since the switch to pflag which uses POSIX-like flags) and reboot it, you'll see this error.

But then, you might be able to reproduce it outside of GCE as well...

Thanks for taking a look at this! Ping me if you have questions for me.

Cheers,
Filipe

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

4 participants