[node manager] Upgrade to libcloud 2.0
The pending libcloud 2.0.0 release has all our work relating to Azure ARM (including cloud environments) merged. We should test to see if node manager works with libcloud 2.0.0 so we can depend the upstream packaged version instead of our own fork.
#2 Updated by Tom Morris about 1 year ago
Azure ARM support was introduced in libcloud 1.4 which was released at the end of November 2016. We should probably let it settle for a bit to make sure there are no issues with the release before contemplating updating.
We are currently using a 0.18 derivative from summer 2015.
There is a small set of upgrade notes available at http://libcloud.readthedocs.io/en/latest/upgrade_notes.html
- Per-region provider constants and related driver classes which have been deprecated in Libcloud 0.14.0 have now been fully removed.
Those provider drivers have moved to the single provider constant + region constructor argument in Libcloud 0.14.0.
- New optional ttl argument has been added to libcloud.dns.base.Record class constructor before the existing extra argument.
If you have previously manually instantiated this class and didn’t use keyword arguments, you need to update your code to correctly pass arguments to the constructor (you are encouraged to use keyword arguments to avoid such issues in the future).
- All NodeState, StorageVolumeState, VolumeSnapshotState and Provider attributes are now strings instead of integers.
If you are using the tostring and fromstring methods of NodeState, you are fine. If you are using NodeState.RUNNING and the like, you are also fine.
However, if you have previously depended on these being integers, you need to update your code to depend on strings. You should consider starting using the tostring and fromstring methods as the output of these functions will not change in future versions, while the implementation might.
- The base signature of NodeDriver.create_volume has changed. The snapshot argument is now expected to be a VolumeSnapshot instead of a string. The older signature was never correct for built-in drivers, but custom drivers may break. (GCE accepted strings, names or None and still does. Other drivers did not implement creating volumes from snapshots at all until now.)
- VolumeSnapshots now have a created attribute that is a datetime field showing the creation datetime of the snapshot. The field in VolumeSnapshot.extra containing the original string is maintained, so this is a backwards-compatible change.
- The OpenStack compute driver methods ex_create_snapshot and ex_delete_snapshot are now deprecated by the standard methods create_volume_snapshot and destroy_volume_snapshot. You should update your code.
- The compute base driver now considers the name argument to create_volume_snapshot to be optional. All official implementations of this methods already considered it optional. You should update any custom drivers if they rely on the name being mandatory.