enable AliYun datasource by default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Junjie.Wang | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Zesty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
Ubuntu cloud-images do not identify the Aliyun cloud platform.
Until this change was put in place, they would fail to boot and consume
user-data or metadata there.
With the change in place, an official Ubuntu image from
http://
[Test Case]
The ideal test case is:
a.) download a cloud image, update its cloud-init
The tool 'get-proposed-
[1] https:/
b.) publish that image to Aliyun cloud
c.) boot an instance from that image.
d.) verify function by ssh in verifying /run/cloud-
that aliyun datasource was used.
Ideally post /var/log/
[Regression Potential]
Generally small chance for regression, but a regression would most likely
be seen as an attempt to hit the metadata service at the well known end point
http://
This should be fairly well confined as attempts to use the Aliyun datasource
are gated by '_is_aliyun_' which does verifies that the dmi product name is
"Alibaba Cloud ECS"
[Other Info]
Upstream commit at
https:/
=== End SRU Template ===
As discussed at [1], the addition of AliYun datasource did not enable it by default.
This is because it has no definitive check before polling the network for data.
Lawrence suggested he has a solution for this:
| in our cloud platform, an instance vm could use an asm
| instructions `cpuid` (with eax setted to 0x40000100 ), it will
| returned our platform id keyword "AliYun" into register ebx and ecx,
| and if vm is not running on our environment, the value is others. so I
| guess this is a method to identify our platform ?
--
[1] https:/
Related branches
- Junjie.Wang (community): Approve
- Server Team CI bot: Approve (continuous-integration)
- Chad Smith: Approve
- cloud-init Commiters: Pending requested
-
Diff: 231 lines (+96/-8)7 files modifiedcloudinit/settings.py (+1/-0)
cloudinit/sources/DataSourceAliYun.py (+13/-1)
cloudinit/sources/DataSourceEc2.py (+7/-0)
tests/unittests/test_datasource/test_aliyun.py (+49/-2)
tests/unittests/test_datasource/test_common.py (+1/-0)
tests/unittests/test_ds_identify.py (+18/-0)
tools/ds-identify (+7/-5)
- Chad Smith: Approve
- Junjie.Wang (community): Approve
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
Changed in cloud-init: | |
assignee: | nobody → lawrence peng (kaihuan-pkh) |
status: | New → Confirmed |
importance: | Undecided → Medium |
description: | updated |
Changed in cloud-init: | |
assignee: | lawrence peng (kaihuan-pkh) → Junjie.Wang (jingni.wjj) |
Changed in cloud-init (Ubuntu): | |
status: | New → Confirmed |
status: | Confirmed → Fix Released |
importance: | Undecided → Medium |
description: | updated |
hi, Scott, as we discussed before, I need execute a `cpuid` assembly code in python, so I think I should write a bit of C code which inline the assemly and compile it as a library, then call it in python by using the ctypes lib.
I wonder to know is this plan could be feasible ? because of cloud-init source code is pure python, if I add the C code, it must compile when installed.
the another hand, there are some third library module in python which could execute assembly, maybe I could import these module instead of write by myself ?
thx ~