[MCOL-4541] Add POST/DELETE methods for certain CMAPI REST endpoints Created: 2021-02-15  Updated: 2021-06-18  Resolved: 2021-05-12

Status: Closed
Project: MariaDB ColumnStore
Component/s: cmapi
Affects Version/s: 5.5.1
Fix Version/s: 5.6.1

Type: Bug Priority: Minor
Reporter: Assen Totin (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2021-5, 2021-6, 2021-7

 Description   

CMAPI claims REST compliance (official documentation: "...CMAPI ... is a REST API that can be used to manage a multi-node Enterprise ColumnStore cluster"), but some of the documented calls deviate from the REST specification:

  • The call to add a new cluster member is defined as PUT to /.../cluster/add-node - this call should use POST method as it creates a new resource.
  • The call to remove a cluster member is defined as PUT to /.../cluster/remove-node - this call should use DELETE method with path like /.../cluster/remove-node/NODE_ID as it removes an existing resource.


 Comments   
Comment by Jose Rojas (Inactive) [ 2021-04-06 ]

PR not automatically linking to JIRA
https://github.com/mariadb-corporation/mariadb-columnstore-cmapi/pull/113

Comment by Roman [ 2021-04-19 ]

toddstoffel What about the tool to hide the API that never supposed to be used by the end users directly?

Jose left the patch that needs to be rebased and pushed. The API will will now support a new endpoint /cmapi/{_version}/cluster/node' with DELETE method to remove a node from a cluster and PUT/POST to add node into the cluster.

Comment by Roman [ 2021-05-06 ]

Plz review.

Comment by Daniel Lee (Inactive) [ 2021-05-12 ]

Build verified:
Engine: 5.6.1 ( Drone #2359 )
CMPAI: 0.5.0 ( Drone #476 )

Verified new cmapi calls for adding and deleting nodes.
Verified other cmapi calls: start, shutdown, status
Verified cmapi version to be 0.5.0

Comment by Todd Stoffel (Inactive) [ 2021-06-14 ]

CMAPI versioning will soon follow the engine. We will not maintain a separate numbering system for the API URL. /0.4.0/ will be phased out of the URL but should also be backwards compatible or redirected for legacy applications.

Generated at Thu Feb 08 02:51:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.