Fork me on GitHub
#onyx
<
2017-01-18
>
rc114014:01:32

hi all is there a way to clear out a cluster without having to rm zookeeper and resetup everything , while testing have a bunch of jobs that are stuck and constantly try to run and are unlikely to ever complete

rc114014:01:56

i am aware of the kill-job api , but im not sure how to get a list of running jobs to pass to that function

gardnervickers14:01:53

If you want a quick way to start fresh in zookeeper, you can change the tenancy-id on your peers. Everything in Onyx is namespaced by the tenancy-id, so starting your peers with a fresh one will give them a clean slate in ZK.

jasonbell14:01:59

I always have a zookeeper-shell open and rmr /onyx as required

gardnervickers14:01:52

That may or may not be viable for your situation however, as it will leave the old jobs in ZK, just under a different namespace. Those may need to be cleaned up periodically if you run out of disk space.

rc114014:01:41

lol i tried ot rmr my /onyx it just dies after a while

rc114014:01:59

dont have the error on hand

rc114014:01:03

but it seems to timeout

rc114014:01:29

but will try the new tenancy-id first

gardnervickers14:01:37

@rc1140: you will need to restart your peers if you rm /onyx

rc114014:01:59

they should be stopped but will confirm

mariusz_jachimowicz15:01:01

We could add :stop-all-jobs action - that stops running jobs and clear/cancell waiting jobs.

michaeldrogalis16:01:27

@mariusz_jachimowicz I think that would be good. A log entry for kill-all-jobs and a corresponding API call kill-all-jobs would be helpful.

mariusz_jachimowicz16:01:29

Cool. I will try look on this when I finish new UI.

michaeldrogalis16:01:04

@mariusz_jachimowicz Thanks for the contributions!

mariusz_jachimowicz17:01:50

Glad to help 😄