[SERVER-80645] Amazon 2023 community packages fail to install Created: 31/Aug/23  Updated: 02/Feb/24  Resolved: 18/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 8.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Dylan Richardson Assignee: Zack Winter
Resolution: Fixed Votes: 0
Labels: FY25Q1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-10-05-17-19-15-352.png    
Issue Links:
Backports
Depends
depends on COMPASS-7203 RPM distribution is missing required ... Closed
Problem/Incident
Related
related to SERVER-86106 shadow-utils is not on suse Closed
is related to SERVER-82151 Investigate whether packaging adequat... Backlog
Assigned Teams:
Build
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Participants:
Linked BF Score: 151

 Description   

With the following Dockerfile:

FROM amazonlinux:2023
RUN echo $'\n\
[mongodb]\n\
name=MongoDB Repository\n\
baseurl=https://repo.mongodb.org/yum/amazon/2023/mongodb-org/7.0/x86_64/\n\
gpgcheck=1\n\
enabled=1\n\
gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc' > /etc/yum.repos.d/mongodb.repo
RUN yum install -y mongodb-org

I get installation errors because groupadd appears to be missing, but is depended upon by our preinstall script.

Running transaction
  Preparing        :                                                        1/1
  Installing       : systemd-libs-252.4-1161.amzn2023.0.4.x86_64           1/44
  Installing       : cyrus-sasl-lib-2.1.27-18.amzn2023.0.3.x86_64          2/44
  Installing       : openssl-1:3.0.8-1.amzn2023.0.3.x86_64                 3/44
  Installing       : mongodb-org-database-tools-extra-7.0.0-1.amzn2023.    4/44
  Installing       : util-linux-core-2.37.4-1.amzn2023.0.3.x86_64          5/44
  Running scriptlet: util-linux-core-2.37.4-1.amzn2023.0.3.x86_64          5/44
  Installing       : libfdisk-2.37.4-1.amzn2023.0.3.x86_64                 6/44
  Running scriptlet: mongodb-org-server-7.0.0-1.amzn2023.x86_64            7/44
/var/tmp/rpm-tmp.JeCViQ: line 2: /usr/sbin/groupadd: No such file or directory
error: %prein(mongodb-org-server-7.0.0-1.amzn2023.x86_64) scriptlet failed, exit status 127
 
Error in PREIN scriptlet in rpm package mongodb-org-server
  Installing       : cyrus-sasl-plain-2.1.27-18.amzn2023.0.3.x86_64        8/44
error: mongodb-org-server-7.0.0-1.amzn2023.x86_64: install failed

I think we may need to declare a new dependency just for amazon 2023 packages to ensure this binary is available. I am also curious about environment differences between our setup and the packaging tests that could cause this error.



 Comments   
Comment by Githook User [ 22/Jan/24 ]

Author:

{'name': 'Zack Winter', 'email': '3457246+zackwintermdb@users.noreply.github.com', 'username': 'zackwintermdb'}

Message: SERVER-80645 Amend test logic to properly understand Amazon 2023 (#18127) (#18241)

GitOrigin-RevId: 35c526578142b7bb26f43664d6ef3737db741616
Branch: v7.0
https://github.com/mongodb/mongo/commit/b8037b434bf43947c7e27205ebc37f02774f9289

Comment by Githook User [ 18/Jan/24 ]

Author:

{'name': 'Zack Winter', 'email': '3457246+zackwintermdb@users.noreply.github.com', 'username': 'zackwintermdb'}

Message: SERVER-80645 Amend test logic to properly understand Amazon 2023 (#18127)

GitOrigin-RevId: 291d68e86b37ae42d5b5ff1d78a6e0da7e7f0f55
Branch: master
https://github.com/mongodb/mongo/commit/1de01927cf032520fa1b725ceca620d12c229be5

Comment by Alex Neben [ 06/Nov/23 ]

What is the test that caused the revert? Was it the OIDC test? To me it doesn't make sense that OIDC started failing because of this change. I'm reading through this thread and I am sort of unsure what has been tried and the current status of this.

I think it is a non starter to not have packages for amazon linux.

Comment by Githook User [ 18/Oct/23 ]

Author:

{'name': 'Liubov Molchanova', 'email': 'liubov.molchanova@mongodb.com', 'username': 'liubov-molchanova'}

Message: Revert "SERVER-80645 Amend test logic to properly understand Amazon 2023"

This reverts commit ba64df3eda622ebb553d1049633fdcdc6533968e.
Branch: v7.0
https://github.com/mongodb/mongo/commit/b961e671b9846bef13f1cae5e75817608e8a6b19

Comment by Githook User [ 14/Oct/23 ]

Author:

{'name': 'Zituo Jin', 'email': 'zituo.jin@mongodb.com', 'username': 'zituo-jin'}

Message: Revert "SERVER-80645 Amend test logic to properly understand Amazon 2023"

This reverts commit b49f0e36f08a443041463d4407f0e93cc283cbd9.
Branch: master
https://github.com/mongodb/mongo/commit/9a0224a9d896428d55de3869ff98b94fb0ec21bd

Comment by Githook User [ 12/Oct/23 ]

Author:

{'name': 'Steve Gross', 'email': 'steve.gross@mongodb.com', 'username': 'stevegrossmongodb'}

Message: SERVER-80645 Amend test logic to properly understand Amazon 2023
Branch: v7.0
https://github.com/mongodb/mongo/commit/ba64df3eda622ebb553d1049633fdcdc6533968e

Comment by Githook User [ 12/Oct/23 ]

Author:

{'name': 'Steve Gross', 'email': 'steve.gross@mongodb.com', 'username': 'stevegrossmongodb'}

Message: SERVER-80645 Amend test logic to properly understand Amazon 2023
Branch: master
https://github.com/mongodb/mongo/commit/b49f0e36f08a443041463d4407f0e93cc283cbd9

Comment by Le Roux Bodenstein [ 04/Oct/23 ]

What do you want to change the line to? If you're willing, can you send out the PR you have in mind?

change these:

if os_id == "amzn":
if version_id.startswith("2018") or version_id.startswith("2016"):
return False

to:

if os_id == "amzn":
if version_id.startswith("2018") or version_id.startswith("2016") or version_id.startswith("2023"):
return False

ie. it was already disabled on 2016 and 2018, just also disable it on 2023. I have no idea why that code is so specific. It can just skip on any version of amazon linux. No need to also check the version_id.

Comment by Le Roux Bodenstein [ 02/Oct/23 ]

Yup here's a link to their github that implies that it has been removed https://github.com/amazonlinux/amazon-linux-2023/issues/450

Is amazon linux 2023 still intended to be used as a GUI distro?

Comment by Sergey Petushkov [ 02/Oct/23 ]

Hey y'all! We resolved COMPASS-7023, so Compass doesn't list dependencies that are not required anymore, one important caveat here though is that we do have a legit dependency on gnome-keyring and libsecret that might not be provided on amazon linux 2023

leroux.bodenstein@mongodb.com pinging you just in case I'm summarizing your findings wrong here

Comment by Sergey Petushkov [ 11/Sep/23 ]

Hmmm, we seem to list at least some of those packages you mentioned... I'll open a ticket for our team to investigate, thanks for bringing this to our attention!

Comment by Sergey Petushkov [ 08/Sep/23 ]

Hey everybody, Compass team was made aware of this issue by steve.gross@mongodb.com. dylan.richardson@mongodb.com we don't have deep expertise for rpm packaging, but as far as I can see those are dependencies for Compass app that we explicitly specify because they are required by Electron, a runtime Compass is built on. Can you clarify what you mean by sorting out our dependencies? Do you mean they should somehow be auto-installed / auto-packaged with the application and we are not packaging them?

EDIT: Sorry, Steve, posted without updating the page and didn't notice that you already passed down my message from Slack, thanks!

Comment by Dylan Richardson [ 01/Sep/23 ]

Hey Steve – I started to run a test but noticed (1) the patch build was for RHEL 8, not amazon 2023, and (2) it was enterprise, which already had a transitive dependency that pulled in groupadd so it wasn't impacted by this. Could you run an Amazon 2023 build and link it here?

Comment by Dylan Richardson [ 01/Sep/23 ]

The public platform support matrix is here: https://www.mongodb.com/docs/manual/administration/production-notes/#platform-support-matrix

It's SDP's call to make, but I think I recall there were reasons to not depend on systemd specifically in the past – probably some customers who don't use systemd as their init system and reuse our packages on e.g. devuan? I also think it was causing problems when used in a container where systemd was explicitly not wanted.

Comment by Zack Winter [ 31/Aug/23 ]

alex.neben@mongodb.com is this the same issue as SERVER-68470 where we're not installing systemd?

 

It looks like it's getting installed here https://github.com/10gen/mongo/blob/master/rpm/mongodb-org.spec#L104 but I'm not familiar enough with our rpm setup to figure out if this is the spec that's getting used.

Generated at Thu Feb 08 06:44:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.