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

@perhallgren perhallgren marked this pull request as ready for review October 1, 2025 11:09
@perhallgren perhallgren requested a review from a team as a code owner October 1, 2025 11:09
twangboy
twangboy previously approved these changes Oct 1, 2025
@twangboy twangboy added the test:full Run the full test suite label Oct 1, 2025
@twangboy twangboy added this to the Sulfur v3006.17 milestone Oct 1, 2025
@perhallgren perhallgren force-pushed the fix/3006.x/missing-debian-ip-options branch from bee8a26 to 76625fc Compare October 6, 2025 04:41
@perhallgren
Copy link
Author

twangboy the build failed due to a trailing space. I force-pushed a fix onto the previous commit. Do I need to do anything to re-run the CI?

twangboy
twangboy previously approved these changes Oct 6, 2025
Tests that all mapped options are also in valid_opts.
@perhallgren perhallgren force-pushed the fix/3006.x/missing-debian-ip-options branch from d108c96 to 8c61b05 Compare October 16, 2025 13:13
@perhallgren
Copy link
Author

@twangboy looks lke the pipeline is pending approval to run, can you help out? :)

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 debian_ip doesn't set up_cmds

3 participants