apache / apache/libcloud

Errors with Kubernetes, Zerigo DNS, and AWS EC2

Đang mở
#2,076 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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

DNS resolution failures, credential validation errors, and a user warning about SSL verification. This suggests potential issues with how Libcloud handles connections and credentials across various drivers.

## Detailed Information

Apache Libcloud is having issues with multiple cloud APIs due to a combination of network connectivity problems and incorrect credential handling.

1. Kubernetes Connection Warning
When attempting to connect to a Kubernetes cluster, a UserWarning is raised:

```rb
/usr/lib/python3/dist-packages/libcloud/common/kubernetes.py:237: UserWarning: Kubernetes has its own CA, since you didn't supply a CA certificate be aware that SSL verification will be disabled for this session

...
```

This warning indicates that SSL certificate verification is being disabled because no CA certificate was provided. This isn't a fatal error, but it's a security concern that should be addressed. The process hangs and requires manual termination.

2. Zerigo DNS Connection Error

A `requests.exceptions.ConnectionError` is raised when trying to connect to Zerigo DNS (ns.zerigo.com). The root cause is identified as a `socket.gaierror: [Errno -2]` Name or service not known, which means the system couldn't resolve the hostname `ns.zerigo.com`.

```rb
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ns.zerigo.com', port=443): Max retries exceeded with url: /api/1.1/zones.xml (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known'))
```

This error indicates a DNS-related issue, preventing the application from establishing a connection to the Zerigo API endpoint.

3. AWS EC2 Credential Error
An `InvalidCredsError` is thrown when using the EC2 driver. The error message `AuthFailure: AWS was not able to validate the provided access credentials` explicitly states that the credentials used for the AWS API call are invalid.

```python
libcloud.common.types.InvalidCredsError: 'AuthFailure: AWS was not able to validate the provided access credentials'
```

This points to an issue with the AWS access key or secret key, or an incorrect region configuration.

4. Android APK Analysis Failure
Android log (logcat) shows an `ApkAnalysisException` with the message `DOWNLOAD_FILE_NOT_FOUND_EXCEPTION`. Suggests that `com.example.apache_redcache` fails to recognize the APK Android Application itself. Although seemingly unrelated, Libcloud attempts to connect to the server, regardless if it is from a different application.

The `VerityUtils` errors about failing to measure `fs-verity (with errno 1)` reinforce that when the APK test is ran the client attempts to connect to the server.

**The primary issues are:**

DNS Resolution Failure: Libcloud fails to resolve `ns.zerigo.com`, leading to a `ConnectionError`. This could be a configuration issue on the client's network or a bug in how Libcloud handles network calls.

Authentication Failure: Libcloud fails to authenticate with AWS EC2 due to invalid credentials, raising an InvalidCredsError.

SSL Security Warning: The Kubernetes driver warns that SSL verification is disabled due to a missing CA certificate.

LibCloud Version: 3.4.1
Python Version: Python 3.11.2
OSxDistro: Linux penguin 6.6.76-08096-g300882a0a131 #1 SMP PREEMPT_DYNAMIC Sat, 24 May 2025 01:23:41 -0700 x86_64 GNU/Linux

Steps to reproduce:

1. Run UnitTests in Codespace to get `venv` error
2. Run AndroidSDK tests in Android Studio to get `Finsky_Verity` error
3. Debug `.py` files with Python modules installed

Image

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

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

Hướng nghiên cứu

Bắt đầu bằng cách tách cảnh báo Kubernetes tại libcloud/common/kubernetes.py:237 khỏi các báo cáo về thông tin xác thực của Zerigo DNS và AWS EC2, sau đó chạy các unit test và AndroidSDK test được tham chiếu để xác định những lỗi nào có thể tái hiện trong Libcloud. Được xem là hoàn tất khi mỗi lỗi Libcloud đã được xác nhận đều có phạm vi tập trung, các bước tái hiện và một regression test phù hợp hoặc nguyên nhân bên ngoài được ghi lại.

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, kubernetes, python
Lĩnh vực
authentication, cloud, networking, security
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
15/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.