adoption of existing nodes

Registered by XueFeng Liu

Background:
Senlin already supports:

  - profile-create: create a profile object for capturing node (e.g. VM) properties.
  - cluster-create: create a cluster with a default profile.
  - node-create: create a new node with a profile. A node can be a member of a cluster,
    or an orphan node.
  - cluster member add: add senlin-created nodes to a cluster

This blueprint proposes a feature for Senlin to adopt a node as if it was created by
Senlin.

To adopt a node, the following functionalities need to be improved/added.

1. Extract basic properties from an existing physical resource, e.g. a Nova server or
   a Heat stack.
2. Support creation of a Senlin profile based on the extracted properties. The
   extracted property collection may need to be tuned/revised by users. This may mean
   some extra work at senlinclient side.
3. A new API for Senlin to adopt an existing physical resource as a node.
4. Expose the API via OpenStack SDK
5. Improve senlinclient (including OSC plugin) to invoke this API.

Blueprint information

Status:
Complete
Approver:
Qiming Teng
Priority:
High
Drafter:
XueFeng Liu
Direction:
Approved
Assignee:
XueFeng Liu
Definition:
Approved
Series goal:
Proposed for pike
Implementation:
Implemented
Milestone target:
None
Started by
XueFeng Liu
Completed by
XueFeng Liu

Related branches

Sprints

Whiteboard

[XueFeng 20170209]
Series goal:Pike

Gerrit topic: https://review.openstack.org/#q,topic:bp/senlin-adopt-function,n,z

Addressed by: https://review.openstack.org/450819
    Support to adopt nodes at profile base layer

Addressed by: https://review.openstack.org/450821
    Request object for node adopt operation

Addressed by: https://review.openstack.org/462354
    API layer support to node adoption

[yaofenghua 20170510]
Dose senlin have the ability to separate the adopt node from general senlin node?
In application scenarios,the adopt node should not rebulided by the health policy even though it is error.can we join a special field in metadata to realize this function?

[Re: yaofenghua 20170510/Qiming]
This is a good question. If there is a need to distinguish adopted nodes from Senlin created ones, we can add a metadata (or maybe tag?) to these nodes.
As for whether adopted nodes should be recovered by Senlin using its health policy, my view is that they should. Once nodes are adopted into a Senlin cluster and users want the cluster to be highly available (with a health policy), their health status should be monitored and controlled by Senlin. There should not be a difference here.

[yaofenghua 20170629]
https://review.openstack.org/#/c/462354/1/senlin/api/openstack/v1/router.py
In this patch,adopt route is /nodes/adopt,is this ok? I write senlinclient code about adopt , the "adopt" will parse to be node_id,is this a bug?
[Qiming 20170704]
It is not a bug. node adopt operation is defined as a POST to URL /nodes/adopt, there is no ambiguity in this. Please check your verb and the URL.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.