Closed (fixed)
Project:
Provision
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 May 2011 at 01:41 UTC
Updated:
17 Mar 2012 at 17:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
crea commentedI'm testing a patch that tests upload progress capability using sample config.
Comment #2
crea commentedFor some reason this still doesn't work...have no idea why
Comment #3
crea commentedLooks like save_server() doesn't run at all, even if I save server node. Is it by design ? Seems strange...So I must manually run "drush provision-save blahblah" from the command line.
If "save" works only from command line, wouldn't it be more logical to test server capabilities during verify ? It's confusing
Comment #4
crea commentedNevermind. The alias file seems to be updated (last modified time changes) but it has "'nginx_has_upload_progress' => 0" anyway
Comment #5
crea commentedI tried "$this->server->nginx_has_upload_progress = 1;" in save_server() and it still doesn't work. In the alias file it's 0
Comment #6
crea commentedI found the root of the problem: when I was upgrading provision, I left backup of the old provision directory. It was involved.
Ok, that means the patch is almost ready...
Comment #7
crea commentedI've changed logic to check for presence of "syntax is correct" line in the output rather than absence of "unknown directive" error cause absence of the error doesn't mean the syntax check passed.
I've also found bug with nginx execution: we can't assume it's in PATH for aegir user so we must provide full path. I've added some primitive path detection - I suppose there's a way to fail gracefully if full path is unknown in the end.
Comment #8
crea commentedForgot the conf file in the last version of patch.
Comment #9
crea commentedComment #10
memtkmcc commentedI'm aware of this, but I stopped to work on a fix because of this issue #962188: Nginx version check works for server.tpl.php but doesn't work for/in vhost.tpl.php since even if all tests results are correct and stored in
server_master.alias.drushrc.phpas bellow:you still can't use them in
vhost.tpl.phpfor some unknown reason (at least I have no idea yet why it doesn't work) so it will usenginx_simple_include.conf, no matter what. It will work only inserver.tpl.php, which is not enough.Correct me if I'm wrong.
Comment #11
crea commentedYes these issues are connected. Actually I'm troubleshooting #962188: Nginx version check works for server.tpl.php but doesn't work for/in vhost.tpl.php too
Comment #12
crea commentedAdded ->status() call after exists(). Changed path checks order so /usr/local takes precedence over /usr as it usually works.
Comment #13
omega8cc commentedI believe it is fine now, after you fixed the issue #962188: Nginx version check works for server.tpl.php but doesn't work for/in vhost.tpl.php.
Thanks again.
Comment #14
anarcat commenteddo we invariably want to fail if we don't find it here? and is "return" a proper way to fail? I feel an error should be raised with drush_set_error() here....
again extra whitespace here, and below...
i don't understand why this is better than checking the actual output here... We're assuming the configuration for the upload_progress module is going to be a certain name, why not detect the right module directly?
is there *anything* in your output that says the module is configured?
Powered by Dreditor.
Comment #15
crea commentedIt is because the output is not reliable. Since this is a third-party module, it's not present in "--with-http_stub_status_module" way but in "--add-module=path_to_module" one, with module path being random. We can't assume that module path contains any keywords.
I don't know of any other way to detect the module.
Comment #16
omega8cc commentedThat is (almost) correct, because in fact current regex checks for module *name* (and not any arbitral path), which is
nginx-upload-progress-module, unless you renamed it - see the original here: https://github.com/masterzen/nginx-upload-progress-moduleBut I agree that it is better to use the config check trick instead of relying on module name regex, because it is too easy to have the module name/directory renamed on git clone, etc.
Comment #17
omega8cc commentedWe no longer use any extra file, because it caused already too many issues for too many people, on upgrades, for remote heads etc. We check the output for "upload" keyword, which should be enough unique to make sure it is an upload progress module compiled in. If you are using some unrelated name for module with official name "nginx-upload-progress-module", then it is a FAQ/docs candidate and we should be able to assume that "upload" keyword is present, like we assume that you didn't rename "nginx" to something else.
Changes committed to 6.x-1.x and 6.x-2.x:
http://drupalcode.org/project/provision.git/commit/009294bca51396c890423...
http://drupalcode.org/project/provision.git/commit/569d5489b7e40bb55981d...