azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
2.97k stars 105 forks source link

MongoDB issue with AVX flag #173

Closed sethleedy closed 5 months ago

sethleedy commented 5 months ago

What happened?

Mongo refuses to start due to hardware not having AVX flag on the CPU.

This includes the Cosmos installed DB.

What should have happened?

Mongo should be able to run without the AVX cpu flag. But since version 5, it refuses.

How to reproduce the bug?

I setup my install on a Virtual Machine and transferred the image to a hardware bare metal install. MongoDB versions 5+, from the official source, have a CPU requirement of AVX. Which worked ok on the virtual machine, but not on my aged hardware after transfer.

Relevant log output

$ docker container ls
305264c3d123   mongo:latest                              "docker-entrypoint.s…"   2 weeks ago    Restarting (132) 37 seconds ago                                                                      cosmos-mongo-3Ra

$ docker container logs 305264c3d123
WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

Other details

So, I am not sure where to go from here. There are images built that have the AVX flag requirement removed, such as: https://github.com/alanedwardes/mongodb-without-avx But i am not sure how to make Cosmos-Server use it instead. Is it just a matter of making a container of the same name and using the existing data?

Can we choose a different image source on reinstallation?

System details

$ lscpu Model name: Intel(R) Xeon(R) CPU X3450

As of 2 weeks ago, Cosmos-Server version: azukaar/cosmos-server:latest

azukaar commented 5 months ago

if you run Cosmos' installer on the new server it will install 4 instead of 5 that does not require AVX