APS: Deletion Support for Pre-provisioned Configurations

Problem in EFA 2.3.2

Creation of EFA entities (PO and EPG) on an admin down device followed by the Deletion of the same EFA entities (PO and EPG) on the same admin down device used to fail even though the configuration was never pushed to the devices.

Solution in EFA 2.4.0

Succeed the deletion of the EFA entities (PO and EPG) if the resultant configuration to be deleted has never been pushed to the devices.

Pre-provisioned config

The pre-provisioned config is present in EFA DB and not present on the SLX.

efa inventory admin-state  show --ip 10.20.246.15
+----------------------+--------------+
|         NAME         |    VALUE     |
+----------------------+--------------+
| Device IP            | 10.20.246.15 |
+----------------------+--------------+
| Admin State          | down         |
+----------------------+--------------+
| Health Check Status  | Disable      |
+----------------------+--------------+

efa inventory admin-state  show --ip 10.20.246.16
+----------------------+--------------+
|         NAME         |    VALUE     |
+----------------------+--------------+
| Device IP            | 10.20.246.16 |
+----------------------+--------------+
| Admin State          | up           |
+----------------------+--------------+
| Health Check Status  | Disable      |
+----------------------+--------------+
efa tenant po create --name ten1po1 --tenant ten1 --port 10.20.246.15[0/1],10.20.246.16[0/1] --speed 10Gbps --negotiation active
efa tenant vrf create --name ten1vrf1 --tenant ten1
efa tenant epg create --name ten1epg1 --tenant ten1 --po ten1po1 --switchport-mode trunk --ctag-range 11-12 --anycast-ip 11:10.0.11.1/24 --anycast-ip 12:10.0.12.1/24 --vrf ten1vrf1
efa tenant service bgp peer create --name ten1bgppeer1 --tenant ten1 --ipv4-uc-nbr 10.20.246.15,ten1vrf1:10.0.0.0,65001 --ipv4-uc-nbr 10.20.246.16,ten1vrf1:10.1.0.0,65001
efa tenant service bgp peer-group create --name ten1bgppeergroup1 --tenant ten1 --pg-name 10.20.246.15:pg1 --pg-asn 10.20.246.15,pg1:65010  --pg-name 10.20.246.16:pg1 --pg-asn 10.20.246.16,pg1:65010

efa tenant po show
+---------+--------+----+--------------------------+--------+-------------+--------------+-------------------+-------------+------------+-----------------+-----------+
|  Name   | Tenant | ID |       Description        | Speed  | Negotiation | MinLinkCount |       Ports       | LacpTimeout |   State    |    Dev-State    | App-State |
+---------+--------+----+--------------------------+--------+-------------+--------------+-------------------+-------------+------------+-----------------+-----------+
| ten1po1 | ten1   | 1  | EFA Port-channel ten1po1 | 10Gbps | active      | 1            | 10.20.246.15[0/1] | long        | po-created | not-provisioned | cfg-ready |
|         |        |    |                          |        |             |              | 10.20.246.16[0/1] |             |            |                 |           |
+---------+--------+----+--------------------------+--------+-------------+--------------+-------------------+-------------+------------+-----------------+-----------+

efa tenant service bgp peer-group show
===============================================================================================================================================================
Name        : ten1bgppeergroup1
Tenant      : ten1
State       : bgp-pg-state-created
Description :
+--------------+-----------------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
|  Device IP   | PEER-GROUP-NAME | REMOTE ASN | BFD Enabled | BFD Interval | BFD Rx | BFD Multiplier | Next-Hop-Self | Update-Source-IP |    Dev-state    |  App-state  |
+--------------+-----------------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
| 10.20.246.16 | pg1             | 65010      | false       | 0            | 0      | 0              | false         |                  | provisioned     | cfg-in-sync |
+--------------+-----------------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
| 10.20.246.15 | pg1             | 65010      | false       | 0            | 0      | 0              | false         |                  | not-provisioned | cfg-ready   |
+--------------+-----------------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
===============================================================================================================================================================

efa tenant vrf show --name ten1vrf1 --tenant ten1
===============================================================================================================================================================
Name                    : ten1vrf1
Vrf State               : vrf-device-created
Vrf Device State        : not-provisioned
Vrf App State           : cfg-ready
Tenant Name             : ten1
Routing Type            : distributed
L3 VNI                  : 8191
IRB BD                  : 4095
IRB VE                  : 8191
BR BD                   :
BR VE                   :
BR VNI                  : 4096
RH max path             :
RH ecmp enable          :
Graceful restart enable :
Route Target            : import 101:101
                        : export 101:101
Static Route            : Switch-IP->Network,Nexthop-IP[Route-Distance], ...
                        :
Local Asn               :
Static Route BFD        : Switch-IP->[DestIP,SourceIP][Interval,Min-Rx,Multiplier], ...
                        :
Max Path                : 8
Redistribute            : connected
===============================================================================================================================================================

efa tenant epg show
===============================================================================================================================================================
Name          : ten1epg1
Tenant        : ten1
Description   :
Type          : extension
Ports         :
POs           :
              : unstable            : ten1po1
Port Property : switchport mode     : trunk
              : native-vlan-tagging : false
NW Policy     : ctag-range          : 11-12
              : vrf                 : ten1vrf1 [unstable]
              : l3-vni              : 8191
Network Property [Flags : * - Native Vlan]
+------+--------+--------------+--------------+---------+--------------------------------+-------------------------+-------------+-----------------------+---------------------+-----------------+-----------+
| Ctag | L2-Vni | Anycast-IPv4 | Anycast-IPv6 | BD-name | Local IP (Device-IP->Local-IP) |    Ctag-Description     | Mtu-IPv6-ND | ManagedConfig-IPv6-ND | OtherConfig-IPv6-ND |    Dev-state    | App-state |
+------+--------+--------------+--------------+---------+--------------------------------+-------------------------+-------------+-----------------------+---------------------+-----------------+-----------+
| 11   | 11     | 10.0.11.1/24 |              |         |                                | Tenant L3 Extended VLAN |             | False                 | False               | not-provisioned | cfg-ready |
+------+--------+--------------+--------------+---------+--------------------------------+-------------------------+-------------+-----------------------+---------------------+-----------------+-----------+
| 12   | 12     | 10.0.12.1/24 |              |         |                                | Tenant L3 Extended VLAN |             | False                 | False               | not-provisioned | cfg-ready |
+------+--------+--------------+--------------+---------+--------------------------------+-------------------------+-------------+-----------------------+---------------------+-----------------+-----------+
For 'unstable' entities, run 'efa tenant po/vrf show' for details
===============================================================================================================================================================

efa tenant service bgp peer show
============================================================================================================================================================================================
Name        : ten1bgppeer1
Tenant      : ten1
State       : bs-state-created
Description :
Static Peer:
+--------------+----------+------+---------+-----------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
|  Device IP   |   VRF    | AFI  |  SAFI   | REMOTE IP | REMOTE ASN | BFD Enabled | BFD Interval | BFD Rx | BFD Multiplier | Next Hop Self | Update Source IP |    Dev-state    |  App-state  |
+--------------+----------+------+---------+-----------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
| 10.20.246.16 | ten1vrf1 | ipv4 | unicast | 10.1.0.0  | 65001      | false       | 0            | 0      | 0              | false         |                  | provisioned     | cfg-in-sync |
+--------------+----------+------+---------+-----------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
| 10.20.246.15 | ten1vrf1 | ipv4 | unicast | 10.0.0.0  | 65001      | false       | 0            | 0      | 0              | false         |                  | not-provisioned | cfg-ready   |
+--------------+----------+------+---------+-----------+------------+-------------+--------------+--------+----------------+---------------+------------------+-----------------+-------------+
Dynamic Peer:
+-----------+-----+-----+------+--------------+------------+--------------+-----------+-----------+
| Device IP | VRF | AFI | SAFI | Listen Range | Peer Group | Listen Limit | Dev-state | App-state |
+-----------+-----+-----+------+--------------+------------+--------------+-----------+-----------+
============================================================================================================================================================================================
Scenario (Deletion of pre-provisioned config) EFA 2.3.2 EFA 2.4.0
efa tenant service bgp peer delete
 --name ten1bgppeer1 --tenant ten1
BgpService Deletion Failed:
Device: 10.20.246.15 Bgp Peer Error: 
Device is administratively down
BgpService deleted successfully
efa tenant service bgp peer-group delete
 --name ten1bgppeergroup1 --tenant ten1
BgpService deletion Failed:
Device: 10.20.246.15 Bgp Peer Error: 
Device is administratively down
BgpService deleted successfully
efa tenant epg delete
 --name ten1epg1 --tenant ten1
EndpointGroup deletion failed:
Error: [10.20.246.15] device(s) are 
administratively down
EndpointGroup: ten1epg1 deleted successfully
efa tenant po delete
 --name ten1po1 --tenant ten1
Portchannel deletion failed:
Error: [10.20.246.15] device(s) are 
administratively down
PortChannel: ten1po1 deleted successfully