Skip to content

Compile cAdvisor statically #1237

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
wants to merge 1 commit into from
Closed

Conversation

luxas
Copy link

@luxas luxas commented Apr 22, 2016

Very simple fix for #1227
Also partially required for #1236

@vishh @djtm

@k8s-bot
Copy link
Collaborator

k8s-bot commented Apr 22, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in hack/jenkins/job-configs/kubernetes-jenkins-pull/ instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@luxas
Copy link
Author

luxas commented Apr 22, 2016

Ahh, doesn't it recognize me? :)

Also cc @timstclair

@vishh
Copy link
Contributor

vishh commented Apr 22, 2016

ok to test

On Fri, Apr 22, 2016 at 1:04 PM, Lucas Käldström [email protected]
wrote:

Ahh, doesn't it recognize me? :)

Also cc @timstclair https://github.com/timstclair


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1237 (comment)

@k8s-bot
Copy link
Collaborator

k8s-bot commented Apr 22, 2016

Jenkins GCE e2e

Build/test passed for commit 61ee971.

@luxas
Copy link
Author

luxas commented Apr 22, 2016

@vishh Tests passed. Are you confident enough to merge it 😄?
There will be time to evalute it before v0.24.0

@vishh
Copy link
Contributor

vishh commented Apr 22, 2016

@luxas The tests are not using the makefiles unfortunately. Look here. We need to make the test runner use the makefiles inorder to test this PR.

@luxas
Copy link
Author

luxas commented Apr 22, 2016

Argh, I see.
Will you set up an other CI or should I update the line you linked to?

@vishh
Copy link
Contributor

vishh commented Apr 22, 2016

Updating runner.go is the way to go.

On Fri, Apr 22, 2016 at 1:55 PM, Lucas Käldström [email protected]
wrote:

Argh, I see.
Will you set up an other CI or should I update the line you linked to?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1237 (comment)

@luxas luxas force-pushed the static_compilation branch from 61ee971 to e9a3c46 Compare April 23, 2016 09:31
@k8s-bot
Copy link
Collaborator

k8s-bot commented Apr 23, 2016

Jenkins GCE e2e

Build/test failed for commit e9a3c46.

@luxas luxas force-pushed the static_compilation branch from e9a3c46 to 73fbb57 Compare April 23, 2016 09:32
@k8s-bot
Copy link
Collaborator

k8s-bot commented Apr 23, 2016

Jenkins GCE e2e

Build/test failed for commit 73fbb57.

@luxas luxas force-pushed the static_compilation branch from 73fbb57 to c7e2e11 Compare April 23, 2016 09:42
@k8s-bot
Copy link
Collaborator

k8s-bot commented Apr 23, 2016

Jenkins GCE e2e

Build/test failed for commit c7e2e11.

@@ -204,7 +204,7 @@ func Run() error {

// Build cAdvisor.
glog.Infof("Building cAdvisor...")
err := RunCommand("godep", "go", "build", "github.com/google/cadvisor")
err := RunCommand("godep", "go", "build", "--ldflags='-extldflags \"-static\"'", "github.com/google/cadvisor")
Copy link
Author

Choose a reason for hiding this comment

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

@vishh Do you have any clue what to write here to make it work?
I tried a lot of different combinations, but the linker just didn't parse it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you try running make build?

On Tue, May 3, 2016 at 12:23 PM, Lucas Käldström [email protected]
wrote:

In integration/runner/runner.go
#1237 (comment):

@@ -204,7 +204,7 @@ func Run() error {

// Build cAdvisor.
glog.Infof("Building cAdvisor...")
  • err := RunCommand("godep", "go", "build", "github.com/google/cadvisor")
  • err := RunCommand("godep", "go", "build", "--ldflags='-extldflags "-static"'", "github.com/google/cadvisor")

@vishh https://github.com/vishh Do you have any clue what to write here
to make it work?
I tried a lot of different combinations, but the linker just didn't parse
it.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/google/cadvisor/pull/1237/files/c7e2e113a9084142964556bd76b43ffb64b9e0e9#r61940055

@djtm
Copy link

djtm commented May 4, 2016

flag provided but not defined: -extldflags "-static"

Maybe it doesn't eat the =? ->

err := RunCommand("godep", "go", "build", "--ldflags", " '-extldflags \"-static\" ' ", "github.com/google/cadvisor")

Maybe we need not escape here.

err := RunCommand("godep", "go", "build", "--ldflags", " '-extldflags -static ' ", "github.com/google/cadvisor")

@luxas
Copy link
Author

luxas commented May 4, 2016

Thanks @djtm, will try it tomorrow

@k8s-bot
Copy link
Collaborator

k8s-bot commented May 5, 2016

Jenkins GCE e2e

Build/test failed for commit 48c87a6.

@luxas
Copy link
Author

luxas commented May 5, 2016

It seems like a flake @vishh

@luxas
Copy link
Author

luxas commented May 5, 2016

@k8s-bot test this

@luxas luxas force-pushed the static_compilation branch from 48c87a6 to 5b2bbd1 Compare May 5, 2016 15:35
@k8s-bot
Copy link
Collaborator

k8s-bot commented May 5, 2016

Jenkins GCE e2e

Build/test failed for commit 5b2bbd1.

@luxas luxas force-pushed the static_compilation branch from 5b2bbd1 to c339a0c Compare May 5, 2016 15:42
@k8s-bot
Copy link
Collaborator

k8s-bot commented May 5, 2016

Jenkins GCE e2e

Build/test failed for commit c339a0c.

@luxas
Copy link
Author

luxas commented May 5, 2016

Seems like a ssh issue

@vishh
Copy link
Contributor

vishh commented May 5, 2016

@pwittrock ssh is failing (again)...

@timstclair
Copy link
Contributor

@k8s-bot test this

@k8s-bot
Copy link
Collaborator

k8s-bot commented May 6, 2016

Jenkins GCE e2e

Build/test failed for commit c339a0c.

@pwittrock
Copy link
Contributor

Not obvious why this failed from the logs:

Error 1: error running cAdvisor: command "ssh" ["-i" "/var/lib/jenkins/gce_keys/google_compute_engine" "-o" "UserKnownHostsFile=/dev/null" "-o" "IdentitiesOnly=yes" "-o" "CheckHostIP=no" "-o" "StrictHostKeyChecking=no" "e2e-cadvisor-coreos-beta-docker19" "--" "sudo /tmp/cadvisor-3779/cadvisor --port 8080 --logtostderr --docker_env_metadata_whitelist=TEST_VAR &> /tmp/cadvisor-3779/log.txt"] failed with error: exit status 2 and output: Warning: Permanently added 'e2e-cadvisor-coreos-beta-docker19' (ECDSA) to the list of known hosts.

I can't tell if this is ssh or cadvisor that is failing.

@devx
Copy link
Contributor

devx commented May 12, 2016

I tested manually, it seems like an SSH issue for me.

@k8s-bot
Copy link
Collaborator

k8s-bot commented May 16, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link
Collaborator

k8s-bot commented May 16, 2016

Jenkins GCE e2e

Build/test failed for commit c339a0c.

@luxas
Copy link
Author

luxas commented May 16, 2016

I don't think this is related to my PR:

Error 1: failed to make remote testing directory:

@timstclair
Copy link
Contributor

No, sorry, our PR builder is broken right now. Fix is on the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants