Bug 2219401

Summary: [RFE] NMState to revert configuration on the nodes when NNSP is removed
Product: Red Hat Enterprise Linux 9 Reporter: Quique Llorente <ellorent>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED MIGRATED QA Contact: Mingyu Shi <mshi>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.2CC: ferferna, jiji, jishi, network-qe, sfaye, till
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-17 12:21:26 UTC Type: Story
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Quique Llorente 2023-07-03 13:33:10 UTC
Description of problem:

Clone of https://issues.redhat.com/browse/RFE-4210

New OCP node is installed with basic network configuration (network interface has an IP assigned for installation purposes)
NodeNetworkConfigurationPolicy (NNSP) is applied to configure netwok on the node.
NNSP is removed by the administrator.
Request:

The configuration of the node should be reverted to the state before NNSP has been applied when an NNSP is removed.
 

Without preparing for the situation and having an NNSP with the original state it is currently impossible to revert to the original state.
According to the customer this is not 'Kubernetes like' behavior.
 

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


How reproducible: Always


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Till Maas 2023-07-03 17:10:43 UTC
Thank you for the report. Could you please clarify how to reproduce this with Nmstate and write down the current and the expected behavior to clarify what the request is about. Thanks.

Comment 4 Gris Ge 2023-07-06 11:28:03 UTC
Hi Till,

After follow up reporter, they are expecting nmstate to provider a way to generate reverse network state YAML file on specified desired state.
By storing the reverse state in `openshift-nmstate` operator, the operator could revert the network when customer is uninstalling the `openshift-nmstate` operator.

For implementation, nmstatectl will provide API and CLI like:

nmstatectl gen-revert desire_state.yml -c optional_current_state.yml