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

Support static addressing via net.toml #2445

Merged
merged 8 commits into from
Sep 30, 2022

Commits on Sep 1, 2022

  1. netdog: modularize wicked dhcp code

    This commit begins the process of modularizing the `wicked` code to
    prepare for future additions.  The structure will largely follow the
    structure in `net_config` to make the code easy to correlate.  Currently
    only the DHCP-related wicked code is split out; more to come.
    zmrow committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    afd75b1 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2022

  1. netdog: Add static address modules

    Adds the corresponding static address modules to both `net_config` and
    `wicked`.  The `net_config` module contains the structs that `net.toml`
    deserializes into.  The `wicked` module contains the structs that are
    serialized into interface configuration files, as well as the code to
    convert the `net_config` structs into `wicked*` structs.
    zmrow committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    71190e6 View commit details
    Browse the repository at this point in the history
  2. netdog: Add constructor for WickedInterface

    This commit adds a `new()` constructor for `WickedInterface`.  This
    constructor helps to hide defaults for `WickedControl`, and provides a
    base on which to build out the structure (in lieu of a full on builder).
    As we add additional struct members, we can add them to this method
    rather than to all the callers/users of `WickedInterface`.
    zmrow committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    549ccac View commit details
    Browse the repository at this point in the history
  3. netdog: Add net config v2 and static address tests

    This change adds v2 of network config, which supports setting static
    addresses and routes.  An additional test macro and associated test
    files have also been added to validate the functionality.
    zmrow committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    c9db785 View commit details
    Browse the repository at this point in the history
  4. netdog: Add static_lease_path function to lease module

    This change adds an additional public function to the `lease` module
    that allows the user to fetch the path for a given interface's static
    lease if it exists.  It renames the original `lease_path` function to
    `dhcp_lease_path` to be a bit more descriptive, and moves the shared
    functionality to a private function.
    zmrow committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    2b6d021 View commit details
    Browse the repository at this point in the history
  5. netdog: Handle static addresses during install

    This change ensures that when `netdog install` is called when setting up
    a static address, the proper lease file is used to write the current IP.
    When writing the `resolv.conf` file at this time, we use similar logic
    as before, getting settings from DNS config or from the DHCP lease,
    since static addresses don't contain DNS info.
    
    This change also unifies the logic of gathering the lease, writing the
    resolv.conf and current IP into shared functions.
    zmrow committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    31666fc View commit details
    Browse the repository at this point in the history
  6. netdog: Add additional wicked config validation for V2

    This commit updates the wicked e2e testing.  It templates the
    `net_config.toml` and adds additional config to said file to ensure that
    the static address configuration renders properly.  The wicked testing
    function has been updated to loop through existing net config versions.
    zmrow committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    46c4df0 View commit details
    Browse the repository at this point in the history
  7. PROVISIONING-METAL: Add net config v2 documentation

    This adds the docs for v2 of network configuration, which supports
    adding static addresses and simple routes to an interface.
    zmrow committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    f50bbbd View commit details
    Browse the repository at this point in the history