Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete/wrong breakdown? #112

Closed
sajith opened this issue May 10, 2023 · 8 comments
Closed

Incomplete/wrong breakdown? #112

sajith opened this issue May 10, 2023 · 8 comments
Assignees
Labels

Comments

@sajith
Copy link
Member

sajith commented May 10, 2023

Given a merged "super topology" that has three domains (amlight, sax, zaoxi) in sdx-controller, and a connection request, the connection solution should be broken down to three domains. But instead we end up with something like this:

{
    "urn:ogf:network:sdx": {
        "ingress_port": {
            "id": "urn:ogf:network:sdx:port:sax:B1:2",
            "name": "Unknown",
            "short_name": null,
            "node": "urn:ogf:network:sdx:node:sax:B1",
            "label_range": null,
            "status": null,
            "state": null,
            "private_attributes": null
        },
        "egress_port": {
            "id": "urn:ogf:network:sdx:port:sax:B1:3",
            "name": "Novi01:3",
            "node": "urn:ogf:network:sdx:node:sax:B1",
            "short_name": "B1:3",
            "label_range": [
                "100-200",
                "10001"
            ],
            "status": "up"
        }
    }
}

Seems that the method that finds a domain of a node is wrong.

@YufengXin
Copy link
Collaborator

Well, if the two ports of the connection request belong to the same domain, the breakdown will only involve the one domain.

@sajith
Copy link
Member Author

sajith commented May 11, 2023

Well, I think that is the case, but also want to be certain. :-)

Let us have this resolved with some more tests. I will document the results here, and probably follow up with some more unit tests.

@sajith
Copy link
Member Author

sajith commented May 11, 2023

Trying to summarize my understanding of the problem again: when testing sdx-controller, @congwang09 and I found that the breakdown does not look quite right. We should have a map of per-domain breakdowns, but we do not have it.

My guess is that TopologyManager.add_topology() and TopologyManager.update_topology() do not preserve the ownership information about a node. We need to find what topology (strings like "urn:ogf:network:sdx:topology:amlight.net") a node belongs to, but once a topology has been added to TopologyManager, updated, TopologyManager no longer has that information.

Consequently, TopologyManager.get_domain_name() returns "urn:ogf:network:sdx" (which was set by TopologyManager.generate_id() when the topology was initially added.

@sajith
Copy link
Member Author

sajith commented May 11, 2023

My guess is that TopologyManager.add_topology() and TopologyManager.update_topology() do not preserve the ownership information about a node. We need to find what topology (strings like "urn:ogf:network:sdx:topology:amlight.net") a node belongs to, but once a topology has been added to TopologyManager, updated, TopologyManager no longer has that information.

Perhaps I am wrong here. TopologyManager.topology_list should have what we need, but TopologyManager.get_domain_name() isn't returning the right thing.

@sajith sajith changed the title Incomplete/wrong breakdown Incomplete/wrong breakdown? May 12, 2023
@sajith
Copy link
Member Author

sajith commented May 12, 2023

In any case that "urn:ogf:network:sdx" key doesn't look right. It probably should be "urn:ogf:network:sdx:topology:sax.net".

@YufengXin
Copy link
Collaborator

The key in te.topology_list is topology.id, so make sure it's correct. te.get_domain_name(node) only checks on if it contains the particular node and returns topology.id if so.

@sajith
Copy link
Member Author

sajith commented May 13, 2023

In the tests I did (#113) with the three topologies we use, get_domain_name() returns the correct topology ID. So I guess it is possible that the wrong topology data is somehow passed around somewhere in sdx-controller.

I think stronger validation wherever possible (eventually - perhaps using pydantic or similar) would be a good idea.

@sajith
Copy link
Member Author

sajith commented May 26, 2023

Closed in #113.

@sajith sajith closed this as completed May 26, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in @sajith's project board May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants