-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
nixos/acme: nginx configuration test fails during nixos-rebuild switch when you have an existing virtualhost and add a new one #60180
Comments
I can reliably reproduce the bug now. First deploy:
and after that, deploy:
Nginx should fail to start now. If you manually However, im not sure how to make a regression I noticed actually another bug here. if a
|
cc @globin |
I think the bug is as follows: Nginx has a
Now, if you deploy a single However, once you deploy the second Proposed fixUsing a Instead, we should create a So:
Where
This way, |
I have created PR that demonstrates the bug using a regression test. But don't have an actual fix implemented so far #60219 |
I have misinterpreted what |
We can instead use a target unit per certificate. I'll WIP up a PR today |
@arianvp Any luck? |
I just ran into this. Same cause, same symptoms, same easy workaround of manually starting nginx (thankfully). This is the relevant part of the nginx logs, showing that it's starting before ACME gets a chance to create the files it needs:
|
@solson ive made some more progress last weekend. Please have a look at the referenced PR if you have time. It could use a review + feedback |
Also happened to me just now on 1 of 3 nixops machines running 19.03:
|
Issue description
nginx failed to restart after I added a second virtualHost to my nginx config.
running
nixos-rebuild switch
a second time fixed the issue. But my website went down due to anixos-rebuild switch
which seems like there is a serious bug in theenableACME
logic in thenginx
moduleFriends of me also ran into this multiple times last week at their company
Steps to reproduce
enableACME = true
enableACME = true
andnixos-rebuild switch
nginx
prestart script (nginx -t
) failsThis was the specific commit that failed to deploy: arianvp/nixos-stuff@4fe0a77
Logs:
Technical details
Nixos 19.03 but also happened on 18.03 to me in the past
The text was updated successfully, but these errors were encountered: