[SERVER-70121] Ubuntu 18 packaging tests shows error with systemctl Created: 29/Sep/22  Updated: 29/Oct/23  Resolved: 15/Oct/22

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

Type: Bug Priority: Major - P3
Reporter: Alex Neben Assignee: Ryan Egesdahl (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-15869 [SERVER] Error with systemctl Closed
Duplicate
is duplicated by SERVER-73192 RHEL packaging should use /run, not /... Closed
Problem/Incident
causes SERVER-74506 Revert backwards-incompatible systemd... Closed
causes SERVER-74845 Create mechanism to ignore ignore for... Closed
Related
related to MONGOSH-1308 Shell packaged as arm64 on aarch64 pl... Closed
related to SERVER-70425 Packaging uses old distro files Closed
related to SERVER-70480 Apparent rate-limiting on building pa... Closed
related to SERVER-70512 Resolve packaging issues on arm64/aar... Closed
related to SERVER-71250 Nightly package tests fail due to mis... Closed
related to TOOLS-3204 Tools should not be packaged as arm64... Closed
related to SERVER-69870 Test package installs on all supporte... Closed
related to SERVER-70426 Mock systemd package for Docker packa... Closed
related to SERVER-70427 Remove chef+kitchen package test infr... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0, v4.4
Participants:
Case:
Linked BF Score: 70

 Description   

https://github.com/10gen/mongo/pull/7730#discussion_r984027371

[2022/09/29 19:51:53.645] /var/lib/dpkg/info/mongodb-enterprise-unstable-server.postinst: 44: /var/lib/dpkg/info/mongodb-enterprise-unstable-server.postinst: systemctl: not found

 

Probs just needs the systemd dependency

This is probably happening for more than just this test and we should make sure it is fixed everywhere



 Comments   
Comment by Githook User [ 15/Oct/22 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-70121 SERVER-70083 Fix basic package tests
Branch: master
https://github.com/mongodb/mongo/commit/8d463a6789d68e2fc39b93346152e1b4a626e14a

Comment by Ryan Egesdahl (Inactive) [ 04/Oct/22 ]

alexander.neben@mongodb.com I mean that it would fix the error message but it would end up not working later on when we try starting the service like a normal user would. All base distributions imply a systemd dependency now, and it's only not present in Docker images specifically for the reason I outlined. If the goal is to simply prevent an error message, we could just create a symlink to /bin/true, but that's going to mean we don't get any test coverage over the init scripts like we did with the chef+kitchen tests.

The project I am referring to is a literal drop-in replacement for systemd. You download the script into the right place, make it executable, and set it as the CMD inside the container. If that doesn't work, it would be easier to just create the symlink and accept that the init scripts are going to be a blind spot until we find another way.

Comment by Alex Neben [ 04/Oct/22 ]

I am confused why adding systemd as a dependency would not fix the problem? It seems to work with the other containers.

Comment by Ryan Egesdahl (Inactive) [ 04/Oct/22 ]

Docker does not come with systemd, partly because running it inside the container would require --privileged access to the host system - which is obviously not ideal. I don't think simply adding it as a dependency is going to fix the problem, and we won't get any testing of our init scripts if we simply ignore it. However, there is a project available to "replace" systemd with a Python script that emulates its behavior. For how simple our init scripts are, I think it's worth a try so we get the most realistic test we possibly can.

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