fix: nginx falhando no firstboot (corrida cert/key com 15regen-sslcert)#11
Merged
Conversation
O nginx pode subir enquanto o hook comum 15regen-sslcert regenera o par cert/chave e ler um par inconsistente (SSL key values mismatch); como o hook só reinicia serviços ativos, o nginx ficava failed até intervenção manual. Duas camadas: drop-in com Restart=on-failure (auto-recupera sozinho ~10s após a regeneração) e restart incondicional do nginx no fim do inithook do opencloud.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #5
Encontrado no primeiro boot real da ISO em VM (live mode):
nginx.servicefailed comSSL_CTX_use_PrivateKey ... key values mismatchàs 05:14:35, 1s após os inithooks iniciarem — o 15regen-sslcert estava no meio da regeneração do par. O hook comum só reinicia serviçosis-active, então o nginx ficava morto (UI inacessível) apesar de opencloud saudável.Fix em duas camadas:
nginx.service.d/opencloud.conf:Restart=on-failure+RestartSec=10+StartLimitIntervalSec=0— o nginx se recupera sozinho ~10s depois que o par fica consistente, mesmo se o usuário demorar nos prompts interativos.opencloud.py(fim do 40opencloud):systemctl restart nginxincondicional — garantia determinística ao fim do firstboot.Validação na VM live: diagnóstico confirmado (modulus do cert == modulus da chave após regen; nginx failed),
systemctl restart nginx→ HTTPS 200 com a UI do OpenCloud. O restante do firstboot passou 100%: senha aplicada, domínio em OC_URL//etc/hosts, opencloud ativo.