Skip to content

Conversation

@shubhamshinde360
Copy link
Contributor

@shubhamshinde360 shubhamshinde360 commented Aug 5, 2025

Summary

  • We get the output of 'ip(6)tables-save' and parse the contents to get the iptables rules.
  • When stderr is combined with stdout, the output of the command can be unexpected causing issues when parsing.
  • This commit disables the combination of stdout and stderr for this reason.
  • Setting 'failonfail' makes sure that any error returned by 'ip(6)tables-save' command is reported as failure to the user without attempting to parse its output.

Additional Context

Related Issues (if any)

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@shubhamshinde360 shubhamshinde360 requested a review from a team as a code owner August 5, 2025 13:08
@shubhamshinde360 shubhamshinde360 force-pushed the MODULES-11580 branch 3 times, most recently from 2a74cdb to 1310aa9 Compare August 5, 2025 13:52
@shubhamshinde360 shubhamshinde360 marked this pull request as draft August 6, 2025 06:48
@shubhamshinde360 shubhamshinde360 force-pushed the MODULES-11580 branch 2 times, most recently from aadaffc to e2bb839 Compare August 6, 2025 07:04
 - We get the output of 'ip(6)tables-save' and parse the contents to get the iptables rules.
 - When stderr is combined with stdout, the output of the command can be unexpected causing issues when parsing.
 - This commit disables the combination of stdout and stderr for this reason.
 - Setting 'failonfail' makes sure that any error returned by 'ip(6)tables-save' command is reported as failure to the user without attempting to parse its output.
 - Adjust rspecs accordingly.
@shubhamshinde360 shubhamshinde360 marked this pull request as ready for review August 7, 2025 10:36
Copy link
Contributor

@amitkarsale amitkarsale left a comment

Choose a reason for hiding this comment

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

LGTM

@shubhamshinde360 shubhamshinde360 merged commit 6c1d42c into main Aug 11, 2025
18 of 50 checks passed
@shubhamshinde360 shubhamshinde360 deleted the MODULES-11580 branch August 11, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants