We’re facing a challenge in adding a static route via one-context and we’re seeking guidance on the process.
Here’s the context: We previously established a static route on a production server using the “ip route” command. Additionally, we included this route in “rc.local” to ensure its persistence during startup. However, a situation arose when a team member attempted to add an SSH key via context. Strangely, this action triggered a network restart (the reason behind this behavior is unclear). Unfortunately, this restart caused the previously added route to disappear, subsequently affecting our services.
Could you kindly provide insights on how to circumvent this issue? Additionally, if we need to configure a static route using the nebula context, could you guide us through the process?
Thank you in advance for your assistance.
The contextualization service in the VM handles a lot of OS services, networking being one of them. Whenever you update any variable inside the CONTEXT section in the VM instance what will happen is
- the context ISO will be ejected from the VM
- a new ISO will be generated with the new CONTEXT information
- the ISO will be injected to the VM
- this injection triggers a re-execution of the context service inside the VM
- among several other changes, networking will be re-initialized with the networking information in CONTEXT
What you are experiencing is the expected behavior. You shouldn’t manually manage the VM networking or at least if you intend to do so, make it dependent on a post
one-context systemd/init service execution.
The recommended approach is to set any static route you want in the CONTEXT section. On the latest context release we added this feature (previously you could do so with START and INIT script functionality). Look for the parameter
ETHx_ROUTES in the Context Section documentation.