cannot delete a stream because Package Metadata in Repository say not all releases DELETED

940 Views Asked by At

I'm a Spring Data Cloud Flow newbie and I'm having a hard time getting rid of a stream.

stream list

shows I have a stream named ticktock5.

stream undeploy ticktock5
stream destroy ticktock5

result in the same error:

Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: Can not delete Package Metadata [ticktock5:1.0.0] in Repository [local]. Not all releases of this package have the status DELETED. Active Releases [ticktock5]

This is running on

macOS 10.12.6, 
java 1.8.0_161, 
Docker 2.0.0.0-mac81(29211),  
Spring Cloud Data Flow 1.7.2.RELEASE

Reproduction is simple:

Create a stream
Deploy it
Wait
After a period of time (5 min or longer), the deployment will fail.
No errors are given in the data flow server log
3

There are 3 best solutions below

0
On BEST ANSWER

i ended up recreating my Docker/K8s environment and that fixed the problem

1
On

I have fixed by altering tables in skipper database. (In my case mysql db)

Steps performed.

  • Delete the stream from skipper_release

delete from skipper_release where name = 'my-stuck-stream-name'

  • Delete the stream from skipper_app_deployer_data

delete from skipper_app_deployer_data where release_name = 'my-stuck-stream-name'

  • Delete the stream from skipper_package_metadata

delete from skipper_package_metadata where name = 'my-stuck-stream-name'

  • If you are facing problem with un-deploy the stream then manually delete the resources. (I am using kubernetes platform, so I have deleted deployments and services related to that stream)
1
On

as answered above this worked for me:

delete from skipper_release where name = 'streamName'
delete from skipper_app_deployer_data where release_name = 'streamName'
delete from skipper_package_metadata where name = 'streamName'

PS: i don't have enough reputation points to upvote that :)