~raharper/curtin/trunk.fix-bcache-sysfs-write-failures-on-remove

« back to all changes in this revision

Viewing changes to tests/vmtests/__init__.py

  • Committer: Scott Moser
  • Author(s): Ryan Harper
  • Date: 2017-07-27 17:26:02 UTC
  • mfrom: (504.2.78 centos-passthrough)
  • Revision ID: smoser@ubuntu.com-20170727172602-6x7fi8pg8ga41m38
pass network configuration through to target for ubuntu and centos

curtin will now query the in-target cloud-init for the NETWORK_CONFIG_V2
feature flag. If present, curtin will copy in any custom networking config
an defer rendering to cloud-init upon first boot. This function is also
implemented for Centos/Enterprise Linux distros.

Centos network curthooks has the following capabilities
  - Only runs when 'centos_network_curthooks: true' is passed in via
    curtin config. MAAS will modify centos built-in curthooks to use the
    centos_network_curthooks as needed.
  - If the target centos image does not contain a new enough cloud-init
    then the cloud-init-el-stable repo is configured and curtin installs
    epel-release, cloud-init and bridge-utils if needed

Additional VMtests were added for Centos66 and Centos70 covering all of
the network tests. Note that network_mtu is disabled as mixed v4 and ipv6
mtu settings are not supported in sysconfig.

Other useful features in this branch:
- tools/build-deb now lets users set the RELEASE value like:
  RELEASE=xenial ./tools/build-deb
  and the RELEASE value will be set in the changelog for the deb

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
            logger.debug("Interface name: {}".format(ifname))
594
594
            iface = interfaces.get(ifname)
595
595
            hwaddr = iface.get('mac_address')
596
 
            if hwaddr:
 
596
            if iface['type'] == 'physical' and hwaddr:
597
597
                macs.append(hwaddr)
598
598
        netdevs = []
599
599
        if len(macs) > 0:
685
685
            configs.append(excfg)
686
686
            logger.debug('Added extra config {}'.format(excfg))
687
687
 
 
688
        if cls.target_distro == "centos":
 
689
            centos_default = 'examples/tests/centos_defaults.yaml'
 
690
            configs.append(centos_default)
 
691
            logger.info('Detected centos, adding default config %s',
 
692
                        centos_default)
 
693
 
688
694
        if cls.multipath:
689
695
            disks = disks * cls.multipath_num_paths
690
696