Flynn: invalid route

Created on 23 Jun 2018  ·  3Comments  ·  Source: flynn/flynn

I cannot add domain via dashboard ui. it says invalid route

{  
   "code":"validation_error",
   "message":"Invalid route",
   "detail":{  
      "type":"http",
      "parent_ref":"controller/apps/7db3cfc4-8325-4803-ba6c-eebfb1aced06",
      "service":"knife-web",
      "leader":false,
      "created_at":"0001-01-01T00:00:00Z",
      "updated_at":"0001-01-01T00:00:00Z",
      "domain":"back.domain.com",
      "path":"/"
   },
   "retry":false
}

I am able to add routes via flynn cli though

flynn-host version: v20180516.0-4e64441

componendashboard kinbug

All 3 comments

this fixed the issue in dashboard but API still does not work. weird thing is, it works on one app and does not on the other. I used the exact same request for those two.

I found app uuid by getting the list of apps, just to make sure nothing else is wrong.

request body:

{
  "type": "http",
  "service": "react-web",
  "created_at": "0001-01-01T00:00:00Z",
  "updated_at": "0001-01-01T00:00:00Z",
  "domain": "example.kamva.ir"
}

error for this one:

{
    "code": "validation_error",
    "message": "Invalid route",
    "detail": {
        "type": "http",
        "parent_ref": "controller/apps/0c164e33-88ee-4935-8e2c-67db0c2f7a05",
        "service": "kangaroo-web",
        "leader": false,
        "created_at": "0001-01-01T00:00:00Z",
        "updated_at": "0001-01-01T00:00:00Z",
        "domain": "example.kamva.ir"
    },
    "retry": false
}

for this app, adding routes work just fine! note no difference in request

{
  "type": "http",
  "service": "shop-web",
  "created_at": "0001-01-01T00:00:00Z",
  "updated_at": "0001-01-01T00:00:00Z",
  "domain": "example.kamva.ir"
}

response:

{
    "type": "http",
    "id": "7221fb4c-ec47-4505-8d5c-9e06a5ddb44e",
    "parent_ref": "controller/apps/ab87cb4f-3702-4067-b968-1ec130c04171",
    "service": "shop-app-web",
    "leader": false,
    "created_at": "2018-08-28T08:11:47.237399Z",
    "updated_at": "2018-08-28T08:11:47.237399Z",
    "domain": "example.kamva.ir"
}

by the way, the docs says format domain like this "domain": "http://example.com" which is wrong.

@hadifarnoud try adding "drain_backends": true to the request body. There's a fairly new database constraint preventing any routes from being created with a different value for drain_backends than any existing routes for the app. As the default route creating with the app sets this value to true, I suspect it's presence is what's causing the request to fail. We need to update the error message to be more descriptive and document drain_backends. This field indicates that the scheduler is to wait until all routes have completed before stopping jobs when it is set to true.

by the way, the docs says format domain like this "domain": "http://example.com" which is wrong.

Thanks! Having accurate documentation is important.

thanks @jvatic. I can confirm that fixed the issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

airways picture airways  ·  4Comments

onnimonni picture onnimonni  ·  6Comments

tuukkamustonen picture tuukkamustonen  ·  5Comments

WriteCodeEveryday picture WriteCodeEveryday  ·  5Comments

IsNull picture IsNull  ·  5Comments