Skip to content

Conversation

@perhallgren
Copy link

What does this PR do?

For debian-ip, not all options get rendered in the final interfaces file.

The valid_opts list must be a superset of the keys of the optmap map for the mappted options to get rendered.

This commit adds the missing options to the valid_opts list.

What issues does this PR fix or reference?

Fixes #58210 and #57820.

Previous Behavior

Given

    enp0sbeef:
        ----------
        network:
            |_
              ----------
              enabled:
                  True
            |_
              ----------
              type:
                  eth
            |_
              ----------
              proto:
                  static
            |_
              ----------
              ipaddr:
                  10.0.0.25/24
            |_
              ----------
              post_up_cmds:
                  - echo "hi"

/etc/network/interfaces

    auto enp0sbeef
    iface enp0sbeef inet static
        address 10.0.0.25/24

New Behavior

Given

    enp0sbeef:
        ----------
        network:
            |_
              ----------
              enabled:
                  True
            |_
              ----------
              type:
                  eth
            |_
              ----------
              proto:
                  static
            |_
              ----------
              ipaddr:
                  10.0.0.25/24
            |_
              ----------
              post_up_cmds:
                  - echo "hi"

/etc/network/interfaces

    auto enp0sbeef
    iface enp0sbeef inet static
        address 10.0.0.25/24
        post-up echo "hi"

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

As reported in saltstack#58210 and
saltstack#57820, not all options get rendered in
the final `interfaces` file.

The valid_opts list must be a superset of the keys of the optmap map for the
mappted options to get rendered.

This commit adds the missing options to the valid_opts list.
Tests that all mapped options are also in valid_opts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] some broken options in debian_eth.jinja for /etc/network/interfaces

2 participants