Skip to content

how to properly create a federation in apache traffic contorl ? #8095

@7ff5fC1E397d

Description

@7ff5fC1E397d

This Bug Report affects these Traffic Control components:

  • Traffic Ops
  • Documentation
  • CDN in a Box

What did you do?

I have setup CDN-in-a-Box to explore its features , using Portal I was not able to configure federation
Next I tried API

and

Confusingly, this method of this endpoint does not create a new Federation; to do that, the cdns/{{name}}/federations endpoint must be used. Furthermore, the Federation must properly be assigned to a Delivery Service using the federations/{{ID}}/deliveryservices and assigned to the user creating Resolvers using federations/{{ID}}/users.

I understood it that I should do

  1. cdns/{{name}}/federations to create
  2. federations/{{ID}}/deliveryservices to assign to a DS
  3. federations/{{ID}}/users. to assign to a USER

Continuing with 1. cdns/{{name}}/federations I did

curl -X POST ... api/5.0/cdns/CDN-in-a-Box/federations"  -H "Content-Type: application/json" --data @create.json

where create.json is

{
  "ttl": 300,
  "cname": "demo1.example.net.",
  "description": "Demo1 Your Federation Description",
}

and response was (sample, because I tired several times)

{
  "alerts": [
    {
      "text": "Federation was created",
      "level": "success"
    }
  ],
  "response": {
    "id": 12,
    "cname": "demo1.example.net.",
    "ttl": 300,
    "description": "Demo1 Your Federation Description",
    "lastUpdated": "2024-10-27T09:21:56.967206Z"
  }
}

Next I tried to GET the added ones , but it lists just the default one:

curl -X GET ... api/5.0/cdns/CDN-in-a-Box/federations"  -H "Content-Type: application/json"

or

curl -X GET api/5.0/federations/all"  -H "Content-Type: application/json"

and its response

{
  "response": [
    {
      "id": 1,
      "cname": "foo.kabletown.net.",
      "ttl": 60,
      "description": null,
      "lastUpdated": "2024-10-26T07:22:08.45335Z",
      "deliveryService": {
        "id": 2,
        "xmlID": "demo2"
      }
    }
  ]
}

Then I noticed another caution

Despite the URL of this endpoint, this does not create a Federation within any particular CDN. A Federation is associated with a CDN purely because any Delivery Service to which it is assigned is scoped to a CDN. Therefore, upon creation a Federation is not associated with any CDN in particular.

So if "this does not create a Federation within any particular CDN" why the URI address (API) includes a CDN name ?

What did you expect to happen?

  • if we create a federation , be able to get / list it/them
  • if a federation should be assigned to a CDN, we could set it using JSON data (?)

What actually happened?

List of federations only shows the fist (default) one added by CDN-in-a-Box demo . Mine are not listed

more info

I created a federation user . Also tired Admin , results are the same
It is about a week I am exploring ATC/ATS so see me as a newbie

Traffic Portal Info
Version: 8.1.0-12478.c27d3d99.el8
Build Date: 2024-10-21 08:23
API URL: https://trafficops.infra.ciab.test:443

Please guide me on how to properly create a federation , my final goal is to create a CNAME for a DS

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions