cloudfoundry-community / autosleep

Auto sleep service for CloudFoundry
Apache License 2.0
39 stars 21 forks source link

How to delete service instance in forced enrollment mode? #273

Closed drnic closed 7 years ago

drnic commented 7 years ago

I created a service instance in forced enrollment mode:

cf cs autosleep-starkandwayne-starkandwayne-stannis default autosleep -c '{"auto-enrollment": "forced","secret":"secret"}'

But I could not delete it:

cf ds autosleep

Really delete the service autosleep?> y
Deleting service autosleep in org starkandwayne / space stannis as drnic@starkandwayne.com...
FAILED
Server error, status code: 502, error code: 10001, message: Service instance autosleep: Service broker error: this autosleep service instance can't be deleted during forced enrollment mode. Switch back to normal enrollment mode to allow its deletion.

Nor could I update the service instance to change its auto-enrollment config:

cf update-service autosleep -c '{"auto-enrollment": "normal","secret":"secret"}'
Updating service instance autosleep as drnic@starkandwayne.com...
FAILED
Server error, status code: 502, error code: 10001, message: Service broker error: Service plan updates not supported.

How do I update or delete my service instance?

pradyutsarma commented 7 years ago

@drnic You've to first update the service instance from forced to standard (assuming you've access to the secret you provided during creation) and then delete it.

gberche-orange commented 7 years ago

@drnic See associated specs at https://github.com/cloudfoundry-community/autosleep/blob/develop/acceptance/5_forced_enrollment.robot#L64-L79

Please reopen if you still have troubles