Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1692869 - Unable to enable propagation of new types once "deployments.apps" type is enabled
Summary: Unable to enable propagation of new types once "deployments.apps" type is ena...
Keywords:
Status: ON_QA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Federation
Version: 4.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.1.0
Assignee: Maru Newby
QA Contact: Qin Ping
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-26 15:42 UTC by Mario Vázquez
Modified: 2019-04-12 21:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Mario Vázquez 2019-03-26 15:42:56 UTC
Description of problem:

Enabling new types fails if "deployments.apps" type has been enabled before.


Version-Release number of selected component (if applicable):

OCP ClusterVersion 4.0.0-0.7

Federation deployed using the 0.0.7 CSV

kubefed2 version: version.Info{Version:"v0.0.7", GitCommit:"3e251608ca5357080b95a0bedc45759652f17d29", GitTreeState:"clean", BuildDate:"2019-03-22T22:30:26Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

Federation Controller Image: quay.io/kubernetes-multicluster/federation-v2:v0.0.7
 

How reproducible:

Always


Steps to Reproduce:

./kubefed2 enable deployments.apps --federation-namespace federation-test
customresourcedefinition.apiextensions.k8s.io/federateddeployments.types.federation.k8s.io created
federatedtypeconfig.core.federation.k8s.io/deployments.apps created in namespace federation-test

./kubefed2 enable namespaces --federation-namespace federation-test
F0326 16:27:45.753569   18104 enable.go:112] error: Error initializing validation schema accessor: Error loading openapi schema: SchemaError(io.k8s.federation.types.v1alpha1.FederatedDeployment.spec.retainReplicas): Unknown primitive type: "bool"

./kubefed2 disable deployments.apps --federation-namespace federation-test
Disabled propagation for FederatedTypeConfig "federation-test/deployments.apps"

./kubefed2 enable namespaces --federation-namespace federation-test
F0326 16:28:06.602719   18303 enable.go:112] error: Error initializing validation schema accessor: Error loading openapi schema: SchemaError(io.k8s.federation.types.v1alpha1.FederatedDeployment.spec.retainReplicas): Unknown primitive type: "bool"


Actual results:

You cannot enable any type after enabling "deployments.apps" type

Expected results:

You can enable any type after enabling "deployments.apps" type


Additional info:

eg. If I enable namespaces and then deployments, I can propagate deployments across multiple clusters. So it seems this is only affecting to new types propagation enablement.

Comment 1 Paul Morie 2019-03-27 20:51:04 UTC
I've had a few different users come to me about this bug.

One thing that looks weird to me:

   io.k8s.federation.types.v1alpha1.FederatedDeployment.spec.retainReplicas

That seems incorrect. I would have expected to see:

   io.k8s.federation.types.v1alpha1.FederatedDeployment.spec.template.retainReplicas

Perhaps that's related to this issue.

Comment 2 Maru Newby 2019-03-27 22:07:19 UTC
`spec.retainReplicas` is correct:

https://github.com/kubernetes-sigs/federation-v2/blob/master/docs/userguide.md#scalable

The field type was incorrectly specified as `bool` instead of `boolean`. Upstream fix is https://github.com/kubernetes-sigs/federation-v2/pull/698

This bug does not exhibit on kubernetes 1.12, the current upstream test target, and presumably the 1.13 base of openshift 4.0 enables validation of openapi schema.  The version of kubernetes used for testing is tied to the version of kubebuilder we're using, so shashi's work to update to latest kubebuilder should also ensure the upstream testing uses the most recent kube release.

Comment 3 Maru Newby 2019-04-10 22:06:47 UTC
This is fixed in upstream, and this issue will need to be moved to ON_QA after the next operator release.


Note You need to log in before you can comment on or make changes to this bug.