Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Nginx service checks for the string "(nginx-upload-progress-module)" in "nginx -V" output, but my output doesn't contain it. I suppose it's because barracuda/octopus setup uses special configure parameters.
We can't use it - this is supposed to work for everyone and not just barracuda/octopus users.
Comment | File | Size | Author |
---|---|---|---|
#12 | test_upload_progress_1171508_4.patch | 1.87 KB | crea |
#7 | test_upload_progress_1171508_2.patch | 1.61 KB | crea |
#8 | test_upload_progress_1171508_3.patch | 1.85 KB | crea |
#2 | test_upload_progress_1171508.patch | 1.49 KB | crea |
Comments
Comment #1
crea CreditAttribution: crea commentedI'm testing a patch that tests upload progress capability using sample config.
Comment #2
crea CreditAttribution: crea commentedFor some reason this still doesn't work...have no idea why
Comment #3
crea CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: crea commentedForgot the conf file in the last version of patch.
Comment #9
crea CreditAttribution: crea commentedComment #10
memtkmcc CreditAttribution: 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.php
as bellow:you still can't use them in
vhost.tpl.php
for 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 CreditAttribution: 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 CreditAttribution: crea commentedAdded ->status() call after exists(). Changed path checks order so /usr/local takes precedence over /usr as it usually works.
Comment #13
omega8cc CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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...