![](/img/trans.png)
[英]How to use Fog (rubygem) to only start/stop the aws ec2 instance, but not terminate?
[英]Unable to start AWS EC2 instance with deltacloud
我正在嘗試通過curl使用deltacloud API管理EC2雲實例。 使用模擬驅動程序,一切正常:deltacloudd -i模擬-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上運行良好。
誰能建議我怎么了?
簡短的答案是,您無法在當前版本1.1.3(2013-04-17)中使用deltacloud 啟動已停止的Amazon EC2實例 。 也許很快就會有一個新版本,但是由於Red Hat 減少了對他們的支持 ,因此deltacloud的開發速度減慢了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.