Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

236
Vistas
Disable MongoDB restart on upgrade (RPM package)

MongoDB RPM packages (provided by official repo.mongodb.org repository, as of version 3.4.1) automatically and unconditionally restart server on package upgrade. This behaviour is hardcoded into postun handler:

if test $1 -ge 1                                                                                                                                                                                                    
then                                                                                                                                                                                                                
  /usr/bin/systemctl restart mongod >/dev/null 2>&1 || :                                                                                                                                                            
fi

This is an inconvenient and dangerous behaviour, especially when you use configuration management tools to set up your servers. For example, I'd like to run a full Ansible playbook to set up my servers first, and then restart MongoDB manually one by one to have full control of the situation.

Is there any way to alter or disable this? Alternative MongoDB packages, maybe? Or some obscure yum/rpm command option to disable scriptlets?

I'm aware that I can switch to simple .tar.gz installation, but this is the last resort.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

If you first download the rpm and install it manually using rpm; you can use the --nopostun option:

rpm -Uvh mongodb***rpm --nopostun

from the rpm man page:

  --noscripts
  --nopre
  --nopost
  --nopreun
  --nopostun
  --nopretrans
  --noposttrans
         Don't execute the scriptlet of the same name.  The --noscripts option is equivalent to
         --nopre --nopost --nopreun --nopostun --nopretrans --oposttrans
         and turns off the execution of the corresponding %pre, %post, %preun, %postun %pretrans, and %posttrans scriptlet(s).

afaik yumcannot handle the --nopostun and other flags.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda