-
Notifications
You must be signed in to change notification settings - Fork 559
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
The IOSDriver's BGP neighbor details cannot be pickled, which causes issues with peering-manager #2161
Comments
@mirceaulinic, @ktbyers, is there something I can do to make evaluating this issue and the associated PRs easier for you? I understand you probably have important things to do so I would like to make it as easy for you as possible to review this minor request. Maybe a TL,DR: Thank you very much for the great work you have put into NAPALM! |
@paketb0te I will see if I can look at it...it might be tomorrow though. |
@paketb0te Okay, let me know if there is still an issue / problem here. |
thx @ktbyers, greatly appreciate your help! |
Cheers,
we are running peering-manager, which uses the wonderful NAPALM library to fetch data from routers.
For some reason we are still running IOS devices from the stone age in some locations, which causes us a little issue - NAPALM is of course perfectly fine talking to these devices, as the built-in
IOSDriver
"just works" (thanks again to all the wonderful people contributing to this great piece of software!).BUT peering-manager then wants to process that data, and stores that data in redis for caching - and this is where the trouble starts, because apparently, the data that is returned by
IOSDriver.get_bgp_neighbors_detail()
does not like to be pickled. It is my understanding that this is because it uses a defaultdict in combination with a lambda function to generate a nested defaultdict, and only named functions can be pickled, not lambdas.As far as I can see, there are two simple solutions to this:
or
2) don't use defaultdicts at all, and create the missing dicts / list manually (as is done e.g. in the
IOSXRDriver
)happy to implement this, just let me know which one you prefer.
The text was updated successfully, but these errors were encountered: