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

federation: creating events on federation namespaces is failing #33292

Closed
nikhiljindal opened this Issue Sep 22, 2016 · 11 comments

Comments

@nikhiljindal
Copy link
Member

nikhiljindal commented Sep 22, 2016

#31640 added events to federation namespace controller, but creating namespace events is failing on our e2e tests:

Server rejected event '&api.Event{TypeMeta:unversioned.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:api.ObjectMeta{Name:"e2e-tests-federation-replicaset-s7xan.147625127063baf8", GenerateName:"", Namespace:"default", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:unversioned.Time{Time:time.Time{sec:0, nsec:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*unversioned.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]api.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:""}, InvolvedObject:api.ObjectReference{Kind:"Namespace", Namespace:"", Name:"e2e-tests-federation-replicaset-s7xan", UID:"80f0b389-7f78-11e6-898f-0a580ab50304", APIVersion:"v1", ResourceVersion:"4", FieldPath:""}, Reason:"CreateInCluster", Message:"Creating namespace in cluster federation-e2e-gce-us-central1-f", Source:api.EventSource{Component:"federated-namespace-controller", Host:""}, FirstTimestamp:unversioned.Time{Time:time.Time{sec:63610003489, nsec:135639288, loc:(*time.Location)(0x84ad960)}}, LastTimestamp:unversioned.Time{Time:time.Time{sec:63610003489, nsec:135639288, loc:(*time.Location)(0x84ad960)}}, Count:1, Type:"Normal"}': 'namespaces "default" not found' (will not retry!)

It is because, namespaces do not have ObjectMeta.Namespace set and the event recorder library uses that to figure out the namespace in which the event should be generated:

namespace := ref.Namespace
.

We have 2 options to fix this:

  • Update the library to use the namespace name if the ObjectReference is for a namespace object.
  • Ensure that api.NamespaceDefault namespace exists in federation

cc @kubernetes/sig-cluster-federation

@nikhiljindal

This comment has been minimized.

Copy link
Member Author

nikhiljindal commented Sep 23, 2016

@lavalamp pointed out that the first option will not work for ex: when we are trying to create an event for "CouldNotCreateNamespace". Since that namespace does not exist, we will not be able to create the event in that namespace.
So will have to go with the second option i.e to ensure that namespace default exists in federation control plane

@dims

This comment has been minimized.

Copy link
Member

dims commented Nov 16, 2016

This needs to be triaged as a release-blocker or not for 1.5 @nikhiljindal @lavalamp

@dims

This comment has been minimized.

Copy link
Member

dims commented Nov 18, 2016

@nikhiljindal all issues must be labeled either release blocker or non release blocking by end of day 18 November 2016 PST. (or please move it to 1.6) cc @kubernetes/sig-cluster-federation

@madhusudancs

This comment has been minimized.

Copy link
Contributor

madhusudancs commented Nov 19, 2016

This is not a release blocker for v1.5 either.

@madhusudancs madhusudancs modified the milestones: v1.6, v1.5 Nov 19, 2016

@ethernetdan

This comment has been minimized.

Copy link
Member

ethernetdan commented Mar 13, 2017

Moving to 1.7 as late to happen in 1.6. Feel free to switch back if this is incorrect.

@ethernetdan ethernetdan modified the milestones: v1.7, v1.6 Mar 13, 2017

@ahmetb

This comment has been minimized.

Copy link
Member

ahmetb commented Mar 29, 2017

I am going to just type a few keywords here because this issue doesn't come up when you search on Google. It is not documented anywhere (incl. tutorials) that kubefed doesn't create the default namespace.

  • kubefed does not create default namespace
  • kubernetes federation default namespace missing
  • Error from server (NotFound): namespaces "default" not found
@clenimar

This comment has been minimized.

Copy link

clenimar commented Apr 27, 2017

is anyone working on this issue? @nikhiljindal

@nikhiljindal

This comment has been minimized.

Copy link
Member Author

nikhiljindal commented Apr 27, 2017

Not that I know of.
The task here is to call BootstrapController at pkg/master/controller from federation-apiserver. It is right now being called only from kube-apiserver.

That controller creates both the kubernetes service and the default namespace. In federation we only need the default namespace. Will also need to refactor the code since federation cant depend on pkg/master (pkg/master is kubernetes specific code).

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Sep 5, 2017

[MILESTONENOTIFIER] Milestone Labels Incomplete

@nikhiljindal

Action required: This issue requires label changes. If the required changes are not made within 3 days, the issue will be moved out of the v1.8 milestone.

kind: Must specify at most one of ['kind/bug', 'kind/feature', 'kind/cleanup'].
priority: Must specify at most one of ['priority/critical-urgent', 'priority/important-soon', 'priority/important-longterm'].

Additional instructions available here

@nikhiljindal nikhiljindal modified the milestones: next-candidate, v1.8 Sep 5, 2017

@quinton-hoole

This comment has been minimized.

Copy link
Member

quinton-hoole commented Sep 8, 2017

This is required for GA. Prioritizing accordingly.

@irfanurrehman

This comment has been minimized.

Copy link
Member

irfanurrehman commented Oct 30, 2017

This issue was labelled only for sig/multicluster and is thus moved over to kubernetes/federation#73.
If this does not seem to be right, please reopen this and notify us @kubernetes/sig-multicluster-misc.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.