nmstate operator cannot implement DNS change (aborted)
Issue
- While implementing an update to /etc/resolv.conf via nmstate operator nncp.yaml file, you are met with the following error message or similar:
conditions:
- lastHeartbeatTime: "2023-08-10T19:04:21Z"
lastTransitionTime: "2023-08-10T19:04:19Z"
reason: FailedToConfigure
status: "False"
type: Available
- lastHeartbeatTime: "2023-08-10T19:04:21Z"
lastTransitionTime: "2023-08-10T19:04:19Z"
message: 1/10 nodes failed to configure, 9 nodes aborted configuration
reason: FailedToConfigure
status: "True"
type: Degraded
- NNCE output for the failed implementation includes the following block (or similar)
2023-08-10T14:51:23.767989283-04:00 {"level":"error","ts":"2023-08-10T18:51:23.767Z","logger":"controllers.NodeNetworkConfigurationPolicy","msg":"","nodenetworkconfigurationpolicy":"/worker-ens192-dns-policy","error":"policy has failing enactments, aborting","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/src/github.com/openshift/kubernetes-nmstate/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/openshift/kubernetes-nmstate/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/openshift/kubernetes-nmstate/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/src/github.com/openshift/kubernetes-nmstate/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227"}
- The nncp yaml you are attempting to implement seems to match the documentation:
spec:
desiredState:
dns-resolver:
config:
search:
- domain.net
- domain.com
server:
- xxx.xxx.xxx.200
- xxx.xxx.xxx.62
interfaces:
- ipv4:
auto-dns: false
dhcp: false
enabled: true
name: ens192 #<---this is the primary nic for your node(s) and may vary in your current situation
state: up
type: ethernet
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4.10 ~
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.