skupperproject / skupper

Skupper is an implementation of a Virtual Application Network, enabling rich hybrid cloud communication.
http://skupper.io
Apache License 2.0
595 stars 74 forks source link

Cannot create Skupper Gateway: Error: gateway not created as existing gateway detected for site: #822

Closed bryonbaker closed 3 weeks ago

bryonbaker commented 2 years ago

What did you do?

I am trying to set up a gateway on my local machine (running OpenShift local) to a local postgresql database running outside openshift. Note: The problem also happens on AWS-hosted clusters so it is not about OpenShift Local. I have also validated the database is working properly. When I do this I am getting an error saying there is an existing gateway (which there was not as this is all a fresh install in the namespace), and also I can see the service is getting created. It is as though skupper is creating the service and then checking if the service does not exist.... Ideas?

What happened?

The command failed with the error: "Error: gateway not created as existing gateway detected for site"

What did you expect to happen?

The gateway to be created using podman

How to reproduce:

ONPREM:$ oc new-project skupper-test
Now using project "skupper-test" on server "https://api.crc.testing:6443/".

<snip>

ONPREM$ skupper init
Skupper is now installed in namespace 'skupper-test'.  Use 'skupper status' to get more information.

ONPREM$ oc get svc,pods
NAME                           TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)               AGE
service/skupper                ClusterIP   10.217.4.37    <none>        8080/TCP,8081/TCP     12s
service/skupper-router         ClusterIP   10.217.4.139   <none>        55671/TCP,45671/TCP   13s
service/skupper-router-local   ClusterIP   10.217.4.16    <none>        5671/TCP              14s

NAME                                              READY   STATUS    RESTARTS   AGE
pod/skupper-router-5695b54764-v2w22               2/2     Running   0          13s
pod/skupper-service-controller-6d47c78bf6-fqxql   1/1     Running   0          11s

ONPREM$ skupper gateway expose db 127.0.0.1 5432 --type podman
Error: gateway not created as existing gateway detected for site: fd488975-b045-44eb-9748-671e70ed63ec

ONPREM$ oc get svc,pods
NAME                           TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)               AGE
service/db                     ClusterIP   10.217.4.173   <none>        5432/TCP              46s
service/skupper                ClusterIP   10.217.4.37    <none>        8080/TCP,8081/TCP     66s
service/skupper-router         ClusterIP   10.217.4.139   <none>        55671/TCP,45671/TCP   67s
service/skupper-router-local   ClusterIP   10.217.4.16    <none>        5671/TCP              68s

NAME                                              READY   STATUS    RESTARTS   AGE
pod/skupper-router-5695b54764-v2w22               2/2     Running   0          67s
pod/skupper-service-controller-6d47c78bf6-fqxql   1/1     Running   0          65s

ONPREM$ skupper version
client version                 1.0.2
transport version              [quay.io/skupper/skupper-router:2.0.2](http://quay.io/skupper/skupper-router:2.0.2) (sha256:e563f069635f)
controller version             [quay.io/skupper/service-controller:1.0.2](http://quay.io/skupper/service-controller:1.0.2) (sha256:e948b0481cc1)
config-sync version            [quay.io/skupper/config-sync:1.0.2](http://quay.io/skupper/config-sync:1.0.2) (sha256:bc590b33af5a)

Environment details:

bryonbaker commented 2 years ago

The fix was to delete the local skupper tool config:

rm -rf ~/.local/share/skupper/

Then try skupper gateway expose again.

This is not easy for a user to diagnose. The skupper cli could do with some guidance, and the doco should have some troubleshooting advice for when to delete this directory tree.