我正在尝试使用deltacloud API through curl管理EC2云实例。使用模拟驱动程序一切正常:deltacloudd -i mock -r 10.0.0.3
curl --user "mockuser:mockpassword" "http://10.0.0.3:3001/api/instances?format=xml"
curl -X POST --user "mockuser:mockpassword" "http://10.0.0.3:3001/api/instances/inst1/stop?format=xml"
但是对于EC2,我无法启动已停止的实例: deltacloudd -i ec2 -P eu-west-1 -r 10.0.0.3 -V
curl --user "accesskey:secretaccesskey" "http://10.0.0.3:3001/api/instances?format=xml"
curl -X POST --user "accesskey:secretaccesskey" "http://10.0.0.3:3001/api/instances/i-NNNNNNNN/start?format=xml"
返回:缺少执行此操作所需的功能
Deltacloud日志输出:
Listening on 10.0.0.3:3001, CTRL+C to stop
D, [2014-06-25T10:47:34.149001 #3575] DEBUG -- : New Aws::Ec2 using per_thread-connection mode
D, [2014-06-25T10:47:34.150897 #3575] DEBUG -- : Opening new HTTPS connection to ec2.eu-west-1.amazonaws.com:443
10.0.0.5 - - [25/Jun/2014 10:47:34] "GET /api/instances?format=xml HTTP/1.1" ec2 eu-west-1 200 1628 0.6204
10.0.0.5 - - [25/Jun/2014 10:48:14] "POST /api/instances/i-NNNNNNNN/start?format=xml {} HTTP/1.1" ec2 eu-west-1 412 60 0.0077
很明显,deltacloud会处理GET,但不会将POST请求转发给AWS 。
即使单击Web界面上的开始按钮(10.0.0.3:3001),也会出现问题。 accesskey和secretaccesskey与python-boto一起工作正常。
有谁能告诉我什么错了?
答案 0 :(得分:0)
简短的回答是,您在当前版本1.1.3(2013-04-17)中使用deltacloud can not start a stopped Amazon EC2 instance。也许很快会有更新的版本,但自从红帽reduced their support development of deltacloud放慢了。