F5Networks / k8s-bigip-ctlr

Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Apache License 2.0
355 stars 193 forks source link

Update to CISv2.1.1 failed with code 422 - partition cannot removed due to remaining objects #1542

Closed joebride closed 3 years ago

joebride commented 3 years ago

Setup Details

CIS Version : 2.1.1
Build: f5networks/k8s-bigip-ctlr:2.1.1
BIGIP Version: Big IP 14.1.2.5 (ENG-Build 0.101.3) AS3 Version: 3.20
Agent Mode: AS3
Orchestration: K8S/OSCP
Orchestration Version: OpenShift v3.11.219
Pool Mode: Cluster Additional Setup details: <Platform/CNI Plugins/ cluster nodes/ etc>

Description

Update from CISv1.14 (or CISv2.0.0) to CISv2.1.1 fails with the following error-messages: 2020/10/14 16:05:16 [ERROR] [AS3] Raw response from Big-IP: map[code:422 declaration:HTML Tag-like Content in the Request URL/Body results:[map[code:422 host:localhost message:declaration failed response:0107082a:3: All objects must be removed from a partition (appaotel1_AS3) before the partition may be removed, type ID (13533) runTime:5014 tenant:appaotel1_AS3]]]

I tested it with and without as3-override-configmap. In both cases it does not work!

Steps To Reproduce

1) use CISv1.14 or CISv2.0.0 as starting point 2) stop CIS 3) change image - parameter properly 4) start CIS with new image-parameter

Expected Result

Update must be performed successfully!

Actual Result

Update does not work!

Diagnostic Information

BIG-IP log: [I][3145939][14 Oct 2020 16:05:16 UTC][ForwarderPassThroughWorker] {"user":"local/XXX","method":"POST","uri":"http://localhost:8100/mgmt/shared/appsvcs/declare/","status":422,"from":"10.171.230.100"}

CIS-parameters containers:

Observations (if any)

mdditt2000 commented 3 years ago

@joebride please can you review the following link to assist with migration from CIS 1.14 to CIS 2.x. I understand this document describes CCCL to AS3. In your case you are already using AS3.

Step 1

Step 2

Step 3

Similar to the document i posted except you are not changing the API. https://github.com/mdditt2000/openshift-3-11/blob/master/enviroment/migration/migration.md#upgrading-from-cis-1x-to-cis-21-and-above-using-cccl-to-as3

mdditt2000 commented 3 years ago

The error you are seeing will be removed once going from CIS 2.0 to CIS 2.1. In CIS 2.1 we are removing the _AS3 partition and moving all those objects to the base CIS partition. '--bigip-partition=appaotel1'

joebride commented 3 years ago

the described update-procedure does not work. please contact me.

mdditt2000 commented 3 years ago

GUI objects were getting created in appaotel1_AS3 for AWAF analytics. Since AS3 never created these objects they couldn't get moved by CIS/AS3. Had to resort to remove the objects by changing the bigip.conf file. One we changed to a new bigip.conf file. CIS no longer received the 422.