[SERVER-55460] Fix RPM packaging and testing for SLES 12 Created: 23/Mar/21  Updated: 29/Oct/23  Resolved: 05/Apr/21

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: None
Fix Version/s: 4.0.25, 4.2.15, 4.4.7, 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Brian McCarthy 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
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2, v4.0
Sprint: Dev Platform 2021-04-05, Dev Platform 2021-04-19
Participants:
Linked BF Score: 56

 Description   

Changes to SLES 12 (and apparently SLES 15) have moved some important files around and have broken our efforts to make relocatable RPMs. Specifically, the ${_sharedstatedir RPM macro appears to be defined incorrectly on the platforms, and the systemd unit files have been moved to /usr/lib/systemd for some reason. These problems were breaking both the RPM installation and the package tests.

Additionally, the install_compass script now checks the distro it's running on and reports and error if it's not compatible. Before that change, we simply checked on SLES that the error code from attempting to run the script was non-zero - and it was, since we were not even installing the tool. The tests now verify the presence of the message, so we need to install the tools-extra package during package testing from now on.



 Comments   
Comment by Githook User [ 07/Jul/21 ]

Author:

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

Message: SERVER-58313 Fix package testing for SLES 12 on v4.2 and v4.0

SERVER-55460 attempted to fix SLES 12 package testing, but it continued
to fail on v4.2 and v4.0. We thought it was due to a recent SLES 12
package testing image change, but that wasn't actually the case. It was
actually because the `-tools-extra` package doesn't exist in those
version, and we should have been testing the `-tools` package instead.
This commit fixes the previous backport so the correct package is
tested.

(cherry picked from commit 9719315b5a0eb5a954bc3b68e0ea7cad65b63ee2)
Branch: v4.0
https://github.com/mongodb/mongo/commit/12797e8c4aa195727d853f8518fd155e76d1ff6e

Comment by Githook User [ 07/Jul/21 ]

Author:

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

Message: SERVER-58313 Fix package testing for SLES 12 on v4.2 and v4.0

SERVER-55460 attempted to fix SLES 12 package testing, but it continued
to fail on v4.2 and v4.0. We thought it was due to a recent SLES 12
package testing image change, but that wasn't actually the case. It was
actually because the `-tools-extra` package doesn't exist in those
version, and we should have been testing the `-tools` package instead.
This commit fixes the previous backport so the correct package is
tested.
Branch: v4.2
https://github.com/mongodb/mongo/commit/9719315b5a0eb5a954bc3b68e0ea7cad65b63ee2

Comment by Githook User [ 10/May/21 ]

Author:

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

Message: SERVER-55460 Fix RPM packaging and package testing for SLES 12

Some versions of SLES apparently don't define the _sharedstatedir RPM
macro properly, leaving it at the old-time UNIX /usr/com default. This
was causing the server to fail to start on such platforms because the
expected data directory at /var/lib/mongodb was missing. The macro is
now statically defined on SLES to /var like it should be on any modern
Linux distribution.

Also fixed were paths to systemd unit files in package testing and the
fact that we weren't installing the tools-extra package, which we should
be doing if only to verify that the script indeed continues to fail
expectedly on the platform.

(cherry picked from commit 649dc04027667b30155be39be39a880cb0b8743a)
(cherry picked from commit 31a75fa034ab929b5c0ef834fde92c845041b036)
(cherry picked from commit d9378a53b590fe3de9d458efd8787830e93c744b)
Branch: v4.0
https://github.com/mongodb/mongo/commit/a64c231c2a34e763361a4ed91b62ff88acd4fd8c

Comment by Githook User [ 10/May/21 ]

Author:

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

Message: SERVER-55460 Fix RPM packaging and package testing for SLES 12

Some versions of SLES apparently don't define the _sharedstatedir RPM
macro properly, leaving it at the old-time UNIX /usr/com default. This
was causing the server to fail to start on such platforms because the
expected data directory at /var/lib/mongodb was missing. The macro is
now statically defined on SLES to /var like it should be on any modern
Linux distribution.

Also fixed were paths to systemd unit files in package testing and the
fact that we weren't installing the tools-extra package, which we should
be doing if only to verify that the script indeed continues to fail
expectedly on the platform.

(cherry picked from commit 649dc04027667b30155be39be39a880cb0b8743a)
(cherry picked from commit 31a75fa034ab929b5c0ef834fde92c845041b036)
Branch: v4.2
https://github.com/mongodb/mongo/commit/d9378a53b590fe3de9d458efd8787830e93c744b

Comment by Githook User [ 10/May/21 ]

Author:

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

Message: SERVER-55460 Fix RPM packaging and package testing for SLES 12

Some versions of SLES apparently don't define the _sharedstatedir RPM
macro properly, leaving it at the old-time UNIX /usr/com default. This
was causing the server to fail to start on such platforms because the
expected data directory at /var/lib/mongodb was missing. The macro is
now statically defined on SLES to /var like it should be on any modern
Linux distribution.

Also fixed were paths to systemd unit files in package testing and the
fact that we weren't installing the tools-extra package, which we should
be doing if only to verify that the script indeed continues to fail
expectedly on the platform.

(cherry picked from commit 649dc04027667b30155be39be39a880cb0b8743a)
Branch: v4.4
https://github.com/mongodb/mongo/commit/31a75fa034ab929b5c0ef834fde92c845041b036

Comment by Githook User [ 05/Apr/21 ]

Author:

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

Message: SERVER-55460 Fix RPM packaging and package testing for SLES 12

Some versions of SLES apparently don't define the _sharedstatedir RPM
macro properly, leaving it at the old-time UNIX /usr/com default. This
was causing the server to fail to start on such platforms because the
expected data directory at /var/lib/mongodb was missing. The macro is
now statically defined on SLES to /var like it should be on any modern
Linux distribution.

Also fixed were paths to systemd unit files in package testing and the
fact that we weren't installing the tools-extra package, which we should
be doing if only to verify that the script indeed continues to fail
expectedly on the platform.
Branch: master
https://github.com/mongodb/mongo/commit/649dc04027667b30155be39be39a880cb0b8743a

Generated at Thu Feb 08 05:36:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.