cli icon indicating copy to clipboard operation
cli copied to clipboard

Cant delete a route with (g)cf but it works with Gem cf.

Open simonjohansson opened this issue 12 years ago • 23 comments

Running cf version 6.0.0-SHA. Checkout the 6.0.0 tag and compiled on my machine since there is no installer for Arch Linux.

Running

cf delete-route cf.mydomain.com -n myapp

just stalls, looking at the logs in my syslog machine I see

root@468cb83f-83a8-46c1-ac42-ec23ab928787:/var/vcap/store/log# pwd
/var/vcap/store/log
root@468cb83f-83a8-46c1-ac42-ec23ab928787:/var/vcap/store/log# grep delete -R *
cloud_controller_ng/2014/02/11/cloud_controller_ng.log:172.30.5.63 --  {"timestamp":1392137894.0701954,"message":"dispatch VCAP::CloudController::RoutesController delete /v2/routes/:guid","log_level":"debug","source":"cc.api","data":{"request_guid":"7e32be19-86ba-456c-bd92-9565c0927854"},"thread_id":38987240,"fiber_id":39199540,"process_id":15640,"file":"/var/vcap/packages/cloud_controller_ng/cloud_controller_ng/lib/cloud_controller/rest_controller/routes.rb","lineno":12,"method":"block in define_route"}
cloud_controller_ng/2014/02/11/cloud_controller_ng.log:172.30.5.63 --  {"timestamp":1392137894.0707784,"message":"cc.dispatch","log_level":"debug","source":"cc.api","data":{"request_guid":"7e32be19-86ba-456c-bd92-9565c0927854","endpoint":"delete","args":["405d9fee-75f7-497e-9dac-860491bfca2c"]},"thread_id":38987240,"fiber_id":39199540,"process_id":15640,"file":"/var/vcap/packages/cloud_controller_ng/cloud_controller_ng/lib/cloud_controller/rest_controller/base.rb","lineno":93,"method":"dispatch"}

With the gem, 5.4.7.rc1

cf delete-route myapp.cf.mydomain.com

The route gets deleted properly.

Looking at the logs again i see

cloud_controller_ng/2014/02/11/cloud_controller_ng.log:172.30.5.63 --  {"timestamp":1392138304.381838,"message":"dispatch VCAP::CloudController::RoutesController delete /v2/routes/:guid","log_level":"debug","source":"cc.api","data":{"request_guid":"ffa1f085-8f04-4f81-a851-a796c657ec87"},"thread_id":38959060,"fiber_id":40149640,"process_id":15640,"file":"/var/vcap/packages/cloud_controller_ng/cloud_controller_ng/lib/cloud_controller/rest_controller/routes.rb","lineno":12,"method":"block in define_route"}
cloud_controller_ng/2014/02/11/cloud_controller_ng.log:172.30.5.63 --  {"timestamp":1392138304.3824947,"message":"cc.dispatch","log_level":"debug","source":"cc.api","data":{"request_guid":"ffa1f085-8f04-4f81-a851-a796c657ec87","endpoint":"delete","args":["405d9fee-75f7-497e-9dac-860491bfca2c"]},"thread_id":38959060,"fiber_id":40149640,"process_id":15640,"file":"/var/vcap/packages/cloud_controller_ng/cloud_controller_ng/lib/cloud_controller/rest_controller/base.rb","lineno":93,"method":"dispatch"}

simonjohansson avatar Feb 11 '14 17:02 simonjohansson

Finally got around to checking this out and it turns out my deployment was missing the 'clock_global' job instance. https://github.com/cloudfoundry/cf-release/blob/master/templates/cf-jobs.yml#L186-L200

As far as the cli goes, would it be worth having a CF_ASYNC flag that can be used to enable/disable synchronous calls?

aristotelesneto avatar Feb 25 '14 03:02 aristotelesneto

@wdneto fwiw, you're the first to ask for async enable / disable flag. i'll keep an eye out for other requests, but right now i don't think this is something we want to add to the cli. looks like more and more endpoints, like service creation for instance, are moving to async too.

scottruitt avatar Feb 25 '14 18:02 scottruitt

No problem, I don't mind either way. Just thought it was worth asking :-)

aristotelesneto avatar Feb 25 '14 20:02 aristotelesneto