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

Add Debian 10 support #619

Merged
merged 1 commit into from
Sep 3, 2021
Merged

Conversation

root-expert
Copy link
Member

@root-expert root-expert commented Aug 20, 2021

Pull Request (PR) description

Debian 10 doesn't provide mongodb packages, so we need to set manage_package_repo to true by default and install latest version supported by the module (4.4.8)

This Pull Request (PR) fixes the following issues

@root-expert root-expert added the enhancement New feature or request label Aug 20, 2021
@root-expert root-expert force-pushed the new-debian-ver branch 5 times, most recently from 1a8d6b4 to b6f9f1f Compare August 21, 2021 18:00
@root-expert root-expert changed the title Add Debian 10/11 support Add Debian 10 support Aug 21, 2021
@root-expert root-expert force-pushed the new-debian-ver branch 2 times, most recently from 7214862 to 55812dc Compare August 21, 2021 18:50
Signed-off-by: Christos Papageorgiou <christos.papageorgioy@gmail.com>
Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

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

I am not a user of MongoDB so might be off, but defaulting to different sources depending just on the OS version does not feel good to me.

What do you think if we adjust this PR so that:

  • it always default to install the OS vendored package by default (and fail if such package does not exist);
  • the test suite checks that the catalog does not compile with the default settings (to have a clue if for some reason a package is made available in the future. That should never happen with Debian but the code might be copied for other OS);
  • the test suite checks that with explicit values for mange_repo / version the thing works as expected (by reusing example groups?).

Comment on lines +19 to +26
$version = fact('os.distro.codename') ? { # Debian 10 doesn't provide mongodb 3.6.
'buster' => '4.4.8',
default => undef
},
$manage_package_repo = fact('os.distro.codename') ? { # Debian 10 doesn't provide mongodb packages. So manage it!
'buster' => true,
default => undef
},
Copy link
Member

Choose a reason for hiding this comment

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

That mean that the same configuration on some nodes install the version packaged for the system by the OS vendor, and on other brings in a custom repository and version not supported by the OS vendor.

I would be more confident if we required the end user to set manage_package_repo and version explicitly and defaulting to what the OS recommend.

Copy link
Member Author

Choose a reason for hiding this comment

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

My only concern is that for some OSes the module will work out of the box and for Debian 10/11 you'll need mongodb::globals class as well

Copy link
Member

Choose a reason for hiding this comment

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

But since Debian does not support MongoDB out of the box, that seems fair. Maybe I am the only one worried by this :-) Let's wait for other reviewers opinion about this.

Copy link
Member

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

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

looks good to me! are you interested in adding debian 11 in another PR?

@root-expert
Copy link
Member Author

looks good to me! are you interested in adding debian 11 in another PR?

Νο Debian 11 packages from mongo as far as I saw :(

@bastelfreak bastelfreak merged commit 1d7caf4 into voxpupuli:master Sep 3, 2021
@linuxmail
Copy link

Hello,

I have also a question: I assumed, that - if I set mongodb::globals::manage_package: false to false, no package is managed, but it tries to install in Debian 4.4.8 because of 'buster' => '4.4.8', .. What .. If I just want to manage config etc. pp. and service .. but don't touch the packages itself ?

cu denny

@root-expert
Copy link
Member Author

Hello,

I have also a question: I assumed, that - if I set mongodb::globals::manage_package: false to false, no package is managed, but it tries to install in Debian 4.4.8 because of 'buster' => '4.4.8', .. What .. If I just want to manage config etc. pp. and service .. but don't touch the packages itself ?

cu denny

Hello @linuxmail!

if you want to achieve that, I assume you have to set mongodb::globals::manage_package_repo to either false or undef along with mongodb::globals::manage_package: false.

Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants