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

fix(nmcli): remove bond from ip_conn_type #8729

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joey-grant
Copy link

SUMMARY

Removes bond connection types from the ip_conn_type list. Currently, with bond connections being included in the ip_conn_type list, the resulting nmcli commands include references to ipv4 and ipv6 settings. These options are not available to bond connection types as stated by the error output in issue #8558.

Fixes #8558

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

nmcli

ADDITIONAL INFORMATION
# before change

TASK [Setup bond interface for - internal] ***********************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error: invalid or not allowed setting 'ipv4': 'ipv4' not among [connection, bond, 802-3-ethernet (ethernet), ethtool, bridge-port, link, match].\n", "name": "bond-internal", "rc": 2}


# after change

TASK [Setup bond interface for - internal] ***********************************************************************************
ok: [localhost]

By `bond` connections being included in the `ip_conn_type` list, the
resulting `nmcli` commands include references to `ipv4` and `ipv6`
settings. These options are not available to `bond` connection types as
stated by the error output in issue ansible-collections#8558.

Closes ansible-collections#8558
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug has_issue module module new_contributor Help guide this first time contributor plugins plugin (any type) labels Aug 7, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-8 Automatically create a backport for the stable-8 branch backport-9 Automatically create a backport for the stable-9 branch labels Aug 7, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@@ -0,0 +1,2 @@
minor_changes:
- "nmcli - corrects underlying command formation by no longer including ``ipv4.*`` and ``ipv6.*`` settings when working with ``bond`` connection types (https://github.com/ansible-collections/community.general/issues/8558)."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "nmcli - corrects underlying command formation by no longer including ``ipv4.*`` and ``ipv6.*`` settings when working with ``bond`` connection types (https://github.com/ansible-collections/community.general/issues/8558)."
- "nmcli - corrects underlying command formation by no longer including ``ipv4.*`` and ``ipv6.*`` settings when working with ``bond`` connection types (https://github.com/ansible-collections/community.general/issues/8558, https://github.com/ansible-collections/community.general/pull/8729)."

@felixfontein
Copy link
Collaborator

It seems like this was different in the past, since at least some ipv4/ipv6 settings were intentionally passed on for bond interfaces in the past. (https://github.com/ansible-collections/community.general/pull/1113/files#diff-0beb963c40c22c48521d124bde17191aa121555e97ddf206ea1cd82f5d68941cL882)

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Aug 7, 2024
@joey-grant joey-grant marked this pull request as draft August 7, 2024 15:27
@ansibullbot ansibullbot added the WIP Work in progress label Aug 7, 2024
@joey-grant
Copy link
Author

It seems like this was different in the past, since at least some ipv4/ipv6 settings were intentionally passed on for bond interfaces in the past. (https://github.com/ansible-collections/community.general/pull/1113/files#diff-0beb963c40c22c48521d124bde17191aa121555e97ddf206ea1cd82f5d68941cL882)

Thanks for the feedback. I have marked this as a draft. This is looking/feeling more like a workflow problem instead of requiring the solution I proposed. Following a process such as the one described here results in ipv4.* and ipv6.* options being available to a bond type.

@rabin-io
Copy link

So regarding issue #8558, you think it can be resolved by refactoring the steps in the playbook?
(end result should be bonding 2 interface > and the bond should be attached to bridge with IP's)

@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Aug 23, 2024
@felixfontein felixfontein removed the backport-8 Automatically create a backport for the stable-8 branch label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch bug This issue/PR relates to a bug check-before-release PR will be looked at again shortly before release and merged if possible. has_issue module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nmcli error with "invalid or not allowed setting 'ipv4'" when running the playbook the 2nd time
4 participants