Setservicelinks

Hi,

This used to work… ?

Rancher: v1.0.0:

Request:

{
  "serviceLinks": [
    {
      "links": null,
      "actions": null,
      "name": "zookeeper",
      "serviceId": "1s2072"
    },
    {
      "links": null,
      "actions": null,
      "name": "api.www.5377.xxx.yy.zzzz.qqqqq.net",
      "serviceId": "1s484"
    },
    {
      "links": null,
      "actions": null,
      "name": "flume",
      "serviceId": "1s445"
    }
  ],
  "action": "setservicelinks",
  "links": null,
  "actions": null
}

Response:

{
  "id": "9c62d860-7199-4f2b-8cba-51ed5df4e46f",
  "type": "error",
  "links": {},
  "actions": {},
  "status": 422,
  "code": "InvalidCharacters",
  "message": null,
  "detail": null,
  "fieldName": "name"
}

But there were a few fewer fields in the request then, too…

This request gave 200 OK response, a couple of weeks ago:

{
  "serviceLinks": [
    {
      "name": "flume",
      "serviceId": 445
    },
    {
      "name": "zookeeper",
      "serviceId": 1472
    },
    {
      "name": "api.www.5307.xxxx.yy.zzzz.qqqqq.net",
      "serviceId": 484
    }
  ]
}

Ok, found this:

{
"id": "serviceLink",
"type": "schema",
"links": {
"self": "…/v1/schemas/servicelink",
},
"actions": { },
"pluralName": "serviceLinks",
"resourceFields": {
"name": {
"type": "string",
"validChars": "a-zA-Z0-9-/",
"description": null,
"create": true,
"update": false,
"nullable": true,
"readOnCreateOnly": false,
},
...

Why the validChars validation against dots there!?
I was using that :cry:

For the record… this used to be:

{
"id": "serviceLink",
"type": "schema",
"links": {
"self": "…/v1/schemas/servicelink",
},
"actions": { },
"pluralName": "serviceLinks",
"resourceFields": {
"name": {
"type": "string",
"create": true,
"update": false,
"nullable": true,
"readOnCreateOnly": false,
},
...

Guess I’ll have to take the detour through service aliases, right?

In GA, we added stricter validation for the service aliases so that Rancher’s internal DNS would work, but we will most likely be relaxing the validation.

https://github.com/rancher/rancher/issues/4252

Is there some recommended way to link with an FQDN?

Thanks @denise, looking forward to 1.0.1 soon :smile: