Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

244
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda