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

bonding example is wrong #84

Open
axinojolais opened this issue Mar 19, 2020 · 6 comments
Open

bonding example is wrong #84

axinojolais opened this issue Mar 19, 2020 · 6 comments
Labels
Docs 📚 Issues related to the site's documentation Good first issue 🔰 Priority: Medium

Comments

@axinojolais
Copy link
Contributor

axinojolais commented Mar 19, 2020

Summary

The first bonding example is wrong

Process

Using this file :

  bonds:
    bond0:
      dhcp4: no
      interfaces:
        - eth1
      parameters:
        mode: 802.3ad
        mii-monitor-interval: 100
        transmit-hash-policy: layer3+4

Current and expected result

I expected the bond to be created, but

$ sudo netplan generate
/etc/netplan/01-netcfg.yaml:18:11: Error in network definition: bond0: interface 'eth1' is not defined
        - eth1
          ^

@anthonydillon
Copy link
Contributor

@cyphermox @powersj Could you take a look at this and advise the change required.

@powersj
Copy link

powersj commented Mar 19, 2020

Right, the example is only showing the bonds section of the YAML. You will also still need to define the interface under ethernets. For example:

  ethernets:
    ens4:
      dhcp4: no

A fully complete example, but one that still needs an IP address assigned to the bond, would look like:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens4:
      dhcp4: no
  bonds:
    bond0:
      dhcp4: no
      interfaces:
        - ens4
      parameters:
        mode: 802.3ad
        mii-monitor-interval: 100
        transmit-hash-policy: layer3+4

@anthonydillon
Copy link
Contributor

Thanks @powersj

@axinojolais
Copy link
Contributor Author

Right, the example is only showing the bonds section of the YAML.

By the way, what led me to think this wasn't the case is that the YAML has the "headers"

network:
  version: 2
  renderer: networkd

so it looks like a complete YAML file which works on its own.

@tbille tbille added the Docs 📚 Issues related to the site's documentation label May 6, 2020
@carkod
Copy link
Contributor

carkod commented May 9, 2022

@axinojolais is this still relevant?

@axinojolais
Copy link
Contributor Author

@axinojolais is this still relevant?

Yes. The example is now showing a bond with 2 interfaces, but it's still missing the definition of these 2 interfaces. IMHO, either add the definition for these 2 interface, or remove the headers, or mention that the interfaces need to be defined in the file as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs 📚 Issues related to the site's documentation Good first issue 🔰 Priority: Medium
Projects
None yet
Development

No branches or pull requests

6 participants