-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix dav_svn for Debian 10 #2135
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
Conversation
apache::mod::dav_svn is a classthat may have no external impact to Forge modules. This module is declared in 175 of 576 indexed public
|
manifests/mod/dav_svn.pp
Outdated
| ::apache::mod { 'dav_svn': } | ||
|
|
||
| if $::osfamily == 'Debian' and ! ($::operatingsystemmajrelease in ['6', '9', '16.04', '18.04']) { | ||
| if $::osfamily == 'Debian' and ! ($::operatingsystemmajrelease in ['6', '9', '10', '16.04', '18.04']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a workaround on some older Debian versions while the newer ones behave as you would expect. Perhaps it should be checked which versions need this. I'd expect Ubuntu 20.04 behaves the same as Debian 10.
Then you would get to something like:
| if $::osfamily == 'Debian' and ! ($::operatingsystemmajrelease in ['6', '9', '10', '16.04', '18.04']) { | |
| if $::osfamily == 'Debian' and $::operatingsystemmajrelease in ['7', '8', '14.04'] { |
Untested, but I think you get the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I got it. I also did found some patches from Debian for the dav_svn module which should fix this in the package itself, but the issue still reproduces on my Debian 10 testing machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked. The Debian 10 package has pretty similar word-around in mods-available/dav_svn.load, but that file is overwritten by this puppet module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit I haven't looked at the dav_svn module for ages. Perhaps you can write an acceptance test for the module so we know it really works rather than guessing? That also gives the best chance against regressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give a shot, It's not hard to reproduce since apache2 simply won't start when including apache::mod::dav_svn :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, those are the things that are fairly easy to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the result of the acceptance test and looking at how Debian implemented their work-around it's safe to say that the whole version checking part of that if statement can be removed. Agreed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense but it's probably good to check with the actual maintainers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix @martijndegouw and the assistance during the PR @ekohl . The test is great - allows us to check we haven't inadvertently stomp over some logic put in there for the older versions, as you said @ekohl .
Codecov Report
@@ Coverage Diff @@
## main #2135 +/- ##
=======================================
Coverage 56.36% 56.36%
=======================================
Files 12 12
Lines 220 220
=======================================
Hits 124 124
Misses 96 96 Continue to review full report at Codecov.
|
spec/acceptance/mod_dav_svn_spec.rb
Outdated
| it 'succeeds in installing the dav_svn module' do | ||
| apply_manifest(pp, catch_failures: true) | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an idempotency check to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure what you mean by this. Do you want to run the apply_manifest twice? To check if it fails/passes 2 times in a row?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from another module:
it 'applies with no errors' do
apply_manifest(pp, catch_failures: true)
end
it 'applies a second time without changes' do
apply_manifest(pp, catch_changes: true)
end|
Great, SLES 15 test is failing, on the exact same issue I have on my SLES server with the puppetlabs repo :/. Warning: This file was modified after it has been signed. This may have been a malicious change, so it might not be trustworthy anymore! You should not continue unless you know it's safe. Signature verification failed for file 'repomd.xml' from repository 'Puppet 6 Nightly Repository sles 15 - x86_64' |
😞 Would this be a consistently reproducible error? Re-running seems to have gotten me past that issue now, but, if you're experiencing that pretty consistently, I'd like to get the issue raised with our Agent team to look in to. |
|
PR looks good, but there seems to be a unit test failure. I can't see why we wouldn't still generate a catalog with this File resource when your change is applied. Will have another look at it but just highlighting it here in case yourself or @ekohl figure it out before me. |
The work-around that distros apply for dav_svn/authz_svn module loading issue is overwritten by this module. Always apply the work-around.
Sorry, I misted that one. I've updated the unit test as well. |
|
@martijndegouw This PR looks good to me, thanks for putting in the work. |
As far as I can tell Debian 10 still needs this work-around.