Closed (fixed)
Project:
Provision
Version:
6.x-2.x-dev
Component:
HTTP Service
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
21 May 2013 at 17:13 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent
After the recent changes in nginx (i suspect #1635596: nginx: do not decide the policy for users), there is a new problem when verifying a site:
aegir@angela:/home/anarcat$ drush @hostmaster provision-verify
<em>nginx</em> on <em>angela</em> could not be restarted. Changes might not be available until this has been done. (error: <em>Reloading nginx configuration: nginx: [emerg] open() [warning]
"/var/aegir/config/includes/nginx_vhost_common.conf" failed (2: No such file or directory) in /var/aegir/config/server_master/nginx/vhost.d/aegir.angela.anarcat.ath.cx:31
nginx: configuration file /etc/nginx/nginx.conf test failed</em>)
This would happen even after server verification.
I fixed this by manually creating the following symlink:
lrwxrwxrwx 1 aegir aegir 25 mai 17 20:59 nginx_vhost_common.conf -> nginx_simple_include.conf
but this seems to me to be a bug in the server verification.
Comments
Comment #1
omega8cc commentedThis is nothing new. And this is only a symptom, not a real problem. This is also a reason we had to add the how-to to force **server** (not the site) re-verify *via front-end*, because backend verification doesn't update these config files.
su -s /bin/bash - aegir -c "drush @hostmaster hosting-task @server_master verify --force -d"It would be nice to get this fixed, but the problem is already well known, so I would tend to close this as a duplicate of many previously reported issues, which affect not only Nginx configuration, but also lost vhost aliases etc.
Comment #2
anarcat commentedreverifying the site through the frontend doesn't help, the symlink is still not created. furthermore, i am not sure how this is related to #1004526: Automatic aliases are not persisted across rename and clone.
Comment #3
omega8cc commentedYou need to re-verify the **server**, not the site. And yes, it is related, because it is another case for the same problem - some things work properly only when you run Verify via frontend. There are of course differences but the problem is the same - Verify in the backend doesn't work as it should work, while running it via frontend does work as expected - in both cases. It is a problem known for years already - at least since 2010.
Comment #4
anarcat commentedactually, you were right, i just forgot to wait for the queue to run - so running it through hosting-task actually works! weiiird.
Comment #5
omega8cc commentedSo, I think that the original issue here is a result of confusion, because it simply can't work on a *site* verify, because it is the *server* what needs to be re-verified - to make it more puzzling - via frontend.
Comment #6
omega8cc commentedNote also that running server verify via frontend has this not so nice side effect - it will trigger re-verify for all platforms.
Comment #7
anarcat commentedi figured it out. the problem was that the include file was generated in the 'platform' context instead of the 'server' context. this was working from the frontend because, as you mentionned, the frontend verify triggers verification for all platforms, which then in turn would generate the missing config.
see commit e918bcc
Comment #8
omega8cc commentedRight, not sure how it got there, probably leftover from earlier testing in a local dev branch. Thanks for the fix!
Comment #9
anarcat commentedSo this commit actually broke the nginx port completely, because contrary to what i though...
... that doesn't create two configuration files, it just creates the latter file. crap. so now 2.x doesn't generate the main nginx.conf file. blast.
Comment #10
omega8cc commentedUh, so I guess this is why I have used the platform context here (which is not used in Nginx for anything else). Just to avoid creating completely new context etc.
I have tried various tricks to make this happen, but it seems that it is not really possible to create extra config files in the same context on the same (init) run, because there is only one config template defined to process etc.
Comment #11
anarcat commentedyep, i've figured it out, actually.
this is a potentially disruptive change, but at least i was able to successfully generate both config files now.
see dc87266 commit.