~curtin-dev/curtin/trunk

« back to all changes in this revision

Viewing changes to examples/tests/network_mtu.yaml

  • Committer: Ryan Harper
  • Date: 2016-08-29 21:06:46 UTC
  • mfrom: (416.4.28 trunk.more-ipv6)
  • Revision ID: ryan.harper@canonical.com-20160829210646-1f9pv8r691iggedz
curtin/net: overhaul of eni rendering to handle mixed ipv4/ipv6 configs

To ensure complete ipv4/ipv6 support for advanced and stacked
configurations update how curtin.net renders /etc/network/interfaces for
different releases (precise -> yakkety). ifupdown has subtle issues with
various networking features and curtin needs to ensure consistent
behavior.

- Propery handle emitting the 'auto' control tag for stacked interfaces,
  like vlans over bonds
- Workaround LP:1609367 by rendering ifupdown hooks to handle the various
  cases. This works generically in all ubuntu releases 
- Add vmtests for mtu settings
- Drop the use of ipv4 alias interfaces (eth0:1, eth0:2) and instead just
  add additional e/n/i stanzas. ifupdown already uses iproute2's /sbin/ip
  which supports adding additional ip addresses to an interface without the
  use of the v4-only interface alias structure. This provides consistent
  behavior for all types of interfaces (physical, vlan, bonds, and stacked
  interfaces) across all releases. Two side-effects: 1) users can no longer
  `ifdown eth0:1` to remove a single ip address from an interface; if down
  eth0 will take _all_ ip addresses on that interface. 2) ifconfig output
  only shows *one* ipv4 address, so users will need to use /sbin/ip addr
  show <interface> to see all ip addresses assigned to an interface.
- Add vmtests for alias settings
- Restructure all of the common network testcases into a single class
  TestNetworkTestBaseAbs, all varients testing network inherit from this
  class and override only the config file and any special case test-cases
  and file collection
- Global replace of testcase use of 'with open' and instead use
  load_collect_file()
  - Fix falsepositive uefi and multipath test this replacement exposed.
- Add ip_a_to_dict parser for `/sbin/ip a` output
  - drop ifconfig_a parser

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
showtrace: true
 
2
network:
 
3
    version: 1
 
4
    config:
 
5
        - type: physical
 
6
          name: interface0
 
7
          mac_address: "52:54:00:12:34:00"
 
8
          subnets:
 
9
              - type: static
 
10
                address: 192.168.1.2/24
 
11
                mtu: 1501
 
12
              - type: static
 
13
                address: 2001:4800:78ff:1b:be76:4eff:fe06:1000
 
14
                netmask: 'ffff:ffff:ffff:ffff::'
 
15
                mtu: 1480
 
16
        - type: physical
 
17
          name: interface1
 
18
          mac_address: "52:54:00:12:34:02"
 
19
          subnets:
 
20
              - type: static
 
21
                address: 192.168.2.2/24
 
22
                mtu: 1501
 
23
              - type: static
 
24
                address: 2001:4800:78ff:1b:be76:4eff:fe06:2000
 
25
                netmask: 'ffff:ffff:ffff:ffff::'
 
26
                mtu: 1501
 
27
        - type: physical
 
28
          name: interface2
 
29
          mac_address: "52:54:00:12:34:04"
 
30
          subnets:
 
31
              - type: static
 
32
                address: 192.168.3.2/24
 
33
              - type: static
 
34
                address: 2001:4800:78ff:1b:be76:4eff:fe06:3000
 
35
                netmask: 'ffff:ffff:ffff:ffff::'
 
36
                mtu: 1501
 
37
        - type: physical
 
38
          name: interface3
 
39
          mac_address: "52:54:00:12:34:06"
 
40
          subnets:
 
41
              - type: manual
 
42
                control: manual
 
43
              - type: static
 
44
                address: 2001:4800:78ff:1b:be76:4eff:fe06:4000
 
45
                netmask: 'ffff:ffff:ffff:ffff::'
 
46
                mtu: 9000
 
47
        - type: physical
 
48
          name: interface4
 
49
          mac_address: "52:54:00:12:34:08"
 
50
          subnets:
 
51
              - type: static
 
52
                address: 2001:4800:78ff:1b:be76:4eff:fe06:5000
 
53
                netmask: 'ffff:ffff:ffff:ffff::'
 
54
                mtu: 1480
 
55
              - type: static
 
56
                address: 192.168.5.2/24
 
57
                mtu: 1501
 
58
        - type: physical
 
59
          name: interface5
 
60
          mac_address: "52:54:00:12:34:0c"
 
61
          subnets:
 
62
              - type: static
 
63
                address: 2001:4800:78ff:1b:be76:4eff:fe06:6000
 
64
                netmask: 'ffff:ffff:ffff:ffff::'
 
65
                mtu: 1501
 
66
              - type: static
 
67
                address: 192.168.6.2/24
 
68
                mtu: 1501
 
69
        - type: physical
 
70
          name: interface6
 
71
          mac_address: "52:54:00:12:34:0e"
 
72
          subnets:
 
73
              - type: static
 
74
                address: 2001:4800:78ff:1b:be76:4eff:fe06:7000
 
75
                netmask: 'ffff:ffff:ffff:ffff::'
 
76
                mtu: 1501
 
77
              - type: static
 
78
                address: 192.168.7.2/24
 
79
        - type: physical
 
80
          name: interface7
 
81
          mac_address: "52:54:00:12:35:01"
 
82
          subnets:
 
83
              - type: static
 
84
                address: 2001:4800:78ff:1b:be76:4eff:fe06:8000
 
85
                netmask: 'ffff:ffff:ffff:ffff::'
 
86
                mtu: 9000
 
87
              - type: manual
 
88
                control: manual