Getting an error when un-deploying an API deployed to multiple labels through APICTL. The API is undeployed from one label. The error occurs when trying to un-deploy from the next label.
Adapter logs
adapter_1 | 2021-11-01 10:08:59 INFO [auth.go:156] - [auth.ValidateToken] [-] Valid token recieved
adapter_1 | 2021-11-01 10:08:59 INFO [server.go:441] - [xds.DeleteAPIs] [-] Unable to delete API SwaggerPetstore:1.0.5 from Organization carbon.super. API does not exist.
APICTL
$ apictl mg undeploy api -n SwaggerPetstore -v 1.0.5 -e dev -k -g Default
apictl: Error undeploying API Reason: the API does not exist
Exit status 1
Steps to reproduce:
Configure two gateway environments (Default and US).
Default: one enforcer, one router
US: one enforcer, one router
adapter is common
Add the following config to the adapter
# Default virtual host mapping for standalone mode
[[adapter.vhostMapping]]
# The Adapter environment
environment = "Default"
# Virtual host to map to the environment
vhost = "localhost"
# Default virtual host mapping for standalone mode
[[adapter.vhostMapping]]
# The Adapter environment
environment = "US"
# Virtual host to map to the environment
vhost = "us.wso2.com"
Deploy the pet-store API to both labels. Used the following deployment_environments.yaml file.
$ apictl mg deploy api -f petstore -e dev -k
Successfully deployed API to microgateway.
$ apictl mg get apis -e dev -k
Limit flag not set. Set to default: 25
APIs total: 2 received: 2
NAME VERSION TYPE CONTEXT GATEWAY_ENVS VHOST
SwaggerPetstore 1.0.5 HTTP /v2 [US Default] us.wso2.com
SwaggerPetstore 1.0.5 HTTP /v2 [Default] localhost
$ apictl mg undeploy api -n SwaggerPetstore -v 1.0.5 -e dev -k -g US
API undeployed from microgateway successfully!
$ apictl mg get apis -e dev -k
Limit flag not set. Set to default: 25
APIs total: 2 received: 2
NAME VERSION TYPE CONTEXT GATEWAY_ENVS VHOST
SwaggerPetstore 1.0.5 HTTP /v2 [Default] us.wso2.com
SwaggerPetstore 1.0.5 HTTP /v2 [Default] localhost
$ apictl mg undeploy api -n SwaggerPetstore -v 1.0.5 -e dev -k -g Default
apictl: Error undeploying API Reason: the API does not exist
Exit status 1
Even following command is not working
$ apictl mg undeploy api -n SwaggerPetstore -v 1.0.5 -e dev -k
apictl: Error undeploying API Reason: the API does not exist
Exit status 1
Description:
Getting an error when un-deploying an API deployed to multiple labels through APICTL. The API is undeployed from one label. The error occurs when trying to un-deploy from the next label.
Adapter logs
APICTL
Steps to reproduce:
Configure two gateway environments (Default and US).
Add the following config to the adapter
Deploy the pet-store API to both labels. Used the following
deployment_environments.yaml
file.Even following command is not working
Affected Product Version:
v1.0.0-alpha-snapshot
Environment details (with versions):
Optional Fields
Related Issues:
Suggested Labels:
Suggested Assignees: