Closed
Description
I'm trying containervm with kubelet built from head and this YAML file:
https://cloud.google.com/compute/docs/containers/container_vms#create_the_manifest
The YAML file is v1beta2 and doesn't set a name to the Pod. When starting kubelet, it doesn't start the "nc" echo server and complains about this on the logs:
config.go:307] Pod[1] (<empty-name>.url-a75326da) from http failed validation, ignoring: name: required value ''
Chatting with @dchen1107 on IM she mentioned it might be due to a change from @thockin that now requires non-empty pod names (replaces random generation with validation for non-emptiness) but that means all existing YAML files (even the ones with an older version) will stop working... Is that expected?
Thanks!
Filipe
Activity
dchen1107 commentedon Jan 16, 2015
Yes, the latest kubelet call validation on all sources: etcd, file, http, etc. now, and PodName is a required field. One potential fix for this is also invoke conversion code before call validation, like what we have done at apiserver.
Thoughts? @thockin
filbranden commentedon Jan 16, 2015
Just so I get unblocked... Do you have an example YAML file that will set the pod name and will work?
Right now this is what I'm using:
Should I bump up version to v1beta3 and include a new
- pod: whatever
field somewhere?Thanks!
Filipe
erictune commentedon Jan 17, 2015
The type of that yaml is not pod, and the kubelet code doesn't know how to read pods from a file.
So, I think @thockin change needs to be reverted before you can make the next ContainerVM release.
The v1beta2 vs v1beta3 should not have anything to do with it, unless I'm misunderstanding.
erictune commentedon Jan 17, 2015
Or will it work to do this:
erictune commentedon Jan 17, 2015
Still, not sure if you want to release a containerVM version that doesn't accept the old format?
filbranden commentedon Jan 17, 2015
Thanks @erictune I made it work with the YAML above!
I still have errors in the logs:
But the docker containers are being brought up...
It's weird that
id
is the YAML field that is missing, considering the source seems to say it's a deprecated field that will be removed at some point...https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/types.go#L1085
I agree with your point that this needs to be fixed at head before the next containervm release.
I opened #3573 to increase test coverage of standalone kubelet since we have been seeing many changes break that model recently.
Cheers,
Filipe
erictune commentedon Jan 17, 2015
id in v1beta2 maps to name in v1beta3
Tim's change made name required. The internal representation is like v1beta3. But v1beta3 is not officially stable so we don't want to use it in the GKE or containerVM docs.
dchen1107 commentedon Jan 22, 2015
The issue is caused by #3242, and affect both v0.8 and v0.9 release for standalone kubelet to support old format ContainerManifests.
thockin commentedon Jan 22, 2015
Ugh, I thought ID was really required. I spoke with Dawn a bit, and here's my thinking.
13 remaining items