Comment 1 for bug 1917875

Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi Dirk,

Thanks for using cloud-init and taking the time to file this bug! `device-number` is an attribute that the EC2 IMDS sets in its network configuration; on an EC2 instance I see:

$ cloud-init query ds.meta_data.network.interfaces.macs
{
 "0a:30:3f:3d:e0:49": {
  "device_number": "0",
  "interface_id": "eni-014a09bfddf3a9ba9",
  <snip>
 }
}

(The use of an underscore vs. a dash here is not material: `query` normalises dashes to underscores when producing its output.)

Aliyun's datasource is based on the EC2 datasource (via inheritance), so it inherited this new behaviour. However, it's evidently the case that Aliyun do not expose `device-number` in their network metadata. We should handle this case gracefully, as there will be other EC2-a-like metadata services which don't do so.

Having said that, it's possible that Aliyun do expose this information but in a way we don't handle: would you be able to paste the output of `cloud-init query ds.meta_data.network.interfaces.macs` back in this bug report?

Thanks!

Dan