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

fix: Use the correct opentracing plugin for Jaeger #2744

Merged
merged 2 commits into from
Jul 5, 2018
Merged

fix: Use the correct opentracing plugin for Jaeger #2744

merged 2 commits into from
Jul 5, 2018

Conversation

mikebryant
Copy link
Contributor

@mikebryant mikebryant commented Jul 5, 2018

What this PR does / why we need it: Uses the correct opentracing plugin for Jaeger - without this there is a regression and that feature doesn't work in 0.16.2

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): part of #2738

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 5, 2018
@mikebryant
Copy link
Contributor Author

/assign @aledbf

@mikebryant
Copy link
Contributor Author

I've built this locally and was able to run the controller with Jaeger enabled without it crashing. Haven't tested it more extensively than that

Makefile Outdated
@@ -59,7 +59,7 @@ IMAGE = $(REGISTRY)/$(IMGNAME)
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)

# Set default base image dynamically for each arch
BASEIMAGE?=quay.io/kubernetes-ingress-controller/nginx-$(ARCH):0.53
BASEIMAGE?=quay.io/kubernetes-ingress-controller/nginx-$(ARCH):0.54
Copy link
Member

Choose a reason for hiding this comment

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

Please leave this as 0.53. First, we need to merge the change in the nginx image, publish and then open a PR to update the version (we don't merge PRs failing CI)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(And updated the description, as now this PR won't fix the issue, the next one will)

@codecov-io
Copy link

codecov-io commented Jul 5, 2018

Codecov Report

Merging #2744 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2744   +/-   ##
=======================================
  Coverage   40.91%   40.91%           
=======================================
  Files          73       73           
  Lines        5101     5101           
=======================================
  Hits         2087     2087           
  Misses       2725     2725           
  Partials      289      289
Impacted Files Coverage Δ
internal/ingress/controller/template/template.go 66.52% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64cf1b9...0e26cff. Read the comment docs.

cd "$BUILD_PATH/jaeger-client-cpp-$JAEGER_VERSION"
sed -i 's/-Werror//' CMakeLists.txt
mkdir .build
cd .build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DBUILD_TESTING=OFF -DJAEGERTRACING_WITH_YAML_CPP=OFF -DJAEGERTRACING_BUILD_EXAMPLES=OFF ..
# Taken from https://github.com/jaegertracing/jaeger-client-cpp/blob/v0.4.1/scripts/build-plugin.sh
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

@rnburn rnburn Jul 5, 2018

Choose a reason for hiding this comment

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

That looks good.

Jaeger needs the JAEGERTRACING_WITH_YAML_CPP option enabled to be able to load a JSON configuration, which was probably what was causing trouble.

But BTW - since Jaeger links in everything statically, you should be able to remove the _3rdParty/Hunter/ directory when you're finished. It would make your image smaller.

Copy link
Member

Choose a reason for hiding this comment

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

@mikebryant can you implement what @rnburn mentioned?

Copy link
Member

Choose a reason for hiding this comment

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

@mikebryant last change and we are ready to merge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aledbf Isn't that already taken care of by the rm -rf "$BUILD_PATH" line later in the script, that cleans up all of the build stuff?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe most of it's taken care of, but you can delete this line

cp $HUNTER_INSTALL_DIR/lib/libthrift* /usr/local/lib

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see, sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)

local: *;
};
EOF
cmake -DCMAKE_BUILD_TYPE=Release -DJAEGERTRACING_PLUGIN=ON -DBUILD_TESTING=OFF -DJAEGERTRACING_BUILD_EXAMPLES=OFF -DHUNTER_CONFIGURATION_TYPES=Release ..
make
make install
Copy link
Contributor

@rnburn rnburn Jul 5, 2018

Choose a reason for hiding this comment

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

Also, you shouldn't need make install here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done :)

@aledbf
Copy link
Member

aledbf commented Jul 5, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 5, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, mikebryant

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 5, 2018
@aledbf
Copy link
Member

aledbf commented Jul 5, 2018

@mikebryant I'll let you know when the image is available

@k8s-ci-robot k8s-ci-robot merged commit 88b7d97 into kubernetes:master Jul 5, 2018
@gianrubio
Copy link
Contributor

I built a image from master and seems like the issue wasn't fixed.

k logs -f -n ingress ingress-nginx-ingress-intern-controller-ff48c5bc-vjhw5
I0706 11:50:32.240482       7 flags.go:180] Watching for Ingress class: intern
W0706 11:50:32.240540       7 flags.go:183] Only Ingresses with class "intern" will be processed by this Ingress controller
W0706 11:50:32.240756       7 flags.go:213] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)
-------------------------------------------------------------------------------
NGINX Ingress controller
  Release:    0.16.2-1
  Build:      git-5827c981
  Repository: https://github.com/kubernetes/ingress-nginx
-------------------------------------------------------------------------------
....

-------------------------------------------------------------------------------
Error: exit status 1
2018/07/06 11:50:33 [error] 39#39: Failed to load tracing library /usr/local/lib/libjaegertracing_plugin.so: /usr/local/lib/libjaegertracing_plugin.so: cannot open shared object file: No such file or directory
nginx: [error] Failed to load tracing library /usr/local/lib/libjaegertracing_plugin.so: /usr/local/lib/libjaegertracing_plugin.so: cannot open shared object file: No such file or directory
nginx: configuration file /tmp/nginx-cfg280008842 test failed

-------------------------------------------------------------------------------
W0706 11:50:33.694344       7 queue.go:130] requeuing initial-sync, err
-------------------------------------------------------------------------------

@mikebryant mikebryant deleted the wip-2738 branch July 6, 2018 12:00
@mikebryant
Copy link
Contributor Author

@gianrubio See #2748

And hmm, oops, it looks like I shouldn't have had the changes to use the new plugin in this MR, they should have been kept back till #2748 since it's not going to work without that change as well..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants