ECS driver does not work.

未關閉
#1,590 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
aws, python
領域
backend, cloud

研究方向

從 libcloud/container/drivers/ecs.py 開始,特別檢查第 69 行以及 Elastic Container Service 驅動程式的初始化。使用回報的區域執行文件範例,並在呼叫 list_clusters() 前檢查產生的主機。完成條件是該範例能夠列出 ECS 叢集名稱,且不會出現 InvalidURL 或 AWS 500 回應。

由索引模型根據 Issue 內容生成。

描述

stale

Summary

ECS driver does use wrong host name; if I fix this in the code the package send a request to AWS causing internal server error.

Detailed Information

apache-libcloud==3.3.1/Python 3.8.5/ubuntu20.04

Running the example provided in the documentation:

cls = get_driver(Provider.ECS)

conn = cls(access_id=os.getenv('AWS_ID'),
           secret=os.getenv('AWS_KEY'),
           region=os.getenv('AWS_REGION'))

for cluster in conn.list_clusters():
    print(cluster.name)

This results an error message: requests.exceptions.InvalidURL: Failed to parse: https://ecs.%s.amazonaws.com/

If I change the line 69 in libcloud/container/drivers/ecs.py to super(ElasticContainerDriver, self).__init__(access_id, secret, host=ECR_HOST % (region)), I get a response 500 from AWS.

Expected behavior: list the ECS cluster names.

主要語言
Python
星號
2.1k
分支
935
平均合併
5 天 3 小時
30 天內合併 PR
15

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/libcloud 的其他 Issue

查看 apache/libcloud 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。