-
Notifications
You must be signed in to change notification settings - Fork 202
balancer_by_lua for streams #30
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
Closed
Closed
Changes from 23 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
35e6cd7
Initial Commit of balancer_by_lua_* port
splitice 559a9b4
add balancer to FFI context and fix get_phase
splitice 0729016
fix segfault due to miss-matched types
splitice 14a545c
first part of porting tests, the configuration
splitice 463a8eb
fix log passing
splitice 485ec80
pass the stream session correctly
splitice e72e37f
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice 169a8cf
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice a969b82
request/session r -> s
splitice 70942f9
FFI: get_last_failure comment the reason for non-implementation. Retu…
splitice 1527ee1
Style: remove extra whitespace / newline
splitice 9d3efbf
style fixes
splitice 1477f6d
missed semicolon
splitice d6252a2
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice 8d47c5c
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice 0a87fc2
style fixes based on ngx-style.pl
rshriram 291d72f
add comment about *status=0
rshriram 78efab0
travis tests
69785dc
remove extraneous resolve test
4552ef2
fix balancer tests
9c65d89
add empty --config sections in balancer test
bb12e57
add stream request to tests
da0cb96
remove http specific tests from suite 138-balancer.t
52cc121
remove blank lines
3a430b8
remove travis from personal branch
0327ea3
Merge remote-tracking branch 'upstream/master'
c083780
set name of context for balancer_by_lua
07b8540
add support for set_timeouts in balancer_by_lua
9f0c59e
set nginx version to 1.11.2
9136d25
revert travis version to 1.9.15
3d84692
remove set_timeout support
dc5a572
ngx exit support - wip
a73175b
fixing balancer tests. check for ngx error and ngx ok
34ae6be
check for context mismatch before anything else in balancer functions
8aa6082
remove stray http balancer reference
ac4f075
Merge remote-tracking branch 'upstream/master'
f204613
fix compilation error
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
sudo: required | ||
dist: trusty | ||
|
||
os: linux | ||
|
||
language: c | ||
|
||
compiler: | ||
- gcc | ||
- clang | ||
|
||
cache: | ||
directories: | ||
- download-cache | ||
|
||
env: | ||
global: | ||
- LUAJIT_PREFIX=/opt/luajit21 | ||
- LUAJIT_LIB=$LUAJIT_PREFIX/lib | ||
- LD_LIBRARY_PATH=$LUAJIT_LIB:$LD_LIBRARY_PATH | ||
- LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1 | ||
- LUA_INCLUDE_DIR=$LUAJIT_INC | ||
- LUA_CMODULE_DIR=/lib | ||
- PCRE_VER=8.33 | ||
- PCRE_PREFIX=/opt/pcre | ||
- PCRE_LIB=$PCRE_PREFIX/lib | ||
- PCRE_INC=$PCRE_PREFIX/include | ||
- JOBS=3 | ||
- NGX_BUILD_JOBS=$JOBS | ||
- TEST_NGINX_SLEEP=0.006 | ||
matrix: | ||
- NGINX_VERSION=1.9.15 | ||
|
||
services: | ||
- memcache | ||
- redis-server | ||
|
||
before_install: | ||
- sudo apt-get install -qq -y axel cpanminus libgd-dev libtest-base-perl libtext-diff-perl liburi-perl libwww-perl libtest-longstring-perl liblist-moreutils-perl > build.log 2>&1 || (cat build.log && exit 1) | ||
|
||
install: | ||
- if [ ! -d download-cache ]; then mkdir download-cache; fi | ||
- if [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -O download-cache/pcre-$PCRE_VER.tar.gz http://ftp.cs.stanford.edu/pub/exim/pcre/pcre-$PCRE_VER.tar.gz; fi | ||
- git clone https://github.com/openresty/nginx-devel-utils.git | ||
- git clone https://github.com/openresty/lua-cjson.git | ||
- git clone https://github.com/openresty/openresty.git ../openresty | ||
- git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx | ||
- git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module | ||
- git clone https://github.com/openresty/mockeagain.git | ||
- git clone https://github.com/openresty/test-nginx.git | ||
- git clone -b v2.1-agentzh https://github.com/openresty/luajit2.git | ||
- git clone https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module | ||
- git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module | ||
- git clone https://github.com/openresty/memc-nginx-module.git ../memc-nginx-module | ||
- git clone https://github.com/openresty/headers-more-nginx-module.git ../headers-more-nginx-module | ||
- git clone https://github.com/openresty/stream-echo-nginx-module.git ../stream-echo-nginx-module | ||
|
||
script: | ||
- tar zxf download-cache/pcre-$PCRE_VER.tar.gz | ||
- cd pcre-$PCRE_VER/ | ||
- ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1) | ||
- make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) | ||
- sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1) | ||
- cd .. | ||
- cd luajit2 | ||
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT' > build.log 2>&1 || (cat build.log && exit 1) | ||
- sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1) | ||
- cd ../test-nginx && sudo cpanm . && cd .. | ||
- cd lua-cjson/ && make -j$JOBS && sudo make install && cd .. | ||
- cd mockeagain/ && make CC=$CC -j$JOBS && cd .. | ||
- export PATH=$PWD/work/nginx/sbin:$PWD/nginx-devel-utils:$PATH | ||
- export NGX_BUILD_CC=$CC | ||
- sh util/build.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1) | ||
- nginx -V | ||
- ldd `which nginx`|grep -E 'luajit|ssl|pcre' | ||
- export LD_PRELOAD=$PWD/mockeagain/mockeagain.so | ||
- export LD_LIBRARY_PATH=$PWD/mockeagain:$LD_LIBRARY_PATH | ||
- export TEST_NGINX_RESOLVER=8.8.4.4 | ||
- dig +short @$TEST_NGINX_RESOLVER openresty.org || exit 0 | ||
- dig +short @$TEST_NGINX_RESOLVER agentzh.org || exit 0 | ||
- prove -r t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git master branch already has this file. Please rebase to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean remove the entire .travis.yml file? I can certainly do it.. I just kept it around for my personal testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agentzh
Could you please give me some pointer on what exactly you mean by allowing
ngx.balancer
to work with this? Sorry, I whipped up this PR without going into much of the code base. So, I don't really understand what is needed here.If you could provide me with a pointer or something, that would be very useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rshriram I mean the git master branch already has the
.travis.yml
file:https://github.com/openresty/stream-lua-nginx-module/blob/master/.travis.yml
And the travis ci tests are all passing on the master branch. So your branch should too. And you should not add your own
.travis.yml
changes as seen in this diff.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rshriram I'm not suggesting removing the
.travis.yml
file. Instead I'm suggesting that the master branch already has it and you should not add your own version without good reasons.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rshriram Theres another PR in resty core for the ngx.balancer side.