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

servicecontroller needs to create namespaces in target clusters #27565

Closed
mml opened this issue Jun 16, 2016 · 5 comments
Closed

servicecontroller needs to create namespaces in target clusters #27565

mml opened this issue Jun 16, 2016 · 5 comments
Assignees
Labels
priority/backlog Higher priority than priority/awaiting-more-evidence.
Milestone

Comments

@mml
Copy link
Contributor

mml commented Jun 16, 2016

See #27564 for the error message that lead me to find this.

If you create a service with a namespace that doesn't exist in any target cluster, (and set --v=5) the servicecontroller logs the below:

I0616 20:14:44.703341       1 servicecontroller.go:862] Successfully procceeded services mml-e2e-foo/e2e-foo
I0616 20:14:44.703387       1 servicecontroller.go:791] Finished syncing service "mml-e2e-foo/e2e-foo" (186.398µs)
I0616 20:14:44.703425       1 servicecontroller.go:296] Process service mml-e2e-foo/e2e-foo for cluster federation-e2e-gce-us-central1-f
I0616 20:14:44.707795       1 servicecontroller.go:417] Service 'mml-e2e-foo/e2e-foo' is not found in cluster federation-e2e-gce-us-central1-f, trying to create new
I0616 20:14:44.712567       1 servicecontroller.go:424] Failed to create namespaces "mml-e2e-foo" not found
I0616 20:14:49.716028       1 servicecontroller.go:417] Service 'mml-e2e-foo/e2e-foo' is not found in cluster federation-e2e-gce-us-central1-f, trying to create new
I0616 20:14:49.720070       1 servicecontroller.go:424] Failed to create namespaces "mml-e2e-foo" not found
I0616 20:14:59.723764       1 servicecontroller.go:417] Service 'mml-e2e-foo/e2e-foo' is not found in cluster federation-e2e-gce-us-central1-f, trying to create new
I0616 20:14:59.727617       1 servicecontroller.go:424] Failed to create namespaces "mml-e2e-foo" not found
I0616 20:15:19.732110       1 servicecontroller.go:417] Service 'mml-e2e-foo/e2e-foo' is not found in cluster federation-e2e-gce-us-central1-f, trying to create new
I0616 20:15:19.735066       1 servicecontroller.go:424] Failed to create namespaces "mml-e2e-foo" not found

This doesn't come up in the e2e test because the test framework automatically creates the namespace with a matching name in the target cluster. It also often works fine in manual tests as long as you use the default namespace.

cc @quinton-hoole

@mml mml added this to the next-candidate milestone Jun 16, 2016
@mml
Copy link
Contributor Author

mml commented Jun 16, 2016

Possibly related to this, the federation-apiserver doesn't recognize the namespace type at all, meaning you can't delete namespaces to clean up after a test.

@nikhiljindal
Copy link
Contributor

nikhiljindal commented Jun 17, 2016

Yes this is not good, but we dont have namespaces in federation control plane yet. Users will have to ensure that namespaces exist in underlying clusters.
#26298 has some related discussion

Will fix this in 1.4

cc @kubernetes/sig-cluster-federation

@ghost
Copy link

ghost commented Jun 17, 2016

Even without namespaces in the federation control plane yet, we could in theory save users the trouble by creating the namespace in the underlying cluster if it does not exist yet, before trying to create services in that namespace. But that would make it inconsistent with the Kubernetes API (which does not automatically create missing namespaces). So what I suggest is:

  1. Have the e2e tests automatically create the namespaces in the underlying clusters before running the tests (and delete them afterwards), so that they pass. This is already happening.
  2. Have users either use the default namespace (which should just work, because it exists everywhere, by default), or create the namespace in the underlying clusters manually, if they want to use a non-default namespace.
  3. We need to expose the error clearly when they don't do that (e.g. in the Events associated with the FederatedService). I don't think that that is there yet, but should be easy to add to aid users debugging their setups.

@ghost
Copy link

ghost commented Jul 25, 2016

I think that this is pretty much all done elsewhere (federated namespaces, and events). Assigning to @nikhiljindal to close as appropriate.

@ghost ghost assigned nikhiljindal Jul 25, 2016
@ghost ghost modified the milestones: v1.4, next-candidate Jul 25, 2016
@ghost
Copy link

ghost commented Aug 18, 2016

Closing.

@ghost ghost closed this as completed Aug 18, 2016
@ghost ghost added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Aug 18, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

2 participants