1. 18 Oct, 2019 1 commit
  2. 19 Jul, 2019 1 commit
  3. 18 Jul, 2019 3 commits
  4. 22 May, 2019 1 commit
  5. 11 Apr, 2019 1 commit
    • Mohammed Naser's avatar
      Ignore Wireguard interfaces · 64718a1d
      Mohammed Naser authored
      The Wireguard interfaces should not be managed by Glean as they
      are usually configured manually (and they are mainly tunnel
      interfaces).
      
      They do present themselves with a permanent address however, which
      means the only way to ignore them is by using the ignored list.
      
      Change-Id: Ie0c2b56d78620f6ee562b42de6249b1efd37558e
      64718a1d
  6. 06 Apr, 2019 1 commit
    • Clark Boylan's avatar
      Use openstackdocstheme. · a1e08e50
      Clark Boylan authored
      Oslosphinx seems to no longer work and is breaking our docs builds.
      Switch to openstackdocstheme instead.
      
      Change-Id: I72600ce84cb04bfa8350b273c030ae3914f7de40
      a1e08e50
  7. 25 Feb, 2019 1 commit
  8. 19 Dec, 2018 2 commits
  9. 18 Dec, 2018 1 commit
  10. 04 Dec, 2018 1 commit
  11. 29 Nov, 2018 2 commits
    • Ian Wienand's avatar
      A systemd skip for Debuntu systems · 48ad6dbd
      Ian Wienand authored
      This skip matches the existing service startup skips we have for Red
      Hat and Suse on Debuntu systems.
      
      Change-Id: I1926fd122a5833fb295f3c41292c474e5bc8c996
      48ad6dbd
    • Ian Wienand's avatar
      Add NetworkManager distro plugin support · 8f9b156a
      Ian Wienand authored
      On Fedora 29+, the network.service scripts have been moved into a
      separate deprecated package.  NetworkManager is the supported
      interface for configuring networks.  We have ignored NM for a long
      time, but we are now running out of options.
      
      Luckily we can support this fairly easily with the ifcfg-rh disto
      plugin that NM provides.  Using this, the existing
      /etc/sysconfig/network-scripts files are used by NM.  The only slight
      difference to the config files is that we need to tell NM it's ok to
      use it by removing NM_CONTROLLED=no.  We also need to update the
      .service file which needs to call glean with the flag to enable NM,
      and doesn't need to call ifup.  We have found that local-fs.target
      seems to be the best place to run this so it's nice and early.
      
      This is plumbed through from simple-init in DIB
      (I4d76e88ce25e5675fd5ef48924acd09915a62a4b) which will call
      glean-install with the new --use-nm flag if
      DIB_SIMPLE_INIT_NETWORKMANAGER is set.
      
      Since all Centos and Feodora are using NetworkManager by default,
      there is an argument that we should just switch to this and not bother
      with a flag.  However, since NM brings in new libraries and possibly
      other changes to the base system, it's very possible we will either
      want to revert the change temporarily or perhaps even run parallel
      with and without.  In these cases we can simply flip the variable in
      DIB and rebuild rather than having to revert code and do new glean
      releases.  Longer term (say, around time we bring up CentOS 8), I see
      this becoming the default.
      
      Other platforms have distro plugins for NM to read their "legacy"
      configuration files too in the same way as here.  This is left as
      future work.
      
      NetworkManager enabled build and boot for Centos and Fedora is tested
      in I640838c68a05f3b22683c1e90279725a77678526
      
      Change-Id: I3d379d35e7b000f32c3f6cc197c8aaafebc683fb
      8f9b156a
  12. 26 Nov, 2018 1 commit
    • qingszhao's avatar
      fix tox python3 overrides · c84d6ec8
      qingszhao authored
      We want to default to running all tox environments under python 3, so
      set the basepython value in each environment.
      
      We do not want to specify a minor version number, because we do not
      want to have to update the file every time we upgrade python.
      
      We do not want to set the override once in testenv, because that
      breaks the more specific versions used in default environments like
      py35 and py36.
      
      Change-Id: Icb9bbf7bc7b1f9e1e28cb3c9cff200c237e57f80
      Closes-Bug:  #1801657
      c84d6ec8
  13. 21 Nov, 2018 1 commit
    • Matthew Thode's avatar
      write dns info to networkd · 84f6dd11
      Matthew Thode authored
      Write dns info to networkd so it can be consumed by resolved if resolved
      is enabled.
      
      Change-Id: Ia7b55e9a538cc6f060bc08da85123d7bb3a4f73e
      84f6dd11
  14. 20 Nov, 2018 2 commits
    • Ian Wienand's avatar
      Pass arguments rather than distro to utility functions · de065f58
      Ian Wienand authored
      These functions take a 'distro' argument which comes from args.distro.
      In future changes, we may want to send through more arguments from the
      command-line to these functions, so pass 'args' directly and
      dereference the distro when required.
      
      Change-Id: I0f3d736872492fb8148520c195a977919b9e5786
      de065f58
    • Ian Wienand's avatar
      Fix argv patching in unit tests · e6b6331a
      Ian Wienand authored
      The argv patching was not actually working; it has something to do
      with an interaction between the testscenarios based load_tests we use
      and our mocking of argv with
      
       @mock.patch.object(sys, 'argv', ['./glean', '--hostname'])
      
      What appears to happen is that tests in the same scenario groups get
      the *same* reference to the sysv.argument object (i.e. it's only
      created once, not once for each call).  Thus each test .append()s to
      this same list, and thus we end up appending more and more arguments
      to the list.  The sys.argv ends up looking like:
      
        stdout: {{{['./glean', '--hostname', '--distro=ubuntu', '--distro=ubuntu',
          '--distro=debian', '--distro=redhat', '--distro=redhat', '--distro=centos',
          '--distro=centos', '--distro=gentoo', '--distro=gentoo', '--distro=opensuse', ...
      
      This can't be, Ian, how does it even work?  Well we're lucky in that
      for all the existing test-cases, the final arguments appended have
      overwritten the prior ones sufficiently that the test-cases work.  If
      you start changing the arguments, things go wrong.
      
      To simplify the whole thing, make main() take an argv argument that is
      passed to argparse.  For normal use this comes from sys.argv, and in
      unit tests we construct our own argv list for each test.
      
      Change-Id: I090164fdd7a46d0c7a29eb6c18f80dc84cfd8469
      e6b6331a
  15. 12 Oct, 2018 1 commit
    • Matthew Thode's avatar
      check networkd files · d87cf63a
      Matthew Thode authored
      Previously we were checking Gentoo netifrc files (/etc/conf.d/net.{iname})
      and not networkd files <F12>(/etc/systemd/network/{iname}.(netdev|network)).
      
      Change to check for the networkd files.  This is not perfect as the file
      name does not directly tie to the device name, but it's a start (it exists
      as a Nmme or Match value within the file itself).
      
      Change-Id: I6130102005ab61dfc25cd77c6e8abea38bccf201
      d87cf63a
  16. 27 Sep, 2018 5 commits
  17. 25 Sep, 2018 3 commits
  18. 24 Sep, 2018 1 commit
    • Clark Boylan's avatar
      Add option to ignore config drive interfaces info · 0908c99b
      Clark Boylan authored
      Some clouds provide incorrect network_data on the config drive because
      they are doing an end round neutron to configure networking in their
      cloud. Neutron has incorrect data, that ends up in the config drive and
      we configure the interfaces improperly.
      
      Address this by checking for a metadata key called
      glean_ignore_interfaces. If present then we ignore any interface
      configuration information in the config drive and instead fall back to
      dhcp.
      
      Change-Id: I20bc7a124891715fa2ead9e4a72956c80d63563d
      0908c99b
  19. 20 Sep, 2018 5 commits
    • Clark Boylan's avatar
      Debian interface config set bond once · 90e6390c
      Clark Boylan authored
      There are bond details that apply to all the interface types. Rather
      than set them separately for each interface type just set them once.
      
      Change-Id: Id1abb85ab32a12adea92e337d00e2a03e877021a
      90e6390c
    • Clark Boylan's avatar
      Consistent debian interface control flow · 88a4e7b3
      Clark Boylan authored
      Handle each interface type in its own if block and rely on the use of
      the if conditional to control flow rather than continues. This allows us
      to write the results once and is easier to read.
      
      Change-Id: I9aec63e7d85eac3704c2c6a5566b669ecc5bbf00
      88a4e7b3
    • Clark Boylan's avatar
      Manage the debian interface header in one place · d54e6799
      Clark Boylan authored
      We were setting an identical header for all of the different interface
      types. Manage this in a single location which simplifies the control
      flow through the different interface types.
      
      Change-Id: Ib0300d46896cf95c83223f1af3e2fe890698af2b
      d54e6799
    • Clark Boylan's avatar
      Check same debian interface path everywhere · 7c41a808
      Clark Boylan authored
      We had a special function for checking if a debian interface config file
      exists but also manually constructed the path elsewhere to check if it
      exists. Consolidate and drop the function since we already need the full
      path in other places and once you have the full path os.path.exists is
      the function you need.
      
      Change-Id: I7a800b09699e0e86ee9df5988823b48910b57051
      7c41a808
    • Clark Boylan's avatar
      Use common function for debian bond mode · 9e05a420
      Clark Boylan authored
      This adds some DRYness to the debian interface config writing around
      bond modes. Makes code a bit easier to follow.
      
      Part of a larger refactoring to make this code easier to maintain.
      
      Change-Id: I014e16e4078d4b73cb00a8706eca096e5aad6e16
      9e05a420
  20. 25 Jul, 2018 1 commit
    • Ian Wienand's avatar
      Close file in safe_open · bcef0fe1
      Ian Wienand authored
      Since this is intended to be used as a context manager, it should
      close the file once we're done with it.  Also, I can't see why we
      would want to reset the selinux state if an exception was raised -- it
      seems there may be no file to actually do this on.  Add it to the
      regular exit path.
      
      Change-Id: I7e7dba66a1c446fa82ca3facde19f89c40e9e935
      bcef0fe1
  21. 06 Jun, 2018 1 commit
    • Markos Chandras's avatar
      glean: Fix SUSE support for bridges and vlan configurations. · ac8458da
      Markos Chandras authored
      We need to check the /etc/sysconfig/network/ifcfg-* files for bridges
      and vlans similar to regular interfaces. Moreover, the existing code for
      checking whether the host is a SUSE distribution did not work for newer
      releases (openSUSE Leap 15 is being reported as 'opensuse-leap' and
      Tumbleweed is being reported as 'opensuse-tumbleweed') so we need to
      refactor it a bit to actually check whether the string 'suse' exists in
      the distro variable to simplify things.
      
      Finally, the systemd service was missing the check for the SUSE network
      files so we add that as well. systemd should apply a logical AND in
      these conditionals so it should work fine on both Red Hat and SUSE
      distros.
      
      Change-Id: Ic5c6745dbe0077089ecaa1dd8f9b4949ac80efae
      ac8458da
  22. 29 Mar, 2018 1 commit
  23. 27 Mar, 2018 1 commit
    • Matthew Thode's avatar
      Add networkd support · fa417426
      Matthew Thode authored
      Initially I've only added this for Gentoo (will only be turned on within
      Gentoo systemd installs).  Has full ipv6 support too.
      
      Change-Id: I34eeb96eb90850d6a4407559e8a3f9aa74483a95
      fa417426
  24. 26 Feb, 2018 1 commit
  25. 17 Feb, 2018 1 commit