Skip to content

Instantly share code, notes, and snippets.

View kohsuke's full-sized avatar
🏠
WFH

Kohsuke Kawaguchi kohsuke

🏠
WFH
View GitHub Profile
@kohsuke
kohsuke / CGit
Created May 21, 2015 23:17
Failure mode
Started by user anonymous
Building in workspace /files/kohsuke/ws/jenkins/git-plugin/work/workspace/error
Fetching changes from the remote Git repository
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/cloudbees/jce.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:737)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:985)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1018)
at hudson.scm.SCM.checkout(SCM.java:488)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1253)
@kohsuke
kohsuke / gist:5e31e36b4e6f78a3ff64
Last active August 29, 2015 14:20
Confluence outage 2015/05/04
"confluence-diff-7075" prio=10 tid=0x00007f817cf8b000 nid=0x7af0 runnable [0x00007f814fbfa000]
java.lang.Thread.State: RUNNABLE
at org.apache.commons.jrcs.diff.myers.MyersDiff.buildPath(MyersDiff.java:153)
at org.apache.commons.jrcs.diff.myers.MyersDiff.diff(MyersDiff.java:93)
at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:197)
at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:185)
at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:165)
at com.atlassian.confluence.diff.DeltaRanker.getChangeRanking(DeltaRanker.java:27)
at com.atlassian.confluence.diff.LineRanker.getIndexOfSmallestChange(LineRanker.java:30)
at com.atlassian.confluence.diff.LineLevelDiffer.getChunksForChangedLines(LineLevelDiffer.java:215)
@kohsuke
kohsuke / README.md
Last active August 29, 2015 14:20
Mirrorbrain not serving from fallback

With MirrorBrainDebug On, this is an example of successful redirection:

[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] MirrorBrainEngine On, mirror_base '/srv/releases/jenkins/'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] URI: '/plugins/ldap/1.11/ldap.hpi'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] filename: '/srv/releases/jenkins/plugins/ldap/1.11/ldap.hpi'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] clientip: 85.90.76.97
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] Country 'NL', Continent 'EU'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] AS '--', Prefix '--', lat/lng 0.000000,0.000000 state id (null), state '(null)'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] Canonicalized file on disk: /srv/releases/hudson/plugins/ldap/1.11/ldap.hpi
/*
* Copyright 2007,2008,2009,2010 Peter Poeml / Novell Inc.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
<j:jelly .... xmlns:local="local">
<d:taglib uri="local">
<d:tag name="radio">
...
${attrs.name}
</d:tag>
</d:taglib>
[20:11:47] *** josb has joined #jenkins
[20:13:18] <josb> Hi. In the lastest Workflow plugin, 'currentBuild.result = "SUCCESS"' after a failed job doesn't seem to do anything, despite JENKINS-26834. Fyi.
[20:13:20] <jenkins-admin> JENKINS-26834:Direct access to contextual [Workflow]Run (Resolved) https://issues.jenkins-ci.org/browse/JENKINS-26834
[20:14:05] <kohsuke> josb: I think it's Jenkins' core thing. If somebody sets the build as a failure you can't set it back to success
[20:14:09] <kohsuke> josb: what's your use case?
[20:16:30] <josb> kohsuke: I tried to avoid a wrapper build to trigger a build failure of the current build. But then I discovered 'propagate: false' which works for my purpose (thanks for that!)
[20:17:18] <josb> So now I call 'build job: 'foo', propagate: false" inside my main workflow and all is well.
[20:18:11] <josb> My earlier attempt was to set 'currentBuild.result = "SUCCESS" after wrapping the build in a catchError block, but that doesn't work, hence my comment.
[20:18:39] <kohs
catchError {
try {
parallel(
dummy1: { build job: 'dummy1' },
dummy2: { build job: 'dummy2' }, // fails
)
} catch(_) {
}
}
diff --git a/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java b/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java
index fc6e6f7..34afdae 100644
--- a/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java
+++ b/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java
@@ -104,7 +104,7 @@ public abstract class EC2ComputerLauncher extends ComputerLauncher {
logger.println(msg);
}
- launch(computer, logger, computer.describeInstance());
+ launch(computer, listener, computer.describeInstance());
@kohsuke
kohsuke / gist:84ce815d0a8ad85ecaf6
Last active August 29, 2015 14:12
nvidia problem
Dec 23 23:28:17 rescue kernel: [ 20.544453] nvidia 0000:01:00.0: irq 52 for MSI/MSI-X
Dec 23 23:28:18 rescue kernel: [ 21.684832] r8169 0000:03:00.0 eth0: link up
Dec 23 23:28:18 rescue kernel: [ 21.684837] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Dec 23 23:30:56 rescue kernel: [ 179.437927] NVRM: GPU at PCI:0000:01:00: GPU-bc0fa0b9-cac2-f507-b715-9bebdb69c71e
Dec 23 23:30:56 rescue kernel: [ 179.437933] NVRM: Xid (PCI:0000:01:00): 32, Channel ID 00000005 intr 00008000
Dec 23 23:30:56 rescue kernel: [ 179.438803] NVRM: Xid (PCI:0000:01:00): 69, Class Error: ChId 0005, Class 0000a097, Offset 00000d9c, Data ffffffff, ErrorCode 0000000c
Dec 23 23:32:23 rescue kernel: [ 266.469093] NVRM: Xid (PCI:0000:01:00): 69, Illegal Class Error: ChID 0007, Class 00000000, Offset 00001220, Data 3054a400
Dec 23 23:32:27 rescue kernel: [ 270.439207] NVRM: Xid (PCI:0000:01:00): 62, 0096(1c54) 00000000 00000000
Dec 23 23:32:44 rescue kernel: [ 287.807583] NVRM: os_schedule: Attempted to yield the CPU wh