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

BUILD/MEDIUM: add haproxy and dataplane binaries to travis #36

Merged
merged 2 commits into from
Apr 16, 2020

Conversation

aiharos
Copy link
Collaborator

@aiharos aiharos commented Apr 16, 2020

No description provided.

@aiharos aiharos force-pushed the add_binaries_to_ci branch 3 times, most recently from d220b42 to c95b724 Compare April 16, 2020 11:56
@aiharos aiharos changed the title WIP BUILD/MEDIUM: add haproxy and dataplane binaries to travis BUILD/MEDIUM: add haproxy and dataplane binaries to travis Apr 16, 2020
@aiharos aiharos requested a review from pierresouchay April 16, 2020 12:04
@aiharos
Copy link
Collaborator Author

aiharos commented Apr 16, 2020

This now allows running unit tests - some of them may need to be tweaked or modified.

@aiharos aiharos marked this pull request as ready for review April 16, 2020 12:04
@aiharos
Copy link
Collaborator Author

aiharos commented Apr 16, 2020

Solves #34

Copy link
Collaborator

@pierresouchay pierresouchay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not working as seen in https://travis-ci.org/github/haproxytech/haproxy-consul-connect/builds/675704444 because haproxy is not in $PATH

--- PASS: TestChangeFrontend (0.00s)

=== RUN   TestFromHA

    TestFromHA: from_ha_test.go:147: CANNOT Run test because of missing requirement: Failed executing dataplaneapi: exec: already started

--- SKIP: TestFromHA (0.36s)

install:
- wget http://www.haproxy.org/download/2.0/src/haproxy-2.0.14.tar.gz
- tar -zxvf haproxy-2.0.14.tar.gz
- pushd haproxy-2.0.14 && make TARGET=linux-glibc USE_OPENSSL=1 USE_ZLIB=1 USE_PCRE=1 && sudo make install && popd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working as haproxy binary in not in the $PATH

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the test tries to execute dataplane, and dataplane is already started?

Failed executing dataplaneapi: exec: already started

Haproxy binary is installed with sudo make install into /usr/local/sbin

'haproxy' -> '/usr/local/sbin/haproxy'
'doc/haproxy.1' -> '/usr/local/share/man/man1/haproxy.1'

The path contains /usr/local/sbin

$ export PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.2.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exec: already started there is something else: #37

I did not pay attention, there is no need to call run on command since already run. It works sometimes because this is racy I suspect.

Rebase with #37 and this error should disappear

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As demonstrated by the latest commit:

$ haproxy -vv
1465HA-Proxy version 2.0.14 2020/04/02 - https://haproxy.org/
1466Build options :
1467  TARGET  = linux-glibc
1468  CPU     = generic
1469  CC      = gcc
1470  CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-old-style-declaration -Wno-ignored-qualifiers -Wno-clobbered -Wno-missing-field-initializers -Wtype-limits
1471  OPTIONS = USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
1472
1473Feature list : +EPOLL -KQUEUE -MY_EPOLL -MY_SPLICE +NETFILTER +PCRE -PCRE_JIT -PCRE2 -PCRE2_JIT +POLL -PRIVATE_CACHE +THREAD -PTHREAD_PSHARED -REGPARM -STATIC_PCRE -STATIC_PCRE2 +TPROXY +LINUX_TPROXY +LINUX_SPLICE +LIBCRYPT +CRYPT_H -VSYSCALL +GETADDRINFO +OPENSSL -LUA +FUTEX +ACCEPT4 -MY_ACCEPT4 +ZLIB -SLZ +CPU_AFFINITY +TFO +NS +DL +RT -DEVICEATLAS -51DEGREES -WURFL -SYSTEMD -OBSOLETE_LINKER +PRCTL +THREAD_DUMP -EVPORTS```

The issue has to be in the tests, either they:
- should not try to start dataplane if it was started already
- stop dataplane as part of each test cleanup

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think #37 will really fix this

@aiharos aiharos requested a review from pierresouchay April 16, 2020 12:47
@pierresouchay
Copy link
Collaborator

pierresouchay commented Apr 16, 2020

@aiharos Can we rebase this PR after merging #37 (racy bug with detection of binaries), and force push on this one to check everything is working as expected?

@aiharos aiharos force-pushed the add_binaries_to_ci branch from 1bbfc39 to 5dfc9a9 Compare April 16, 2020 12:52
@aiharos
Copy link
Collaborator Author

aiharos commented Apr 16, 2020

@aiharos Can we rebase this PR after merging #37 (racy bug with detection of binaries), and force push on this one to check everything is working as expected?

Of course, already in progress!

@pierresouchay pierresouchay merged commit 49db67a into haproxytech:master Apr 16, 2020
@aiharos aiharos deleted the add_binaries_to_ci branch April 16, 2020 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants