[SERVER-68470] Amazon Linux 4.2/4.4 RPMs fail to install due to missing shadow-utils Created: 01/Aug/22  Updated: 02/Feb/24  Resolved: 12/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.4.15, 4.2.21
Fix Version/s: 4.4.18, 4.2.24

Type: Bug Priority: Major - P3
Reporter: Dylan Richardson Assignee: Alex Neben
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-69982 packaging broken (missing systemd) fo... Closed
is related to SERVER-70181 Ubuntu and Debian package tests faili... Closed
is related to SERVER-69870 Test package installs on all supporte... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Participants:
Linked BF Score: 30

 Description   

I am testing installing our server RPM in clean Amazon Linux 1 and 2 distros and ran into an issue:

/var/tmp/rpm-tmp.VPEB9d: line 2: /usr/sbin/groupadd: No such file or directory
error: %pre(mongodb-org-server-4.4.15-1.amzn2.x86_64) scriptlet failed, exit status 127
  Installing : qrencode-libs-3.4.1-3.amzn2.0.2.x86_64                    
error: mongodb-org-server-4.4.15-1.amzn2.x86_64: install failed

You can reproduce by trying to build this image with an OCI builder of your choice. It seems like shadow-utils is not detected as a dependency correctly? I found this ticket from ages ago which should have fixed this, but perhaps there’s something funny going on in Amazon Linux 2 and Amazon Linux 1? Note: This only impacts 4.2 and 4.4 for Amazon Linux 2 and 4.2 for Amazon Linux 1; 5.0+ seems OK.



 Comments   
Comment by Alex Neben [ 12/Oct/22 ]

FYI I don't think amazon linux 1 will ever work due to this issue
SERVER-69982

CC alex.ettouati@mongodb.com - Can we drop support from amazon linux 1 since it has never worked and will not work without a serious change to systemd. 

CC ryan.egesdahl@mongodb.com 

For amazon2 we have made some fixes, I need to double check if they are published but SERVER-70083 is tracking those provlems.

Comment by Tural Farhadov [ 12/Oct/22 ]

Thanks for fixing those.
I was able to test and verify those fixes.

However, there are some that are still failing. I am adding the container images below to reproduce those failures.

amazon-1-community-4.2-x86 

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

 

amazon-2-community-4.2-x86

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

amazon-2-community-4.4-x86

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

It would be nice if you could advise if those are valid failures/or should be ignored.

Comment by Githook User [ 29/Sep/22 ]

Author:

{'name': 'Alexander Neben', 'email': 'alexander.neben@mongodb.com', 'username': 'IamXander'}

Message: SERVER-68470 Added systemd requirement to old mongo versions
Branch: v4.4
https://github.com/mongodb/mongo/commit/8413a69fb27cb021577b2203354e0c249ee76a03

Comment by Githook User [ 26/Sep/22 ]

Author:

{'name': 'Alexander Neben', 'email': 'alexander.neben@mongodb.com', 'username': 'IamXander'}

Message: SERVER-68470 Added systemd requirement to old mongo versions v4.2
Branch: v4.2
https://github.com/mongodb/mongo/commit/7032bedddde584ee7931875a79db7bc9262c26d5

Comment by Alex Neben [ 23/Sep/22 ]

There are two bugs.
On amazon2 it looks like we are not installing systemd
Systemd does not exist on amazon1 so we need to install shadow utils as you suggested

Comment by Alex Neben [ 23/Sep/22 ]

I was able to repo this and created a test to catch this in the future, investigating a fix

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