diff --git a/cluster/charts/rook-ceph/templates/resources.yaml b/cluster/charts/rook-ceph/templates/resources.yaml index a0148a7bf..74c8554f8 100644 --- a/cluster/charts/rook-ceph/templates/resources.yaml +++ b/cluster/charts/rook-ceph/templates/resources.yaml @@ -1244,7 +1244,6 @@ spec: description: HostNetwork to enable host network type: boolean ipFamily: - default: IPv4 description: IPFamily is the single stack IPv6 or IPv4 protocol enum: - IPv4 diff --git a/cluster/examples/kubernetes/ceph/crds.yaml b/cluster/examples/kubernetes/ceph/crds.yaml index 303d8a1c6..e7b1f64fa 100644 --- a/cluster/examples/kubernetes/ceph/crds.yaml +++ b/cluster/examples/kubernetes/ceph/crds.yaml @@ -1244,7 +1244,6 @@ spec: description: HostNetwork to enable host network type: boolean ipFamily: - default: IPv4 description: IPFamily is the single stack IPv6 or IPv4 protocol enum: - IPv4 diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index 5685a4c74..3059f2d10 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -1644,7 +1644,6 @@ type NetworkSpec struct { // IPFamily is the single stack IPv6 or IPv4 protocol // +kubebuilder:validation:Enum=IPv4;IPv6 - // +kubebuilder:default=IPv4 // +nullable // +optional IPFamily IPFamilyType `json:"ipFamily,omitempty"` diff --git a/pkg/operator/ceph/cluster/watcher.go b/pkg/operator/ceph/cluster/watcher.go index e6b3ffac8..9e3bf676c 100644 --- a/pkg/operator/ceph/cluster/watcher.go +++ b/pkg/operator/ceph/cluster/watcher.go @@ -19,11 +19,13 @@ package cluster import ( "context" + "strings" cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1" "github.com/rook/rook/pkg/clusterd" cephclient "github.com/rook/rook/pkg/daemon/ceph/client" discoverDaemon "github.com/rook/rook/pkg/daemon/discover" + opcontroller "github.com/rook/rook/pkg/operator/ceph/controller" "github.com/rook/rook/pkg/operator/k8sutil" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" @@ -107,6 +109,10 @@ func (c *clientCluster) onK8sNode(object runtime.Object) bool { clusterInfo := cephclient.AdminClusterInfo(cluster.Namespace) osds, err := cephclient.GetOSDOnHost(c.context, clusterInfo, nodeName) if err != nil { + if strings.Contains(err.Error(), opcontroller.UninitializedCephConfigError) { + logger.Debug(opcontroller.OperatorNotInitializedMessage) + return false + } // If it fails, this might be due to the the operator just starting and catching an add event for that node logger.Debugf("failed to get osds on node %q, assume reconcile is necessary", nodeName) return true