IBM Support

Portal upgrade might get stuck in pending after editing CR version

Troubleshooting


Problem

API Connect 10.0.5.2 introduces a validation to the Portal backup and restore CR to ensure correctness by using webhooks.
Users might experience an issue where the operator attempts to inject new fields, but the operator is unable to save the CR as it's invalid and the operator gets itself into an infinite loop.

Symptom

Users experiencing this situation sees log lines in the operator like: 
vportalrestore.kb.io denied the request.
vportalbackup.kb.io denied the request.

Resolving The Problem

To resolve the issue, you need to disable webhooks in order to delete the bad CRs.
 
  1. Run 
    kubectl get validatingwebhookconfigurations 
    ​​​​​​​
    to get the name of the webhook. The webhook name is something like ibm-apiconnect-validating-webhook-configuration (or it is ibm-apiconnect-<namespace>-validating-webhook-configuration)
  2. Run 
    kubectl get validatingwebhookconfigurations ibm-apiconnect-validating-webhook-configuration -o yaml > portal-webhook.yaml
     
    The command saves the webhook, so we can reapply it later
  3. Run 
    kubectl delete validatingwebhookconfigurations ibm-apiconnect-validating-webhook-configuration
  4. Then, we can delete the problematic CRs. You can find the names of the problematic CRS in the operator log and delete them individually or you can delete all the CRs to be safe by using the command
     
    kubectl delete pr --all && kubectl delete pb --all
  5. Then, re apply webhook with 
    kubectl apply -f portal-webhook.yaml

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"ARM Category":[{"code":"a8m3p0000000rXbAAI","label":"API Connect-\u003EDeveloper Portal (MM)-\u003EUpgrade"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0.5"}]

Document Information

Modified date:
03 January 2023

UID

ibm16848517