Skip to content
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

change: drop support of OpenResty 1.15 #3960

Merged
merged 1 commit into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
os_name:
- linux_openresty
- linux_openresty_1_17
- linux_openresty_1_15
- linux_tengine
- linux_apisix_master_luarocks
- linux_apisix_current_luarocks
Expand Down
47 changes: 0 additions & 47 deletions apisix/cli/ngx_tpl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -525,52 +525,6 @@ http {
}
}

{% if use_or_1_15 then %}
# hack for OpenResty before 1.17.8, which doesn't support variable inside grpc_pass
location @1_15_grpc_pass {
access_by_lua_block {
apisix.grpc_access_phase()
}

grpc_set_header Content-Type application/grpc;
grpc_socket_keepalive on;
grpc_pass grpc://apisix_backend;

header_filter_by_lua_block {
apisix.http_header_filter_phase()
}

body_filter_by_lua_block {
apisix.http_body_filter_phase()
}

log_by_lua_block {
apisix.http_log_phase()
}
}

location @1_15_grpcs_pass {
access_by_lua_block {
apisix.grpc_access_phase()
}

grpc_set_header Content-Type application/grpc;
grpc_socket_keepalive on;
grpc_pass grpcs://apisix_backend;

header_filter_by_lua_block {
apisix.http_header_filter_phase()
}

body_filter_by_lua_block {
apisix.http_body_filter_phase()
}

log_by_lua_block {
apisix.http_log_phase()
}
}
{% else %}
location @grpc_pass {

access_by_lua_block {
Expand All @@ -593,7 +547,6 @@ http {
apisix.http_log_phase()
}
}
{% end %}

{% if enabled_plugins["dubbo-proxy"] then %}
location @dubbo_pass {
Expand Down
7 changes: 1 addition & 6 deletions apisix/cli/ops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,10 @@ Please modify "admin_key" in conf/config.yaml .
util.die("can not find openresty\n")
end

local use_or_1_15 = true
local need_ver = "1.15.8"
local need_ver = "1.17.3"
if not check_version(or_ver, need_ver) then
util.die("openresty version must >=", need_ver, " current ", or_ver, "\n")
end
if check_version(or_ver, "1.17.8") then
use_or_1_15 = false
end

local or_info = util.execute_cmd("openresty -V 2>&1")
local with_module_status = true
Expand Down Expand Up @@ -448,7 +444,6 @@ Please modify "admin_key" in conf/config.yaml .

-- Using template.render
local sys_conf = {
use_or_1_15 = use_or_1_15,
lua_path = env.pkg_path_org,
lua_cpath = env.pkg_cpath_org,
os_name = util.trim(util.execute_cmd("uname")),
Expand Down
5 changes: 0 additions & 5 deletions apisix/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ local upstream_util = require("apisix.utils.upstream")
local ctxdump = require("resty.ctxdump")
local ipmatcher = require("resty.ipmatcher")
local ngx = ngx
local ngx_version = ngx.config.nginx_version
local get_method = ngx.req.get_method
local ngx_exit = ngx.exit
local math = math
Expand Down Expand Up @@ -468,10 +467,6 @@ function _M.http_access_phase()
local up_scheme = api_ctx.upstream_scheme
if up_scheme == "grpcs" or up_scheme == "grpc" then
ngx_var.ctx_ref = ctxdump.stash_ngx_ctx()
if ngx_version < 1017008 then
return ngx.exec("@1_15_" .. up_scheme .. "_pass")
end

return ngx.exec("@grpc_pass")
end

Expand Down
21 changes: 0 additions & 21 deletions ci/linux_openresty_1_15_runner.sh

This file was deleted.

54 changes: 0 additions & 54 deletions docs/en/latest/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,60 +211,6 @@ Server: APISIX web server
</html>
```

## How to fix OpenResty Installation Failure on MacOS 10.15

When you install the OpenResty on MacOs 10.15, you may face this error

```shell
> brew install openresty
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

==> Installing openresty from openresty/brew
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or
https://developer.apple.com/download/more/.

==> Downloading https://openresty.org/download/openresty-1.15.8.2.tar.gz
Already downloaded: /Users/wusheng/Library/Caches/Homebrew/downloads/4395089f0fd423261d4f1124b7beb0f69e1121e59d399e89eaa6e25b641333bc--openresty-1.15.8.2.tar.gz
==> ./configure -j8 --prefix=/usr/local/Cellar/openresty/1.15.8.2 --pid-path=/usr/local/var/run/openresty.pid --lock-path=/usr/
Last 15 lines from /Users/wusheng/Library/Logs/Homebrew/openresty/01.configure:
DYNASM host/buildvm_arch.h
HOSTCC host/buildvm.o
HOSTLINK host/buildvm
BUILDVM lj_vm.S
BUILDVM lj_ffdef.h
BUILDVM lj_bcdef.h
BUILDVM lj_folddef.h
BUILDVM lj_recdef.h
BUILDVM lj_libdef.h
BUILDVM jit/vmdef.lua
make[1]: *** [lj_folddef.h] Segmentation fault: 11
make[1]: *** Deleting file `lj_folddef.h'
make[1]: *** Waiting for unfinished jobs....
make: *** [default] Error 2
ERROR: failed to run command: gmake -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/luajit

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/openresty/homebrew-brew/issues

These open issues may also help:
Can't install openresty on macOS 10.15 https://github.com/openresty/homebrew-brew/issues/10
The openresty-debug package should use openresty-openssl-debug instead https://github.com/openresty/homebrew-brew/issues/3
Fails to install OpenResty https://github.com/openresty/homebrew-brew/issues/5

Error: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or
https://developer.apple.com/download/more/.
```

This is an OS incompatible issue, you could fix by these two steps

1. `brew edit openresty/brew/openresty`
1. add `\ -fno-stack-check` in with-luajit-xcflags line.

## How to change the log level?

The default log level for APISIX is `warn`. However You can change the log level to `info` if you want to trace the messages print by `core.log.info`.
Expand Down
50 changes: 0 additions & 50 deletions t/APISIX.pm
Original file line number Diff line number Diff line change
Expand Up @@ -205,56 +205,6 @@ my $grpc_location = <<_EOC_;
}
_EOC_

if ($version =~ m/\/1.15.8/) {
$grpc_location = <<_EOC_;
# hack for OpenResty before 1.17.8, which doesn't support variable inside grpc_pass
location \@1_15_grpc_pass {
access_by_lua_block {
apisix.grpc_access_phase()
}

grpc_set_header Content-Type application/grpc;
grpc_socket_keepalive on;
grpc_pass grpc://apisix_backend;

header_filter_by_lua_block {
apisix.http_header_filter_phase()
}

body_filter_by_lua_block {
apisix.http_body_filter_phase()
}

log_by_lua_block {
apisix.http_log_phase()
}
}

location \@1_15_grpcs_pass {
access_by_lua_block {
apisix.grpc_access_phase()
}

grpc_set_header Content-Type application/grpc;
grpc_socket_keepalive on;
grpc_pass grpcs://apisix_backend;

header_filter_by_lua_block {
apisix.http_header_filter_phase()
}

body_filter_by_lua_block {
apisix.http_body_filter_phase()
}

log_by_lua_block {
apisix.http_log_phase()
}
}
_EOC_
}


add_block_preprocessor(sub {
my ($block) = @_;
my $wait_etcd_sync = $block->wait_etcd_sync // 0.1;
Expand Down
8 changes: 1 addition & 7 deletions utils/linux-install-openresty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,4 @@ else
openresty="openresty-debug=$OPENRESTY_VERSION*"
fi

sudo apt-get install "$openresty" lua5.1 liblua5.1-0-dev

if [ "$OPENRESTY_VERSION" == "1.15.8.2" ]; then
sudo apt-get install openresty-openssl-debug-dev
else
sudo apt-get install openresty-openssl111-debug-dev
fi
sudo apt-get install "$openresty" lua5.1 liblua5.1-0-dev openresty-openssl111-debug-dev