Project

General

Profile

Bug #49292

mgr/dashboard: fix PUT - /api/host/{hostname} while adding labels

Added by Avan Thakkar 10 days ago. Updated 10 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
dashboard/backend
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

'PUT /api/host/{hostname}' API call, provided string is spliced into characters and added as individual labels.
curl -i -k --location -X PUT 'https://localhost:11000/api/host/host1' -H 'Accept: application/vnd.ceph.api.v1.0+json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXBoLWRhc2hib2FyZCIsImp0aSI6ImYxZDg1NmVhLTU2MTYtNGJiYi04NDZhLTVmZDJlNDAxNDQ2MSIsImV4cCI6MTYxMTk2MTU2NCwiaWF0IjoxNjExOTMyNzY0LCJ1c2VybmFtZSI6ImFkbWluIn0.5xmWOgcLa9xlKM0Svt8YVGBMf94M11eHQR19Z3FeFkw' -d '{"labels": "MON"}'

HTTP/1.1 200 OK
Content-Type: application/vnd.ceph.api.v1.0+json
Server: Ceph-Dashboard
Date: Fri, 29 Jan 2021 15:54:16 GMT
Vary: Accept-Encoding
Content-Length: 4

null%

[ceph: root@ceph /]# ceph orch host ls
HOST ADDR LABELS STATUS
host1 host1 M N O

History

#1 Updated by Avan Thakkar 10 days ago

Avan Thakkar wrote:

'PUT /api/host/{hostname}' API call, provided string is spliced into characters and added as individual labels.
curl -i -k --location -X PUT 'https://localhost:11000/api/host/host1' -H 'Accept: application/vnd.ceph.api.v1.0+json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXBoLWRhc2hib2FyZCIsImp0....FeFkw' -d '{"labels": "MON"}'

HTTP/1.1 200 OK
Content-Type: application/vnd.ceph.api.v1.0+json
Server: Ceph-Dashboard
Date: Fri, 29 Jan 2021 15:54:16 GMT
Vary: Accept-Encoding
Content-Length: 4

null%

[ceph: root@ceph /]# ceph orch host ls
HOST ADDR LABELS STATUS
host1 host1 M N O

#2 Updated by Avan Thakkar 10 days ago

  • Pull request ID set to 39476

Avan Thakkar wrote:

'PUT /api/host/{hostname}' API call, provided string is spliced into characters and added as individual labels.
curl -i -k --location -X PUT 'https://localhost:11000/api/host/host1' -H 'Accept: application/vnd.ceph.api.v1.0+json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXBoLWRhc2hib2FyZCIsImp0....FeFkw' -d '{"labels": "MON"}'

HTTP/1.1 200 OK
Content-Type: application/vnd.ceph.api.v1.0+json
Server: Ceph-Dashboard
Date: Fri, 29 Jan 2021 15:54:16 GMT
Vary: Accept-Encoding
Content-Length: 4

null%

[ceph: root@ceph /]# ceph orch host ls
HOST ADDR LABELS STATUS
host1 host1 M N O

Also available in: Atom PDF