Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid bolting on libssl1.1, now that MongoDB can use libssl3 (at long last!) [e.g. on Ubuntu 22.04+ & Debian 12] #3469

Merged
merged 4 commits into from
Jan 20, 2023

Conversation

holta
Copy link
Member

@holta holta commented Jan 20, 2023

Tested successfully (using Sugarizer) on Ubuntu 22.04 and the latest daily build of Debian 12, in each case on x86_64 VM's.

Not every distro / hardware combination under the sun can be tested realistically, but more to follow.

Building on:

@holta holta added this to the 8.1 milestone Jan 20, 2023
@holta
Copy link
Member Author

holta commented Jan 20, 2023

In-line comments clarified, explaining that there might not be much hope for MongoDB on 64-bit OS's on Raspberry Pi for now. Certainly for the mainline Raspberry Pi OS, or so it would appear.

Whereas those who really want Ubuntu on Raspberry Pi hardware (a small minority) might possibly have options, along the lines of: https://www.mongodb.com/developer/products/mongodb/mongodb-on-raspberry-pi/

In any case, these questions are outside the scope of this PR, and will be addressed in another PR if that proves absolutely necessary.

@holta
Copy link
Member Author

holta commented Jan 20, 2023

Good enough for now:

  • This PR begins to restore MongoDB simplicity, by removing 7 stanzas arranging apt sources, that were necessary over many recent months, when MongoDB required retrofitting libssl1.1
  • This should also bring about better security e.g. for those unhappy about retrofitting libssl1.1 in general (alongside the more modern libssl3 included with 2022/2023+ OS's like Ubuntu 22.04+ and Debian 12).

@holta holta changed the title Avoid bolting on libssl1.1, now that MongoDB can use libssl3 (at long last!) Avoid bolting on libssl1.1, now that MongoDB can use libssl3 (at long last!) [e.g. on Ubuntu 22.04+ & Debian 12] Jan 20, 2023
@holta
Copy link
Member Author

holta commented Jan 20, 2023

This PR also tested successfully on Debian 11 on x86_64 (VM), using Sugarizer as usual.

Finally if Sugarizer proves important on other platform(s), these can be investigated in the months to come.

@holta
Copy link
Member Author

holta commented Jan 20, 2023

there might not be much hope for MongoDB on 64-bit OS's on Raspberry Pi for now

CLARIF / REMINDER: A pre-compiled version of MongoDB 5.0.5 is currently layered on top (from https://andyfelong.com/downloads/raspbian_mongodb_5.0.5.gz) if a 64-bit OS on Raspberry Pi hardware is detected. After locking apt's packages (apt-mark hold mongodb-org mongodb-org-server). This IIAB logic might be refined in 2023 &/or 2024 as necessary, perhaps after Andy Felong refines his instructions at https://andyfelong.com/2021/08/mongodb-4-4-under-raspberry-pi-os-64-bit-raspbian64/ which inspired the following:

# 2022-06-07 #3236 MongoDB 5.0.9 "Illegal instruction" on RPi 4...
# https://www.mongodb.com/community/forums/t/core-dump-on-mongodb-5-0-on-rpi-4/115291/14
# ...as ARM v8-A < ARM v8.2-A ...also reveals:
#
# (1) For Intel x86_64, MongoDB 5.x requires Sandy Bridge or later.
# For AMD x86_64, MongoDB 5.x requires Bulldozer or later.
# Roughly speaking, this means post-2011 CPUs with AVX instructions:
# https://github.com/docker-library/mongo/issues/485#issuecomment-891991814
# (2) dbPath needed fixing in /etc/mongod.conf (~16 lines above) from
# /var/lib/mongodb to /library/dbdata/mongodb
# (3) mongod.lock is effectively NO LONGER A LOCK FILE -- but rather a PID
# file (it may be zero bytes, but never goes away) as confirmed with
# MongoDB 4.4.14 on RPi 4 and 5.0.9 Ubuntu 22.04 on x86_64. And now
# 'mongod --repair --dbpath /library/dbdata/mongodb/' IGNORES mongod.lock
# (4) mongodb.service needed a more graceful way to shut down than
# 'killall mongod' (MongoDB 5+ shuts down w/ 15sec quiesce period).
# (5) MongoDB 6.0 is likely imminent; meantime a 2022-01-12 option (~12
# lines below) is MongoDB 5.0.5 compiled for 64-bit RPi 4 and RPi 400:
# https://andyfelong.com/downloads/raspbian_mongodb_5.0.5.gz
# https://andyfelong.com/2021/08/mongodb-4-4-under-raspberry-pi-os-64-bit-raspbian64/
- name: If hardware is Raspberry Pi and mongodb_64bit_version >= 5.0, run 'apt-mark hold mongodb-org mongodb-org-server' -- so MongoDB 5.0.5 binaries {mongo, mongod, mongos} can be installed without apt interfering in future
command: apt-mark hold mongodb-org mongodb-org-server
when: rpi_model != "none" and mongodb_64bit_version is version('5.0', '>=')
- name: If hardware is Raspberry Pi and mongodb_64bit_version >= 5.0, unarchive 76MB {{ iiab_download_url }}//packages/raspbian_mongodb_5.0.5.gz OVERWRITING 5.0.9+ {mongo, mongod, mongos} in /usr/bin
unarchive:
remote_src: yes
src: "{{ iiab_download_url }}/raspbian_mongodb_5.0.5.gz"
dest: /usr/bin
when: rpi_model != "none" and mongodb_64bit_version is version('5.0', '>=')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant