device_aliases feature documented but not implemented

Bug #1867532 reported by Mal
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

The Disk Setup module documents[1] a key called `device_aliases`, however it does not seem to function and a quick grep of the code base shows that there does not appear to be any code to support this key, purely the documentation. There is `disk_aliases` key in the Azure and SmartOS datasources which appears to serve a similar purpose, but is not obviously intended for end-user use.

This feature would be really useful, so fixing the code to match the documentation seems like it would be preferable to removing the the documentation. With that said, updating documentation for historical versions would be helpful, it would certainly have saved me personally a whole bunch of time!



Revision history for this message
Paride Legovini (paride) wrote :

Thanks Mal for this bug report. You are right: there is a discrepancy between documentation and code. The correct name for the key is `disk_aliases`, as you found out already.

Changed in cloud-init:
status: New → Triaged
Revision history for this message
Mal (madmalibu) wrote :

I think there may be more to it than that. I did try setting `disk_aliases` in an instance's custom data when initially encountering, and trying to track down this issue. As far as I could tell, it doesn't appear to read from anywhere besides the cloud data-source. The result of which is that a `disk_aliases` defined in the custom data is ignored. During testing I could see in the log the hard-coded mapping from the Azure data-source being used, but there was no evidence the user provided mapping was ever considered.

In `` it's possible to see the key only being read from the `self.ds_cfg` store.

tl;dr: I think there may still be a code change to result in documented behaviour for `disk_aliases` key.


Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Fix Committed
Revision history for this message
James Falcon (falcojr) wrote : Fixed in cloud-init version 21.3.

This bug is believed to be fixed in cloud-init in version 21.3. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.