Use OpenStack SDK in Nova
We would like to get rid of Nova's use of python-
One step toward doing that was integrating keystoneauth1 to set up auth, session, and adapter. While this helped by creating a consistent user experience (all services (except cinder, which never got finished) can be configured using the same options), this was just a façade. Under the covers, we're using that ksa adapter to determine one or two values which we then use to construct the same python-
One approach to cutting out this waste was to find a way to pass the ksa adapter we built on the nova side so it could be used by the client instead of building a new one. We tried this, but found it to be too deeply embedded to be practical. And besides, that still wouldn't get us away from using the python-
The next possibility would be to replace calls into python-
Enter OpenStack SDK, which has a lot of that low-level work done, and presents client APIs via an object model. This exists at varying stages of maturity for different APIs - e.g. nearly full-featured for ironic, but virtually nothing for placement - but at worst provides the same get/put/etc. primitives as ksa Adapter (is in fact a subclass thereof).
This blueprint, expected to be a multi-release effort, proposes to:
- Introduce package requirements and plumbing for the construction of an openstack.
- Replace the SchedulerReport
- Replace invocations into python-
- Similar for other services such as glance, neutron, cinder...
Upgrades and Compatibility:
This effort includes work in the SDK [1] to allow construction of the Connection object using the keystoneauth1 conf options we already support. Thus this change *could* be completely transparent to operators. However, we would eventually like to move toward using clouds.yaml rather than oslo.config to set up the Connection's auth/session/
[1] https:/
[2] Note that we currently (stein) still support pre-ksa conf options for setting up python-
Blueprint information
- Status:
- Started
- Approver:
- None
- Priority:
- Low
- Drafter:
- Eric Fried
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Pending Approval
- Series goal:
- None
- Implementation:
- Started
- Milestone target:
- None
- Started by
- Matt Riedemann
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
openstacksdk: Make factory for a CloudRegion from CONF objects: https:/
nova: Introduces the openstacksdk to nova: https:/
nova: Use SDK instead of ironicclient for node.get: https:/
Gerrit topic: https:/
Addressed by: https:/
WIP/PoC: Use SDK instead of ironicclient for node.get
General question but are any other services doing something like this or would nova be the first? I do see value in dog-fooding on the openstacksdk to at least build up API parity in common tooling. This would be a benefit for *users* of openstack if openstack services developers were also working on the SDK to fulfill their needs and thus the SDK users would have a more feature complete and robust SDK to use (more eyes shallow bugs and all that). There were also performance concerns years ago about the services using the sdk (liberty-era) but it sounds like those concerns no longer exist (were solved somehow). Anyway, I'll personally give a score of "meh and a half" since this seems like extra churn for I'm not sure about a ton of gain (the clouds.yaml thing might be the biggest gain but sounds like it would be a long way off yet). Would definitely be good to get more operator input here since they'd be directly affected by this...too bad this is late for a Train Forum session. -- mriedem 20190425
Addressed by: https:/
WIP: Use OpenStack SDK for placement
Addressed by: https:/
WIP/PoC: Use SDK instead of ironicclient for node.list
Addressed by: https:/
WIP/PoC: Use SDK instead of ironicclient for checking instance exists
Addressed by: https:/
Introduces the openstacksdk to nova
Gerrit topic: https:/
Addressed by: https:/
Use SDK instead of ironicclient for setting instance id
Addressed by: https:/
WIP: Use SDK instead of ironicclient for add/remove instance info from node
Addressed by: https:/
Spec: Use OpenStack SDK in Nova
Addressed by: https:/
Use SDK instead of ironicclient for getting network metadata from node
Addressed by: https:/
Use fields=
[efried 20190910] Marking this complete for Train, since it's an acknowledged multi-release effort and we're done merging stuff this release. We should propose a continuation for this (openstacksdk-
[efried 20190925] Reverting 'implemented' status so we can reuse this bp for the continuation work in ussuri. Spec work should still be as noted above.
Addressed by: https:/
Spec: Use OpenStack SDK in Nova (Ussuri)
[mriedem 20190926] Re-approved for Ussuri.
[efried 20200131] Pushing this out of ussuri as the owner is no longer going to be working it.
Addressed by: https:/
Use SDK for add/remove instance info from node
Addressed by: https:/
Use SDK for getting network metadata from node
Addressed by: https:/
Remove use of removeprefix
Addressed by: https:/
Remove unused mocks
Addressed by: https:/
Use SDK for volume_target.*
Addressed by: https:/
Use SDK for node.set_
Addressed by: https:/
Use SDK for node.set_
Addressed by: https:/
Use SDK for node.vif*
Addressed by: https:/
Use SDK for remaining network operations
Addressed by: https:/
Use SDK for remaining ironic driver calls
Addressed by: https:/
Use SDK for deprecated baremetal proxy API
Addressed by: https:/
Remove Ironic client wrapper
Addressed by: https:/
Remove unnecessary aliasing
Addressed by: https:/
Use real SDK objects in tests
Addressed by: https:/
DNM: Identify why internal_info' isn't being set.
Addressed by: https:/
tests: Use clearer syntax for empty generator
Addressed by: https:/
Fix regression breaking Ironic boot-from-volume