Aliyun ECS create_node fails with code InstanceType.Offline

未关闭
#1,689 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
cloud

调研方向

首先,使用 Libcloud 3.5.1 通过 demos/example_aliyun_ecs.py 重现失败,然后检查 libcloud/compute/drivers/ecs.py 中的 create_node 调用及其发送的实例类型参数。完成的标准是确定 InstanceType.Offline 响应应归因于示例还是 Aliyun ECS 驱动,并找出相关的更改。

由索引模型根据 Issue 内容生成。

描述

api: compute driver: aliyun ecs

Im using your example code for Aliyun ECS create_node and its throwing an error, i wasnt able to find what the error is
Libcloud version: 3.5.1

Code being used
https://github.com/apache/libcloud/blob/trunk/demos/example_aliyun_ecs.py

Output:

华东1(杭州)
Found 132 images
Use image <NodeImage: id=ubuntu_20_04_x64_20G_alibase_20220331.vhd, name=ubuntu_20_04_x64_20G_alibase_20220331.vhd, driver=Aliyun ECS  ...>
Found 1 security groups
Use security group sg-bp1d92f8g6cz5sc0i31w
Found 0 nodes
Starting create a new node
Traceback (most recent call last):
  File "C:\Users\PC\AppData\Roaming\JetBrains\PyCharm2021.3\scratches\scratch_22.py", line 56, in <module>
    node = ecs.create_node(
  File "C:\Users\PC\PycharmProjects\djangoProject\vhbfnfd\lib\site-packages\libcloud\compute\drivers\ecs.py", line 556, in create_node
    resp = self.connection.request(self.path, params=params)
  File "C:\Users\PC\PycharmProjects\djangoProject\vhbfnfd\lib\site-packages\libcloud\common\base.py", line 659, in request
    return request_to_be_executed(
  File "C:\Users\PC\PycharmProjects\djangoProject\vhbfnfd\lib\site-packages\libcloud\common\base.py", line 721, in _retryable_request
    response = responseCls(**kwargs)
  File "C:\Users\PC\PycharmProjects\djangoProject\vhbfnfd\lib\site-packages\libcloud\common\base.py", line 165, in __init__
    raise exception_from_message(
libcloud.common.exceptions.BaseHTTPError: {'code': 'InstanceType.Offline', 'message': 'The specified InstanceType has been offline.', 'request_id': '3D68DD7A-0D9D-5D7B-9726-F33A803A37C6', 'host_id': 'ecs.aliyuncs.com'}
主要语言
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 摘要。