-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-8.6.0
-
None
-
None
-
None
-
rhel-net-mgmt
-
2
-
False
-
False
-
-
None
-
None
-
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
What were you trying to do that didn't work?
Delete (state:absent) a network interface with altnames set.
What is the impact of this issue to you?
Blocks CNF-18444
Please provide the package NVR for which the bug is seen:
nmstatectl-2.2.54
How reproducible is this bug?:
100%
Steps to reproduce
- Configure network interface, including add altname
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
name: altname-wo-identifier
spec:
nodeSelector:
kubernetes.io/hostname: worker0
desiredState:
interfaces:
- name: ens1f0np0
state: up
type: ethernet
alt-names:
- name: altnamewithoutidentifier
ipv4:
enabled: false
ipv6:
enabled: false
sh-5.1# ip addr show ens1f0np0
4: ens1f0np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether b8:3f:d2:af:9a:84 brd ff:ff:ff:ff:ff:ff
altname enp157s0f0np0
altname altnamewithoutidentifier
2. Delete network interface
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
name: altname-wo-identifier
spec:
nodeSelector:
kubernetes.io/hostname: worker0
desiredState:
interfaces:
- name: ens1f0np0
state: absent
type: ethernet
alt-names:
- name: altnamewithoutidentifier
ipv4:
enabled: false
ipv6:
enabled: false
sh-5.1# ip addr show ens1f0np0
4: ens1f0np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether b8:3f:d2:af:9a:84 brd ff:ff:ff:ff:ff:ff
altname enp157s0f0np0
altname altnamewithoutidentifier
inet6 fe80::ba3f:d2ff:feaf:9a84/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Expected results
The network interface should have been deleted/unconfigured alongside with removing the added altname "altnamewithoutidentifier"
Actual results
No changes.
Another scenario
Another scenario that is not working as expected is setting `state:absent` to both altname and main interface:
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
name: altname-wo-identifier
spec:
desiredState:
interfaces:
- alt-names:
- name: existingaltname
state: absent
ipv4:
enabled: false
ipv6:
enabled: false
name: ens1f0np0
state: absent
type: ethernet
nodeSelector:
kubernetes.io/hostname: worker0
No changes whatsoever:
4: ens1f0np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether b8:3f:d2:af:9a:84 brd ff:ff:ff:ff:ff:ff
altname enp157s0f0np0
altname existingaltname
The workaround is a 2-step process for users to remove interface and altname:
- Step 1: remove altname only
- Step 2: remove interface