dain / galaxy-server

Galaxy as been renamed and moved to Airship
https://github.com/airlift/airship
17 stars 7 forks source link

Agent terminate does not work #26

Open electrum opened 12 years ago

electrum commented 12 years ago

Verify that the agent doesn't have any slots:

17:33 ubuntu@i-64580004:~ prod] galaxy show -h 10.215.90.175
No slots match the provided filters.

Try to terminate:

[17:33 ubuntu@i-64580004:~ prod] galaxy agent terminate -h 10.215.90.175
UnexpectedResponseException{request=Request{uri=http://127.0.0.1:64000/v1/admin/agent, method='DELETE', headers={}, bodyGenerator=com.proofpoint.galaxy.cli.HttpCommander$TextBodyGenerator@478e4327}, statusCode=405, statusMessage='Method Not Allowed', headers={Content-Length=[1299], Allow=[POST,GET,OPTIONS,HEAD], Content-Type=[text/html;charset=ISO-8859-1], Cache-Control=[must-revalidate,no-cache,no-store]}}
electrum commented 12 years ago

Turns out I was using it incorrectly, but it still doesn't work when used correctly:

[17:33 ubuntu@i-64580004:~ prod] galaxy agent terminate 6217
UnexpectedResponseException{request=Request{uri=http://127.0.0.1:64000/v1/admin/agent, method='DELETE', headers={}, bodyGenerator=com.proofpoint.galaxy.cli.HttpCommander$TextBodyGenerator@478e4327}, statusCode=405, statusMessage='Method Not Allowed', headers={Content-Length=[1299], Allow=[POST,GET,OPTIONS,HEAD], Content-Type=[text/html;charset=ISO-8859-1], Cache-Control=[must-revalidate,no-cache,no-store]}}
electrum commented 12 years ago

Looks like the client sends the agentId in the DELETE body, but the coordinator expects it in the URI.