Skip to content

Add Debian 10 support#619

Merged
bastelfreak merged 1 commit intovoxpupuli:masterfrom
root-expert:new-debian-ver
Sep 3, 2021
Merged

Add Debian 10 support#619
bastelfreak merged 1 commit intovoxpupuli:masterfrom
root-expert:new-debian-ver

Conversation

@root-expert
Copy link
Copy Markdown
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
Copy Markdown
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 thread manifests/globals.pp
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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