Skip to content

Instantly share code, notes, and snippets.

View smarterclayton's full-sized avatar

Clayton Coleman smarterclayton

View GitHub Profile
==================
WARNING: DATA RACE
Read by goroutine 282:
sync.raceRead()
/usr/lib/golang/src/pkg/sync/race.go:37 +0x35
sync.(*WaitGroup).Add()
/usr/lib/golang/src/pkg/sync/waitgroup.go:60 +0xbe
net/http/httptest.(*waitGroupHandler).ServeHTTP()
/usr/lib/golang/src/pkg/net/http/httptest/server.go:198 +0x5e
net/http.serverHandler.ServeHTTP()
@smarterclayton
smarterclayton / gist:d4145348de9feaf36967
Created January 29, 2015 19:36
NewTestImageOpenShift
handlerContainer := master.NewHandlerContainer(osMux)
_ = master.New(&master.Config{
Client: kubeClient,
EtcdHelper: etcdHelper,
HealthCheckMinions: false,
KubeletClient: kubeletClient,
APIPrefix: "/api/v1beta1",
RestfulContainer: handlerContainer,
})
_ = master.New(&master.Config{
Client: kubeClient,
EtcdHelper: etcdHelper,
HealthCheckMinions: false,
KubeletClient: kubeletClient,
APIPrefix: "/api/v1beta1",
@smarterclayton
smarterclayton / oscstatus-1
Last active August 29, 2015 14:17
example osc status
In project foo
service frontend.foo.local port 80 -> 8080 (172.121.17.2)
routing www.cdrom.com, frontend.router.openshift.mycompany.com
ruby-helloworld deploys image openshift/origin-ruby-sample:latest <- https://github.com/mfojtik/ruby-sample.git
build 345 started 3 minutes ago (3498755: Added license (Psju33100) authored by jdoe)
#3 deployed 1 day ago - 97% of 305 pods running on 40 nodes
service backend.foo.local port 3306 (172.121.17.5)
db-shard-east deploys image openshift/origin-mysql:latest manually
https://github.com/cockroachdb/cockroach/pull/615#discussion_r28082815
@smarterclayton
smarterclayton / gist:17ff2e6747330d45e483
Last active February 12, 2016 06:15
Things wrong in vs.code
* code complete appears in comments
* font weight is wrong / change font
* colors of comment section are bad
* ONE FOLDER ARE YOU KIDDING ME
* double click in string includes quotes
* find and replace all???
$ oc init
On branch init @ 3082f62 with remote [email protected]:openshift/origin.git
When initializing a repository, you can choose how you want to develop:
1. Build from your local code using a binary build (--binary)
This is the simplest setup. Your local code will be uploaded on each build, but you won't
be able to rebuild without uploading your code again. Best used when you're testing out a
build locally.
if quota := v.CPUQuota; quota > 0 {
if quota < 1000 {
quota = 1000 // minQuotaPeriod
}
milliCPU := quota * 1000 // milliCPUtoCPU
milliCPU = milliCPU / 100000 // quotaPeriod
c.Resources.Limits[kapi.ResourceCPU] = resource.NewMilliQuantity(milliCPU, resource.DecimalSI)
}
if shares := v.CPUShares; shares > 0 {
if shares < 2 {
containerStatuses:
- containerID: docker://ea97f6892b943529e02adf81990bea0b83dea002a4895b027f62dfdb5ef0e91b
image: openshift/origin-docker-registry:v1.3.0-alpha.3
imageID: docker://sha256:98e3a96eb8f8080155b72ba196071a302eb8763d47719a9ccfe776986b3a85ab
lastState:
terminated:
containerID: docker://b7f1609ffe5d1e4fd02343bd57536c4f0fc962cf1ad79c6d53c8b175ff258f0d
exitCode: 2
finishedAt: 2016-08-24T11:46:30Z
reason: Error
*** before stupid
+ kube::test::if_has_string 'Error from server: pods "abc" not found' List
+ local 'message=Error from server: pods "abc" not found'
+ local match=List
++ echo 'Error from server: pods "abc" not found'
++ grep List
+ [[ -n '' ]]
+ echo 'FAIL!'
FAIL!