Bug 2049949 - Creating of linux bridge is failing on nodes
Summary: Creating of linux bridge is failing on nodes
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 4.8.4
Hardware: x86_64
OS: All
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Petr Horáček
QA Contact: Ruth Netser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-02 23:28 UTC by ygohar
Modified: 2023-09-15 01:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-03 13:04:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description ygohar 2022-02-02 23:28:42 UTC
Description of problem:
Failed to setup Linux bridge on nodes using NodeNetworkConfigurationPolicy

Version-Release number of selected component (if applicable):
OCP 4.8.14
OCP Virtualization 4.8.4 

How reproducible:
Create an nncp object to create Linux-bridge on worker nodes

Steps to Reproduce:
1. Create linux bridge using below yaml
apiVersion: nmstate.io/v1beta1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: automation-vm
spec:
  nodeSelector:
   kubernetes.io/hostname: master0-mgnt
  desiredState:
    interfaces:
      - name: br-apps
        description: Linux bridge with eth1 as a port
        type: linux-bridge
        state: up
        ipv4:
          dhcp: true
          enabled: true
        bridge:
          options:
            stp:
              enabled: false
          port:
            - name: eno5
2. Creation of nncp will fail
3. master0-mgnt.automation-vm   FailedToConfigure

Actual results:
nncp failed to deploy linux bridge on nodes
master0-mgnt.automation-vm   FailedToConfigure

Expected results:
nncp successfully created

Additional info:
[mgnt@SSBastion mgnt]$ watch oc get nncp
[mgnt@SSBastion mgnt]$ oc get nnce
NAME                         STATUS
master0-mgnt.automation-vm   FailedToConfigure
master1-mgnt.automation-vm   NodeSelectorNotMatching
master2-mgnt.automation-vm   NodeSelectorNotMatching
(failed reverse-i-search)`': watch oc get ^Ccp
[mgnt@SSBastion mgnt]$ oc get nnce master0-mgnt.automation-vm -o jsonpath='{.status.conditions[?(@.type=="Failing")].message}'
error reconciling NodeNetworkConfigurationPolicy at desired state apply: , failed to execute nmstatectl set --no-commit --timeout 480: 'exit status 1' '' '/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py:325: UserWarning: Using 'set' is deprecated, use 'apply' instead.
  warnings.warn("Using 'set' is deprecated, use 'apply' instead.")
2022-02-02 23:23:43,078 root         DEBUG    Nmstate version: 1.0.2
2022-02-02 23:23:43,079 root         DEBUG    Applying desire state: {'interfaces': [{'bridge': {'options': {'stp': {'enabled': False}}, 'port': [{'name': 'eno5', 'vlan': {'mode': 'trunk', 'trunk-tags': [{'id-range': {'max': 4094, 'min': 2}}]}}]}, 'description': 'Linux bridge with eth1 as a port', 'ipv4': {'auto-dns': False, 'auto-gateway': False, 'dhcp': False, 'enabled': False}, 'name': 'br1', 'state': 'up', 'type': 'linux-bridge'}]}
2022-02-02 23:23:43,224 root         DEBUG    NetworkManager version 1.30.0
2022-02-02 23:23:43,242 root         DEBUG    Async action: Retrieve applied config: ethernet eno5 started
2022-02-02 23:23:43,244 root         DEBUG    Async action: Retrieve applied config: ethernet eno5 finished
2022-02-02 23:23:43,334 root         DEBUG    Interface lo is type unknown and will be ignored during the activation
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==1.0.2', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 73, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 326, in set
    return apply(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 354, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 407, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 78, in apply
    desired_state, ignored_ifnames, current_state, save_to_disk
  File "/usr/lib/python3.6/site-packages/libnmstate/net_state.py", line 72, in __init__
    self._ifaces.gen_dns_metadata(self._dns, self._route)
  File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/ifaces.py", line 675, in gen_dns_metadata
    iface_metadata = dns_state.gen_metadata(self, route_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/dns.py", line 117, in gen_metadata
    "name servers: %s" % server
libnmstate.error.NmstateValueError: Failed to find suitable interface for saving DNS name servers: 172.16.0.1

http://pastebin.test.redhat.com/1026501

Comment 1 Radim Hrazdil 2022-02-03 08:06:47 UTC
Hello,

Could you provide us with NodeNetworkState relevant for the node, where the policy failed?

--8<--
oc get nns <nodename>
-->8--

If there were other policies configured on the node prior to this one, that were related to DNS configuration,
having those may help.

Comment 2 Petr Horáček 2022-02-24 17:58:00 UTC
This could happen if the system has static DNS while your configuration requests dynamic IP addressing on the interface. Could you try explicitly disabling dynamic DNS in your spec?

        ipv4:
          dhcp: true
          auto-dns: false
          enabled: true

https://nmstate.io/devel/api.html#dns-client-configuration

Comment 3 Petr Horáček 2022-03-03 13:04:20 UTC
Closing due to lack of data. Feel free to reopen if you face it again.

Comment 4 Red Hat Bugzilla 2023-09-15 01:19:20 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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