apache / apache/libcloud

ECS driver does not work.

Đang mở
#1,590 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
stale
Ngôn ngữ chính
Python
Star
2.1k
Fork
931
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
4

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với libcloud/container/drivers/ecs.py, đặc biệt là dòng 69 và phần khởi tạo driver Elastic Container Service. Chạy ví dụ trong tài liệu với region được báo cáo và kiểm tra host được tạo trước khi gọi list_clusters(). Hoàn thành có nghĩa là ví dụ có thể liệt kê tên các ECS cluster mà không gặp InvalidURL hoặc phản hồi 500 từ AWS.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, python
Lĩnh vực
backend, cloud
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.