Skip to content
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

Refactor hhnet script to use networkctl #354

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

pau-hedgehog
Copy link
Contributor

@pau-hedgehog pau-hedgehog commented Jan 29, 2025

Migrate to networkctl for stability

Fixes #292

@pau-hedgehog pau-hedgehog self-assigned this Jan 29, 2025
@Frostman
Copy link
Member

@pau-hedgehog, I'm not arguing about whether it's more stable, but what kind of change do you see with that change?

@pau-hedgehog
Copy link
Contributor Author

@pau-hedgehog, I'm not arguing about whether it's more stable, but what kind of change do you see with that change?

With this I stopped hitting #292 in env-3, which was blocking me completely (I will add the reference)

But first I want to validate this more thoroughly in CI. In the meantime, please tell me if you prefer to set it as draft

done

sudo ip l s "$bond_name" up
sudo systemctl restart systemd-networkd 2> /dev/null || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, networkctl reload should reconfigure the network, but restart is probably more reliable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying with this

function cleanup() {
for i in {0..3}; do
sudo ip l d "bond$i" 2> /dev/null || true
sudo networkctl down "bond$i" 2> /dev/null || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need to down bonds/interfaces/vlans? If we're removing the dropins and the restarting networkd it should do all the cleanup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the cleanup will be more idempotent this way

@Frostman
Copy link
Member

@pau-hedgehog no, using networkd completely makes sense to me, I think it's an artifact from the very early stage when it was probably not even a flatcar but ubuntu on the test servers

@pau-hedgehog pau-hedgehog marked this pull request as draft January 29, 2025 18:02
@Frostman
Copy link
Member

I think it may break the LLDP as only a first matching dropin will be used, so, you maybe need to enable LLDP on the slave interfaces, not sure

@pau-hedgehog
Copy link
Contributor Author

I think it may break the LLDP as only a first matching dropin will be used, so, you maybe need to enable LLDP on the slave interfaces, not sure

good point. It's not working. I'll make sure the inspect passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VLAB random setup-vpcs errors when configuring server VMs
2 participants