-
Notifications
You must be signed in to change notification settings - Fork 278
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
Fix management interface and startup configs for IOL #2347
Conversation
- Allow for user startup configs to override default cfg - Allow for user to supply partial startup config with '.partial' file ext - Modify cfg template to allow for partial cfg - Rename startup config ('startup.cfg') to 'boot_config.txt' to better reflect nature of the file.
- Updates IOL mgmt interface IP addressing on boots that are NOT the first boot.
OpenStdin
to container config
I've added a few things:
As per the name, To refresh your memory, the reason we must do this is because in IOL the startup configuration file is ignored as soon as the nvram file exists (where user configuration is stored once a user does So the issue would be that:
|
@hellt Currently my change only alters the management IP on the mgmt interface. Is there a possible case at all where the management gateway or subnet could change without having to do a deployment with If yes, I'll add configuration to update the static default route for the mgmt VRF. |
the eth0 interface of a container can change when you do a regular deploy operation. In other words, it doesn't matter if reconfigure is used or not, the IP might change if it becomes allocated to another node between two deploys |
@hellt Yes, understood. That is what has already been fixed in this PR. What I mean to ask is if the entire subnet can change, hence constituting a change of the next hop IP for the static default mgmt route. For example: On initial deployment the subnet is Hope that explained it well enough :) |
Apologies, fixing the build errors as well, thought I had everything covered. |
@hellt Kindly requesting your help with the MockRuntime stuff. On this front I am out of my depth so I'll be a bit slow. I didn't have access to my PC earlier, hence why I asked re: the mgmt subnet. But yes I have confirmed that the static route must be added as well since this case is possible. |
Ok, should be good to go (bar the tests). Not proud of the 7 second delay. But this is an artifact of IOL having a 5 second boot delay. We can probably remove the 5sec boot delay (this is on the vrnetlab side).. but it means everyone has to rebuild their containers. Also the |
Thanks @kaelemc I think to sleep well at nights we might want to add a short e2e test for iol startup config. hit me up on discord if you want to have some introduction to the testing infra if you hit roadblocks |
I see you generated the mocks via the Makefile.. didn't know that it was that simple 😅. Anyways i've added two fairly basic tests to confirm partial and full startup configurations are loading correctly. Full config also tests the template variable replacement. This is not supported in the partial config use case. Tested it all locally on my machine, Everything seemed to work fine. Let me know if I got anything wrong. |
thanks @kaelemc |
it seems that the |
It runs if it's not the first boot of IOL. If the NVRAM file already exists, we know this is not the first boot -- so update the management interface addressing. |
Documentation has been added regarding the startup configuration. Let me know if you see any improvements, clarifications or further info I should add/change. I am not so familiar with the testing aspect, I am happy to take a crack at it, but will need some info & assistance. Is the codecov report based on the robotframework tests, or is there something else in play there? How do you think we should handle this since for the mgmt intf IP addressing to be updated (the code branch in question, |
Ok did a few things:
I've probably written the testing very poorly, This is my first time touching Robot Framework, so I just did a bit of googling for the syntax/stuff I couldn't infer from the existing tests. If you have any changes/cleanup suggestions or any other stuff I'm all ears. |
thanks @kaelemc |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2347 +/- ##
==========================================
- Coverage 51.82% 51.80% -0.03%
==========================================
Files 172 172
Lines 17000 17083 +83
==========================================
+ Hits 8811 8850 +39
- Misses 7267 7307 +40
- Partials 922 926 +4
|
Relevant to IOL and the discussion in Discord.