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

Move the ifdown/ifup logic to the interface definition file #572

Closed
wants to merge 1 commit into from
Closed

Move the ifdown/ifup logic to the interface definition file #572

wants to merge 1 commit into from

Conversation

niedbalski
Copy link
Contributor

This is a proposed fix for https://bugs.launchpad.net/juju-core/+bug/1341524 , which is a specific issue caused by the 'ifdown interface' performed on the injected cloud-init, this change was introduced in favor of the previous 'service networking restart' as you can see performing a git diff -r 411dbff^! . This change was made because that command were killing dbus on the local provider.

So, my proposal is that instead of forcing the ifdown of the interface, we can use the network interface configuration to pass a set of pre-up command that brings the bridge and the associated interface up after configure it.

Please let me know any observation.

Signed-off-by: Jorge Niedbalski R niedbalski@gmail.com

that the bridge_port is up before start the bridge this is a fix proposal for LP: #1341524

Signed-off-by: Jorge Niedbalski R <niedbalski@gmail.com>
if err != nil {
return "", err
}

Copy link
Member

Choose a reason for hiding this comment

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

The above error check can be inlined.
if err = tpl.Execute(); err != nil {
return "", errors.Annotate(err, "cannot update interface names")
}

@wallyworld
Copy link
Member

Thanks for this fix - it looks ok, but I do not have enough MAAS and network background to comment for sure. Can this please be tested live on a MAAS deployment to ensure it works as expected?

cat > /etc/network/interfaces.d/%s.cfg << EOF
func restoreInterfacesFiles(iface string) (string, error) {
return replaceInterface(`mkdir -p etc/network/interfaces.d
cat > /etc/network/interfaces.d/{{ .NetworkInterface }}.cfg << EOF

Choose a reason for hiding this comment

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

Should it be absolute or relative here? etc/network/interfaces.d vs. /etc/network/interfaces.d is inconsistent IMHO.

@niedbalski
Copy link
Contributor Author

This PR Is not longer needed.

@niedbalski niedbalski closed this Aug 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants