-
Notifications
You must be signed in to change notification settings - Fork 277
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
[Meta][Discussion] k-NN lib building process next approaches to continue support AL2 after CentOS7 deprecation #4687
Comments
@peterzhuamazon option 3 is non-starter, as these libs will change for sure. Option 2 sounds good, but would need to verify feasibility for compiling on AL2. I remember issues on arm. |
@peterzhuamazon can you also add another option where we directly move to Almalinux without doing any switch in between to AL2. |
Added now, thanks. |
The JNI bindings don't change often and rebuilding the code every time means that old platforms cannot be supported easily. There's possibly a cleaner option that would move the problem to the k-nn repo and could enable more platforms, including legacy ones.
This is roughly what JNA does for the many cross-platform binaries. |
Instead of committing into the knn repo we should consider uploading the libraries to central maven. Looks to me like maven supports |
I like that even better because it creates more traceability! |
Newer options:
|
We are still trying to push for AL2 compilation fix now. Current goals:
|
Just sync up with @junqiu-lei again, updates:
Thanks. |
Next step:
|
Will use #4737 as the main discussion one. Thanks. |
[Discussion] k-NN lib building process next approaches
Tasks
Background
The k-NN plugin uses a couple of JNI libs that depend on external sources, namely
nmslib
andfaiss
. These libs are written in native code, and they have dependencies on the glibc version of the Linux operating system (OS) where the code is compiled.https://github.com/opensearch-project/k-NN/tree/main/jni/external
Since the first public release of OpenSearch Project, the build team has used CentOS7 as the base OS for both the OpenSearch and Dashboards build image. CentOS7 includes glibc version 2.17, which serves as the baseline version. The JNI libs compiled on CentOS7 can be loaded correctly without crashing when making k-NN specific APIs calls, on any Linux OS with a glibc version >= 2.17, for example, Ubuntu 20.04 (glibc 2.31) and AmazonLinux2 (glibc 2.26).
In 2023, before the OpenSearch 2.10.0 release, the build team began the deprecation of CentOS7 as the OpenSearch build image, which will reach its EOL on 2024/06/30. Another reason being we had started migrating Dashboards from Node.js 14 to 18, which requires glibc version 2.28. After discussions with both the project and k-NN team, we decided to only switch the Dashboards build image from CentOS7 to RockyLinux8 (later AlmaLinux8) while keeping the OpenSearch build image unchanged for the time being.
This decision was made to ensure continued support for a wider range of operating systems running the k-NN plugin without facing compatibility issues. If we had switched from CentOS7 to RockyLinux8 for OpenSearch at that time, the baseline reference glibc version would increased from 2.17 to 2.28, means that any Linux OS with a glibc version < 2.28 (such as AmazonLinux2 with glibc 2.26) would no longer be able to make k-NN API calls and could potentially crash their cluster if such API calls were issued by the user.
Current Situation
A CentOS7 deprecation notice has been sent since 2.12.0: https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.12.0.md#deprecation-notice
As we approach the release of OpenSearch 2.14.0 on 2024/05 and with CentOS7 reaching EOL in just two months, we have revisited discussions with the project and k-NN team regarding the switch from CentOS7 to RockyLinux8 (later AlmaLinux8). The decision remains the same: keep CentOS7 for the 2.14.0 release but to setup a plan to transition from CentOS7 to AmazonLinux2 instead, either fully or partially, for the compilation of k-NN JNI libs. This decision is based on the fact that AmazonLinux2 has a lower version of glibc compared to RockyLinux8/AlmaLinux8, and AmazonLinux2 still has another year of support until 2025/06/30.
Approaches
Option 1️⃣: Fully switch from CentOS7 to AmazonLinux2 in 2.15.0, before switching to AlmaLinux8 on 2025/06/30.
Option 2️⃣ (Recommended): Switch from CentOS7 to AlmaLinux8 in 2.15.0 on distribution build pipeline, but separate the k-NN JNI libs compilation into its own stage/pipeline and use AmazonLinux2 to compile for a year.
Option 3️⃣: Copy compiled JNI lib files from the 2.14.0 release into an archive and store it on S3. Disable the compilation process and replace it with downloading the archive for future releases for a year, until Amazon Linux 2 deprecates.
Option 4️⃣: Stick to Almalinux8 without switching back to CentOS7 in 2.15.0.
Please let us know your thoughts on this. As well as vote for the approaches you are agreeing on.
Thanks,
Peter
The text was updated successfully, but these errors were encountered: