Skip to content

debug healthz wait flakes - #6171

Closed
pweil- wants to merge 1 commit into
openshift:masterfrom
pweil-:debug-healthz
Closed

pweil- wants to merge 1 commit into
openshift:masterfrom
pweil-:debug-healthz

Conversation

@pweil-

@pweil- pweil- commented Dec 2, 2015

Copy link
Copy Markdown

Adding some extra debugging to try and reproduce the flakes in #6031.

I was unable to reproduce it locally without running a test script, pausing, and rerunning the same script in another window. This is attempting to list the parent processes that started the openshift command that seems to be causing the failure so I can see what isn't cleaning up nicely

cc @stevekuznetsov @deads2k @php-coder

@pweil-

pweil- commented Dec 2, 2015

Copy link
Copy Markdown
Author

[test]

Comment thread hack/util.sh Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we're going to keep this in test-cmd, s/ensure_no_openshift/check_for_running_openshift/

@pweil-

pweil- commented Dec 2, 2015

Copy link
Copy Markdown
Author

@php-coder @stevekuznetsov - I wasn't planning on keeping this code, just using it to help identify the issue. I'll clean it up if we decide to keep it.

If you guys have an easier way to reproduce this flake please let me know, looks like it didn't hit it in my initial test and I wasn't able to trigger it locally.

@pweil-

pweil- commented Dec 2, 2015

Copy link
Copy Markdown
Author

re[test] - c'mon flake!

@stevekuznetsov

Copy link
Copy Markdown
Contributor

I have no way of reproducing this - locally, when another instance of OpenShift is running I always see this error, but I'm not certain this is what is happening on Jenkins. I don't think it's a terrible idea to get this code in to test-cmd and let it sit there, so the next time we see the flake we have more information about it. We could sit here and kick Jenkins forever but at least the other way it's being more efficient.

@pweil-

pweil- commented Dec 2, 2015

Copy link
Copy Markdown
Author

I don't think it's a terrible idea to get this code in to test-cmd

That's where I'm leaning too.

@php-coder I'm going to clean this up a bit based on suggestions however I don't think pgrep is what I need here. I can use pgrep to find the initial process but what I really need is the parent pid of the process. Will incorporate the other feedback. Thanks!

@pweil- pweil- changed the title [DONOTMERGE] debug healthz wait flakes debug healthz wait flakes Dec 2, 2015
@stevekuznetsov

Copy link
Copy Markdown
Contributor

Looks like you're getting all the flakes you don't want @pweil- ... there was a connectivity issue for which the log is gone, and another manifestation of #6065

@php-coder

Copy link
Copy Markdown

I can use pgrep to find the initial process but what I really need is the parent pid of the process.

@pweil- You are right: I missed the idea of gettig parent PID.

@pweil-

pweil- commented Dec 4, 2015

Copy link
Copy Markdown
Author

@deads2k any objection to this?

@deads2k

deads2k commented Dec 4, 2015

Copy link
Copy Markdown
Contributor

@deads2k any objection to this?

Just confirming: this just displays the information, it doesn't actively kill anything, right?

Do you want to check etcd and openshift for test-integration.sh too?

@stevekuznetsov

Copy link
Copy Markdown
Contributor

@pweil- are we still trying to put this in ?

@pweil-

pweil- commented Dec 14, 2015

Copy link
Copy Markdown
Author

@pweil- are we still trying to put this in ?

Yes, I got caught up with PSP items. Will have this updated today.

@pweil-
pweil- force-pushed the debug-healthz branch 3 times, most recently from a97b93c to 6f4fbdc Compare December 14, 2015 19:11
@pweil-

pweil- commented Dec 14, 2015

Copy link
Copy Markdown
Author

Just confirming: this just displays the information, it doesn't actively kill anything, right?

Do you want to check etcd and openshift for test-integration.sh too?

Yes, no killing, just reporting. Added checks for test-integration.sh. Example output when running e2e with a pause and running test-integration.sh in another window:

Test test/integration -tags='integration !docker etcd' ...

Building test executable...
[INFO] Scanning for openshift related processes already up
[WARNING] Existing openshift processes were detected, this may cause unexpected failures : 
[WARNING] openshift processes detected : 
  PID  PPID CMD
 7875  7866 openshift start --master-config=/tmp/openshift-e2e/openshift.local.config/master/master-config.yaml --node-config=/tmp/openshift-e2e/openshift.local.config/node-192.168.1.125/node-config.yaml --loglevel=4
[WARNING] Parent processes : 
  PID  PPID CMD
 7866  7716 sudo env PATH=hack/../_output/local/bin/linux/amd64:/home/pweil/codebase/vim-go-workspace/bin:/usr/local/go/bin:/home/pweil/codebase/vim-go-workspace/bin:/usr/local/go/bin:/usr/lib64/qt-3.3/bin:/home/pweil/codebase/vim-go-workspace/bin:/usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/pweil/.local/bin:/home/pweil/bin:/home/pweil/codebase/gotools/bin:/home/pweil/bin:/home/pweil/codebase/openshift/src/github.com/openshift/origin/Godeps/_workspace:/home/pweil/codebase/openshift/bin:/home/pweil/codebase/openshift/src/github.com/openshift/origin/_output/local/bin/linux/amd64:/opt/etcd:/home/pweil/codebase/gotools/bin OPENSHIFT_PROFILE=web OPENSHIFT_ON_PANIC=crash openshift start --master-config=/tmp/openshift-e2e/openshift.local.config/master/master-config.yaml --node-config=/tmp/openshift-e2e/openshift.local.config/node-192.168.1.125/node-config.yaml --loglevel=4
 7716 26422 /bin/bash hack/test-end-to-end.sh

I added an extra layer of parent pid reporting as well, it seems to be enough to get all the way up to the shell command.

@liggitt liggitt added the kind/test-flake Categorizes issue or PR as related to test flakes. label Dec 23, 2015
@pweil-

pweil- commented Jan 11, 2016

Copy link
Copy Markdown
Author

anyone have any additional comments or suggestions on this (or better ways of debugging)?

@deads2k

deads2k commented Jan 12, 2016

Copy link
Copy Markdown
Contributor

Can you add a check for the give up case too? I think I'd like to see it was just dead or what.

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 21, 2016
@pweil-

pweil- commented Jan 27, 2016

Copy link
Copy Markdown
Author

Can you add a check for the give up case too? I think I'd like to see it was just dead or what.

Added check in wait_for_url if it fails

@pweil-

pweil- commented Jan 27, 2016

Copy link
Copy Markdown
Author

All - is this still useful or does someone have a better approach or more comments on the code?

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 27, 2016
@pweil-

pweil- commented Jan 28, 2016

Copy link
Copy Markdown
Author
Error from server: error when creating "test/fixtures/failing-dc.yaml": deploymentconfigs "failing-dc" already exists
!!! Error in hack/../hack/../test/end-to-end/core.sh:176
    'oc create -f test/fixtures/failing-dc.yaml' exited with status 1

#5855
#6447

re[test]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 9a6ad13

@openshift-bot

Copy link
Copy Markdown
Contributor

@pweil-

pweil- commented Feb 2, 2016

Copy link
Copy Markdown
Author

bump, any more feedback?

Comment thread hack/util.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pstree?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

will try. This impl doesn't sit well with me but it was the best I had :-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think it's supported to limit depth with pstree but I don't see big downside to showing everything

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$ pstree
-bash: pstree: command not found

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

hrm, that's right. It wasn't available...it's all coming back now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Damn it. Some of the tests I had written for the Bash trap refactor may use pstree. I can refactor.

@pweil- Bash supports recursion so you could do it this way. I've done something similar here: stevekuznetsov@d24fb54#diff-16f1c9b93f0f57f6b11f9b646fcbdaa7R141
If you do that, be careful to correctly scope everything.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

since I really only care about one more level and am formatting it so it doesn't show headers the second time I think I'm ok with it as is unless anyone feels strongly about it.

If not, anything else jumping out or can we shall we get this merged?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For getting one level, this seems fine.

@smarterclayton

Copy link
Copy Markdown
Contributor

Are we even seeing this anymore?

@pweil-

pweil- commented Feb 17, 2016

Copy link
Copy Markdown
Author

haven't seen it in a while and this has had meh response which I think is a good sign. closing but keeping the branch

@pweil- pweil- closed this Feb 17, 2016
@stevekuznetsov

Copy link
Copy Markdown
Contributor

@pweil-

pweil- commented Feb 17, 2016

Copy link
Copy Markdown
Author

gaaaahhhh

@pweil- pweil- reopened this Feb 17, 2016
@pweil-

pweil- commented Feb 17, 2016

Copy link
Copy Markdown
Author

Ok @stevekuznetsov final LGTM is in your hands then!

Comment thread hack/util.sh
local parentsParents=$(ps h -oppid --pid="${1}")
parentsParents="$(echo -e "${parentsParents}" | sed -e 's/^[[:space:]]*//')"
if [[ -n "${parentsParents}" && "${parentsParents}" -ne "0" ]]; then
ps h ww -opid,ppid,cmd --pid="${parentsParents}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Paging @liggitt but I believe everything on ps that has double-dashes is a GNU extension and not OSX compatible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ps on OSX does not have ww or --pid. h has no discernable effect. instead of cmd, it has command

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this is mostly to catch and inform us of flake conditions, let's just disable on OSX.

@stevekuznetsov

Copy link
Copy Markdown
Contributor

LGTM other than GNU extensions on ps for OSX compat. Could refactor to use other tools or just check for darwin arch and not run any of this if we're on that.

@openshift-bot

Copy link
Copy Markdown
Contributor

Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2016
@smarterclayton

Copy link
Copy Markdown
Contributor

We can probably close this, we've updated the wait and added more debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-flake Categorizes issue or PR as related to test flakes. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants