Softlink to netplan

I’m using ubuntu and use netplan to store static IP configurations. When I softlink netplan and push a release, netplans fails to load after reboot and therefore the update fails due to not being able to checkin.

Im curious, how are you configuring the network stack?

Hi @pv3,

Netplan being quite Ubuntu-specific makes it hard to give advice. When you say “softlink”, what do you exactly mean? Putting the config behind a link? Or something else? What do you link where?

Greetz,
Josef

PS: as you asked, I’m usually using systemd-networkd

Hi Josef,

Thanks for taking a look and giving your setup.

I should have been a bit more clear of my use case in my first post, my images are configured with DHCP which encompasses 90% of deployments. The remaining 10% are static, so if I were to to push the image, it would never work because it needs to check back in. So my thought is to keep the network config in persistent and link the file like so:

sudo mv /etc/netplan/00-installer-config.yaml /data/00-installer-config.yaml
sudo ln -s /data/00-installer-config.yaml /etc/netplan/00-installer-config.yaml

I’m working on building a system configurator for the client but even if it were ready tomorrow, I don’t see how to ‘re-profile’ the client after a deployment, would I create late scripts to pull the configs down or is there a way to store on persistent and just have my configurator app update persistent? As I don’t have a configurator at the moment, I would need to lean towards the latter option today as the config is stored locally.

Thanks again.

-Pat

Hi @pv3

The persistent partition at /data is meant for exactly the things you mentioned. A common use case is to store network configuration there, so it certainly works. If netplan falls over, the question to me is: “Why?”. Have you checked the logs? Maybe it tries to access the link before /data is mounted?

Greetz,
Josef

Thank you Josef. You were right, netplan was trying to apply the config before the partition was mounted.

I created a systemd service to rectify it.

1 Like