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

Add crt file env var #152

Merged
merged 2 commits into from
Aug 23, 2017
Merged

Add crt file env var #152

merged 2 commits into from
Aug 23, 2017

Conversation

gabemontero
Copy link
Contributor

Fixes #151

also universally formats all files, replacing tabs with spaces, in separate commit

@openshift/devex @dnguyen9 fyi

@gabemontero
Copy link
Contributor Author

[test]

@@ -49,7 +49,16 @@ private Auth(Collection<X509Certificate> certs, TaskListener listener,
public static Auth createInstance(TaskListener listener, String apiURL,
Map<String, String> env) throws RuntimeException {
Auth auth = null;
File f = new File(CERT_FILE);
File f = null;
// first see if customer override cert file location
Copy link
Contributor

Choose a reason for hiding this comment

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

s/customer/user/

if (certFile != null && certFile.trim().length() > 0) {
f = new File(certFile.trim());
}
// if did not override, or if provided bad value, use default
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not sold on falling back to the default if the file doesn't exist. at a minimum something needs to be logged if we do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed ... pushing restructure momentarily

@gabemontero gabemontero force-pushed the add-crt-file-env-var branch from 9c7664a to 6122479 Compare August 23, 2017 17:02
@gabemontero
Copy link
Contributor Author

response to comments pushed

@@ -320,7 +335,7 @@ public static String deriveBearerToken(String at, TaskListener listener,
* e.printStackTrace(listener.getLogger()); } } return deriveBearerToken(at,
* listener, verbose, vars, env); }
*/
public static String deriveCA(String ca, TaskListener listener,
/*public static String deriveCA(String ca, TaskListener listener,
Copy link
Contributor

Choose a reason for hiding this comment

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

what's w/ the commented out code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the method is at the moment not getting called .... but I decided to leave it in as a reference just in case it might be needed at some point

but i don't feel strongly about it, and can just delete if you prefer

Copy link
Contributor

Choose a reason for hiding this comment

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

if you think it's a useful reference i'm fine w/ leaving it.

@openshift-bot
Copy link

Evaluated for jenkins plugin test up to 6122479

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

lgtm

@openshift-bot
Copy link

continuous-integration/openshift-jenkins-plugin/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_jenkins_plugin/7/) (Base Commit: ddcc18a) (PR Branch Commit: 6122479)

@gabemontero
Copy link
Contributor Author

Hmm ... looks like we need to change the focus for the jenkins plugin ext test job. It is picking up a bunch of tests:

Random Seed: 1503510952 - Will randomize all specs
Will run 815 specs

The 12 tests we traditionally ran for this plugin passed:

Ran 12 of 815 Specs in 1814.118 seconds
SUCCESS! -- 12 Passed | 0 Failed | 0 Pending | 803 Skipped 

Ginkgo ran 1 suite in 30m15.093210273s
Test Suite Passed

But then we get a bunch of skipping tests not in the Origin conformance suite and it bombs the run.

Going to merge this based on our tests in question passing, and look into the plugin test job separately.

@gabemontero gabemontero merged commit 98733f5 into master Aug 23, 2017
@gabemontero gabemontero deleted the add-crt-file-env-var branch August 23, 2017 18:44
@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

might have been a victim of my recent refactor in this space:
https://github.com/openshift/origin/pull/15848/files

how is the test job invoking ginkgo?

@gabemontero
Copy link
Contributor Author

yeah probably is ... it is doing a make test-extended ...

see https://github.com/openshift/aos-cd-jobs/blob/master/sjb/config/test_cases/test_branch_jenkins_plugin.yml#L19

@gabemontero
Copy link
Contributor Author

all 4 plugins leverage a make test-extended ... with some FOCUS

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

as long as they are setting FOCUS it should just keep working the way it was (unless I screwed something up)

do you see this output?
https://github.com/openshift/origin/pull/15848/files#diff-21c58c923d55767e64fef3ecfd640ac0R15

@gabemontero
Copy link
Contributor Author

Here it is: [INFO] Running parallel tests N=<default> with focus openshift pipeline plugin

@gabemontero
Copy link
Contributor Author

And then right after the 12 tests we wanted run finish, we see this:

[INFO] Running serial tests with focus openshift pipeline plugin

And that is when the failed tests, saying it is skipping, etc. happen.

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

not clear to me what actually bombed the run, i don't think the skipping tests is the issue. It looks like it ran exactly 12 tests (in parallel) and no tests for serial.

Ran 0 of 815 Specs in 0.049 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 815 Skipped Aug 23 14:26:11.207: INFO: Error running cluster/log-dump.sh: fork/exec /data/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/cluster/log-dump.sh: no such file or directory
PASS

Ginkgo ran 1 suite in 493.746233ms
Test Suite Passed

Where things failed is:

[INFO] [CLEANUP] Beginning cleanup routines...
[INFO] [CLEANUP] Dumping cluster events to _output/scripts/core/artifacts/events.txt
unexpected top level element in /data/src/github.com/openshift/origin/_output/scripts/core/artifacts/build-job-clone.xml: flow-definition
[ERROR] PID 41184: test/extended/setup.sh:251: `"$( os::util::find::built_binary junitmerge )" "${TEST_REPORT_DIR}"/*.xml > "${output}"` exited with status 1.
[INFO] 		Stack Trace: 
[INFO] 		  1: test/extended/setup.sh:251: `"$( os::util::find::built_binary junitmerge )" "${TEST_REPORT_DIR}"/*.xml > "${output}"`
[INFO] 		  2: test/extended/setup.sh:26: os::test::extended::merge_junit
[INFO] 		  3: test/extended/core.sh:9: os::test::extended::focus
[INFO]   Exiting with code 1.
Logged into "https://ip-172-18-11-115.ec2.internal:8443" as "system:admin" using existing credentials.

You have access to the following projects and can switch between them with 'oc project <projectname>':

  * default
    extended-test-jenkins-plugin-43d6q-1tzhj-jenkins
    extended-test-jenkins-plugin-t0m78-qw7z3-multitag-target
    kube-public
    kube-system
    logging
    management-infra
    openshift
    openshift-infra

Using project "default".
[INFO] [CLEANUP] Dumping container logs to _output/scripts/core/logs/containers
[INFO] [CLEANUP] Truncating log files over 200M
[INFO] [CLEANUP] Stopping docker containers
[INFO] [CLEANUP] Removing docker containers
Error response from daemon: You cannot remove a running container 7183d69e2932d12449ef599239f2ac14f32a76c48babcb6815515e17cd297556. Stop the container before attempting removal or use -f
Error response from daemon: You cannot remove a running container 1b25d5216ee8621fd5c0e9fc87f8ed554d001792b6e01301945960b4e0869942. Stop the container before attempting removal or use -f
Error response from daemon: You cannot remove a running container a8e20d7ddd2ec475b07855a2a8705c2ce7c2ca8b4d5ee95ba71b11c0671f2d69. Stop the container before attempting removal or use -f
Error response from daemon: You cannot remove a running container 32a1ac202bbfcc1f4e061d1cc6eea236a32516597b8f71350da03f855f778d2a. Stop the container before attempting removal or use -f
[INFO] [CLEANUP] Killing child processes
[INFO] [CLEANUP] Pruning etcd data directory
rm: cannot remove ‘/tmp/etcd/member’: Permission denied
[ERROR] test/extended/core.sh exited with code 1 after 00h 31m 20s
make: *** [test-extended] Error 1

Which seems like a question for @stevekuznetsov

It is possible that running 0 tests in a suite confuses the junit gathering, but i don't think that's the issue.

@stevekuznetsov
Copy link
Contributor

We're using junitmerge wrong there -- it's trying to merge /data/src/github.com/openshift/origin/_output/scripts/core/artifacts/build-job-clone.xml which has the following contents:

<?xml version='1.0' encoding='UTF-8'?>                                                                                                                                                                                                                         
<flow-definition plugin="workflow-job@2.8">                                                                                                                                                                                                                    
  <actions/>                                                                                                                                                                                                                                                   
  <description></description>                                                                                                                                                                                                                                  
  <keepDependencies>false</keepDependencies>                                                                                                                                                                                                                   
  <properties>                                                                                                                                                                                                                                                 
    <io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty plugin="openshift-sync@0.1.1">                                                                                                                                                                
      <uid></uid>                                                                                                                                                                                                                                              
      <namespace></namespace>                                                                                                                                                                                                                                  
      <name></name>                                                                                                                                                                                                                                            
      <resourceVersion></resourceVersion>                                                                                                                                                                                                                      
    </io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty>                                                                                                                                                                                             
    <org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>                                                                                                                                                                                
      <triggers/>                                                                                                                                                                                                                                              
    </org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>                                                                                                                                                                               
  </properties>                                                                                                                                                                                                                                                
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.22">                                                                                                                                                         
    <script>node{                                                                                                                                                                                                                                              
    openshiftBuild namespace: &apos;extended-test-jenkins-plugin-1sbd4-c3psz&apos;, bldCfg: &apos;frontend&apos;, buildName: &apos;frontend-1&apos;, showBuildLogs: &apos;false&apos;, verbose: &apos;true&apos;                                                                                     
}</script>                                                                                                                                                                                                                                                     
    <sandbox>true</sandbox>
  </definition>
  <triggers/>
</flow-definition>

@stevekuznetsov
Copy link
Contributor

I'm not super familiar with the junitmerge stuff but it looks like a globbing issue -- @bparees you mind taking a look?

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

well this is what we're globbing:

"$( os::util::find::built_binary junitmerge )" "${TEST_REPORT_DIR}"/*.xml > "${output}"

i don't know what's normally in the dir to make the glob more specific.

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

(that is in test/extended/setup.sh)

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

incidentally that blob of code references that it is needed until jenkinsci/junit-plugin#54 is merged, but jenkinsci/junit-plugin#54 is merged.

https://github.com/openshift/origin/blob/master/test/extended/setup.sh#L242-L255

so maybe we can just dump it?

@stevekuznetsov
Copy link
Contributor

We can make "${TEST_REPORT_DIR}" more specific I guess

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

@stevekuznetsov i only see it being set in one place and it's explicitly set to the artifact dir

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

opened issue openshift/origin#15943

@stevekuznetsov
Copy link
Contributor

Right, I'm saying we should set it to a subdir so we can be more specific in the globbing

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.

4 participants