[Ansible-service-broker] Question about a misterious secret created

jesusr at redhat.com jesusr at redhat.com
Mon Aug 27 20:39:10 UTC 2018


Charles,

I haven't found the fix yet, but I did see a pattern. I was able to
recreate the problem using the commands you defined below, as well as
with a script I have to create binds.

The pattern is that the very first bind request returns an error *IF*
the bind id is the same as the instance id because of the secret
created during the provision call. Subsequent calls seem to work even
if they have the same id.

I'm still trying to track down why that first one is failing while the
others work fine.

One short term solution is to use a different uuid for the binding that
is not the same as the instance id.


https://github.com/snowdrop/k8s-supervisor/blob/master/pkg/catalog/bind.go#L37

Sincerely,
jesus

On Mon, 2018-08-27 at 20:31 +0200, Charles Moulliard wrote:
> - You can reproduce the error if you git clone my project within your
> $GOPATH folder
>   git clone https://github.com/snowdrop/k8s-supervisor.git or go get
> ...
> - Next run this command with openshift 3.10 + ASB broker running and
> namespace `crud` created
>   go run *.go catalog create
> 
> Remark : minishift has been started as such -> https://goo.gl/b3mcZQ
> 
> On Mon, Aug 27, 2018 at 6:33 PM, Charles Moulliard <
> cmoullia at redhat.com>
> wrote:
> 
> > Hi,
> > 
> > I'm using golang kubernetes service catalog API to create a service
> > instance using openshift automation service broker
> > 
> > Code to create the service [1]
> > To do the binding [2]
> > 
> > The service instance is well created but when I do the binding I
> > get an
> > error reporing that secret already exists
> > 
> > svcat describe bindings my-postgresql-db
> > 
> >   Name:        my-postgresql-db
> > 
> > 
> > 
> >   Namespace:   crud
> > 
> > 
> > 
> >   Status:      Failed - ServiceBroker returned failure; bind
> > operation
> > will not be retried: Status: 400; ErrorMessage: <nil>; Description:
> > secrets
> > "a7c00676-4398-11e8-842f-0ed5f89f718b" already exists;
> > ResponseError:
> > <nil> @ 2018-08-27 16:27:28 +0000 UTC
> >   Secret:      my-postgresql-db-credentials
> > 
> > 
> > 
> >   Instance:    my-postgresql-db
> > 
> > 
> > 
> > 
> > Question: What should I do to resolve the issue ?
> > 
> > [1] https://goo.gl/36n2U4
> > [2] https://goo.gl/CzTpjP
> > 
> > Regards
> > 
> > Charles
> > 
> 
> _______________________________________________
> Ansible-service-broker mailing list
> Ansible-service-broker at redhat.com
> https://www.redhat.com/mailman/listinfo/ansible-service-broker





More information about the Ansible-service-broker mailing list