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

(MODULES-8648) - Fix for failures on SLES 11 #816

Merged
merged 2 commits into from
Feb 18, 2019
Merged

(MODULES-8648) - Fix for failures on SLES 11 #816

merged 2 commits into from
Feb 18, 2019

Conversation

david22swan
Copy link
Member

@david22swan david22swan commented Feb 14, 2019

SLES 11 Sp4 seems to default to ‘-m conntrack’ rather than ‘-m state’
In addition, adding back a piece of code for Centos 5

@david22swan

This comment has been minimized.

@david22swan david22swan changed the title (MODULES-8648) - Fix for failures on SLES 11 (WIP) (MODULES-8648) - Fix for failures on SLES 11 Feb 18, 2019
Copy link
Contributor

@HelenCampbell HelenCampbell left a comment

Choose a reason for hiding this comment

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

Couple of things I'm not sure about @david22swan , comments in code 👍

@@ -140,6 +140,11 @@
case $::operatingsystem {
'CentOS': {
case $::operatingsystemrelease {
/^5\..*/: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this part of this PR? Has nothing to do with SLES 11.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was removed by accident in an earlier pr

Copy link
Contributor

Choose a reason for hiding this comment

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

Still has nothing to do with this PR. Either revert the other PR that introduced it or separate it into its own commit. This doesn't make for good git history and would be hard to track.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will separate it out into a 2nd commit

@@ -241,7 +240,7 @@ class { '::firewall': }
it 'applies cleanly' do
# Run it twice and test for idempotency
apply_manifest(pp2, catch_failures: true)
apply_manifest(pp2, catch_changes: do_catch_changes)
apply_manifest(pp2, catch_changes: true) unless fact('operatingsystem') == 'SLES' && fact('operatingsystemmajrelease') == '11'
Copy link
Contributor

Choose a reason for hiding this comment

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

You seem to skip the idempotent checks, is there a reason for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

on sles 11 sp4 State has been deprecated and given a warning to use ctstate instead. It seems to do this for you automatically so everytime the manifest runs it applies as state, but then the firewall changes this to ctstate

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this needs to be a code change instead? If we are passing through the wrong flag we are always going to get those change 'failures', whereas I think the commands being ran need updated to use the -ctstate flag instead of -state?

Copy link
Member Author

Choose a reason for hiding this comment

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

Have been looking at using an if to swap between the two for sless 11.4 but replacing all mentions of state with ctstate might be good as well. They are simply different packages you can choose between. Ctstate just has more features and complexity.

@david22swan david22swan changed the title (WIP) (MODULES-8648) - Fix for failures on SLES 11 (MODULES-8648) - Fix for failures on SLES 11 Feb 18, 2019
@david22swan
Copy link
Member Author

Adhoc running

Code was removed by mistake during removal of Scientific 5 support
Failures caused by the deprecation of `state` on SLES 11 SP4.
Warning has been placed in readme and test's have been updated to use `ctstate` instead.
@david22swan
Copy link
Member Author

david22swan commented Feb 18, 2019

screen shot 2019-02-18 at 2 40 07 pm

https://jenkins-master-prod-1.delivery.puppetlabs.net/view/modules/view/linux/view/_adhoc/view/firewall/job/forge-module_puppetlabs-firewall_init-manual-parameters_adhoc/43/

@HelenCampbell HelenCampbell merged commit a941aaa into puppetlabs:master Feb 18, 2019
@HelenCampbell
Copy link
Contributor

👍

@david22swan david22swan deleted the MODULES-8648 branch February 18, 2019 16:07
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.

2 participants