-
Notifications
You must be signed in to change notification settings - Fork 46
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
as_macro not added to IX-F JSON if read from PeeringDB #113
Comments
Hi @bluikko, I think the tool already allows to deal with the use case you mentioned, but I might be wrong or maybe I misunderstood your request here. When the asns:
AS112:
as_sets:
- AS112
AS15169:
as_sets:
- RADB::AS-GOOGLE
clients:
- asn: 112
ip:
- 192.0.2.1
- 2001:db8::1
- asn: 15169
ip:
- 192.0.2.2
- 2001:db8::2 When the command {
"version": "1.0",
"timestamp": "2022-11-19T14:11:59Z",
"ixp_list": [
{
"ixp_id": 0,
"ixf_id": 1,
"shortname": "test",
"vlan": [
{
"id": 0
}
]
}
],
"member_list": [
{
"asnum": 112,
"connection_list": [
{
"ixp_id": 0,
"vlan_list": [
{
"vlan_id": 0,
"ipv4": {
"address": "192.0.2.1",
"as_macro": "AS112"
}
},
{
"vlan_id": 0,
"ipv6": {
"address": "2001:db8::1",
"as_macro": "AS112"
}
}
]
}
]
},
{
"asnum": 15169,
"connection_list": [
{
"ixp_id": 0,
"vlan_list": [
{
"vlan_id": 0,
"ipv4": {
"address": "192.0.2.2",
"as_macro": "RADB::AS-GOOGLE"
}
},
{
"vlan_id": 0,
"ipv6": {
"address": "2001:db8::2",
"as_macro": "RADB::AS-GOOGLE"
}
}
]
}
]
}
]
} The How far is this from what you were asking for? Am I missing anything? Maybe you're encountering some sort of bug? |
You are understanding exactly right. I am not seeing the {
"asnum": 112,
"name": "AS112",
"connection_list": [
{
"ixp_id": 1,
"vlan_list": [
{
"vlan_id": 0,
"ipv4": {
"address": "192.0.2.1"
}
},
{
"vlan_id": 0,
"ipv6": {
"address": "2001:db8::1"
}
}
]
}
]
}, I have only anonymized the IPv4/6 addresses in the above extract from the generated IX-F JSON. I just noticed that the run to generate IX-F JSON prints only a few lines as opposed to few hundred lines from the run to generate RS config files which have several lines about PeeringDB etc.
I then added the Since your example JSON includes |
While working on troubleshooting this I noticed that currently |
Hi @bluikko, thanks for the additional information. I now understand that you build your RS config files using the Docker container, and that you would also like to generate the Euro-IX file using the container as well: am I right? Assuming this is the case, I see why you might want to have a way to customise the run.sh execution with additional options. However, I'd like to point out that while on one hand the Docker image can be used to easily get a "packaged" version of ARouteServer, with all the dependencies installed, on the other hand its entry point script (run.sh) is not really designed to offer a comprehensive way to interact with the tool. Nonetheless the docker image can still be used as a "wrapper" to easily run ARouteServer as if it was a local program, running on the host directly. A simple Docker command like Starting from that, you can add additional options to For example, this...
... would allow you to run ARouteServer using a custom arouteserver.yml file on the host, crafted in a way that custom paths on the container could be used for the cache directory for example. The file could be something like this... arouteserver.yml # ... other settings
cache_dir: /path-on-the-container/cache_dir
# ... other settings ... with Basically all the Please let me know what you think about the solution I'm proposing here. I do see how a customization of run.sh would make things easier for your specific use case, but at the same time I'm a bit reluctant to implement it because I also see how difficult it could be to cover all the potential use cases that usually ARouteServer deal with by modifying the Docker image. It could easily become a "full mesh" of environment variables and CLI options, all condensed into a single Docker image and setup. In addition to what I've proposed above, you can still edit the run.sh file and use your local version as the entry point for the container. All this said, it's still unclear to me why your Thanks |
Yes I had thought about just passing the docker & arouteserver options I need to
I just found out a difficult-to-notice typo in the command, I will do some more tests tomorrow before bothering you more. |
It took a while to get things tested again since I wanted to use the It is run as (sanitized):
And it displays no output. The generated I have been trying to see if I have some stupid problem somewhere but could not notice any so far. As a side note: using |
Hi @bluikko, thanks again for the details. I think I'm starting to figure out what's going on: the Following from your very first comment in the opening of this issue, the workflow I thought you were using was something like The fact that only the I hope this helps to clarify what you're seeing. What I'd like to check with you is whether the workflow I've summarized above would fit your needs. You could use |
Understood and I guess that makes sense.
|
It would seem that the
as_macro
field is added to generated IX-F JSON export only if it is passed inclients.yml
and is missed if it is read from PeeringDB AS-set record.Since we (and likely everyone else) try to automate this is much as possible, meaning PeeringDB is used wherever possible, the end result IX-F JSON export will be missing
as_macro
for most clients. It would be nice ifas_macro
is added even when it is read from PeeringDB.We typically generate the route server configs first so the AS-set could be already cached, if the current limitation is due to avoiding making queries to PeeringDB when generating the IX-F JSON.
The text was updated successfully, but these errors were encountered: