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

fix netplan configuration for bond active-backup mode #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sab-systems
Copy link
Contributor

  • Set network bond in netplan configuration to 'active-backup'
    when getting mode: 1 from network_data.json
    netplan does not understand mode: 1 amymore in Ubuntu 18.04.
    Remove netplan configuration coming from cloud-init.

New release version: BMS_SETUP_1_6

  when getting mode: 1 from network_data.json
  netplan does not understand mode: 1 amymore in Ubuntu 18.04.
  Remove netplan configuration coming from cloud-init.
@garloff
Copy link
Contributor

garloff commented Dec 20, 2019

Looks good to me.
I would suggest considering using TABs in clean_netplan_ifaces() as well.

@garloff
Copy link
Contributor

garloff commented Dec 20, 2019

Sidenote: I do not seem to have write permissions here, so the PR will need to be merged by someone with the right permissions.

@garloff
Copy link
Contributor

garloff commented Dec 20, 2019

commit 9aed9f5df8de620545048b412ac35781cb46739e
Author: Kurt Garloff <[email protected]>
Date:   Fri Dec 20 18:07:25 2019 +0100

    Replace some ws with TABs.

diff --git a/bms-network-setup.py b/bms-network-setup.py
index 6e4a7a7..f7c8f6a 100755
--- a/bms-network-setup.py
+++ b/bms-network-setup.py
@@ -24,7 +24,7 @@ def usage():
        six.print_("Usage: bms-network-setup.py [-d] [-o] [-c] [-s|u|r|n]", file=sys.stderr)
        six.print_(" -d: Debug: reads network_data.json and writes ifcfg-* in current dir", file=sys.stderr)
        six.print_(" -o: Own: bring interfaces down before enslaving them to a bond", file=sys.stderr)
-       six.print_(" -c: Remove ifcfg-e* ifor non-existing devices", file=sys.stderr)
+       six.print_(" -c: Remove ifcfg-e* for non-existing devices", file=sys.stderr)
        six.print_(" -s: SuSE: assume we run on a SuSE distribution", file=sys.stderr)
        six.print_(" -u: Debian: assume we run on a Debian/Ubuntu distribution", file=sys.stderr)
        six.print_(" -r: RedHat: assume we run on a RedHat/CentOS distribution", file=sys.stderr)
@@ -728,9 +728,9 @@ def clean_miss_ifaces(njson):
                os.unlink(cand)
 
 def clean_netplan_ifaces(njson):
-        ci_bond0_file = "/etc/netplan/50-cloud-init.yaml"
-        if os.path.exists(ci_bond0_file):
-            os.remove(ci_bond0_file)
+       ci_bond0_file = "/etc/netplan/50-cloud-init.yaml"
+       if os.path.exists(ci_bond0_file):
+               os.remove(ci_bond0_file)
 
 def process_network_hw():
        "get network_data.json and process it"

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.

2 participants