Skip to content

Instantly share code, notes, and snippets.

View stevekuznetsov's full-sized avatar

Steve Kuznetsov stevekuznetsov

  • Red Hat, Inc.
  • United States
View GitHub Profile
@stevekuznetsov
stevekuznetsov / output.txt
Created October 2, 2015 19:27
hack/test-cmd.sh output
$ hack/test-cmd.sh
openshift: openshift v1.0.6-318-gf934c42-dirty kubernetes v1.1.0-alpha.1-653-g86b4e77
[INFO] Create certificates for the OpenShift server to /tmp/openshift-cmd/PnHp/openshift.local.config/master
Generated new key pair as /tmp/openshift-cmd/PnHp/openshift.local.config/master/serviceaccounts.public.key and /tmp/openshift-cmd/PnHp/openshift.local.config/master/serviceaccounts.private.key
Generating node credentials ...
Created node config for 127.0.0.1 in /tmp/openshift-cmd/PnHp/openshift.local.config/node-127.0.0.1
Wrote master config to: /tmp/openshift-cmd/PnHp/openshift.local.config/master/master-config.yaml
Generating node credentials ...
Created node config for 127.0.0.1 in /tmp/openshift-cmd/PnHp/openshift.local.config/node-127.0.0.1
@stevekuznetsov
stevekuznetsov / output.txt
Created October 2, 2015 19:32
hack/test-cmd.sh profile output
$ PROFILE=true hack/test-cmd.sh
openshift: openshift v1.0.6-318-gf934c42-dirty kubernetes v1.1.0-alpha.1-653-g86b4e77
[INFO] Create certificates for the OpenShift server to /tmp/openshift-cmd/So6X/openshift.local.config/master
2015-10-02 15:27:28.125314 I | profile: cpu profiling enabled, cpu.pprof
2015-10-02 15:27:28.160002 I | profile: cpu profiling enabled, cpu.pprof
Generated new key pair as /tmp/openshift-cmd/So6X/openshift.local.config/master/serviceaccounts.public.key and /tmp/openshift-cmd/So6X/openshift.local.config/master/serviceaccounts.private.key
2015-10-02 15:27:32.814164 I | profile: cpu profiling enabled, cpu.pprof
Generating node credentials ...
Created node config for 127.0.0.1 in /tmp/openshift-cmd/So6X/openshift.local.config/node-127.0.0.1
2015-10-02 15:27:34.172681 I | profile: cpu profiling enabled, cpu.pprof
@stevekuznetsov
stevekuznetsov / output.txt
Last active October 2, 2015 21:44
hack/test-cmd verbose profile
$ VERBOSE=true hack/test-cmd.sh
openshift: openshift v1.0.6-337-ge179b38 kubernetes v1.1.0-alpha.1-653-g86b4e77
[INFO] Create certificates for the OpenShift server to /tmp/openshift-cmd/Mbh6/openshift.local.config/master
Generated new key pair as /tmp/openshift-cmd/Mbh6/openshift.local.config/master/serviceaccounts.public.key and /tmp/openshift-cmd/Mbh6/openshift.local.config/master/serviceaccounts.private.key
Generating node credentials ...
Created node config for 127.0.0.1 in /tmp/openshift-cmd/Mbh6/openshift.local.config/node-127.0.0.1
Wrote master config to: /tmp/openshift-cmd/Mbh6/openshift.local.config/master/master-config.yaml
Generating node credentials ...
Created node config for 127.0.0.1 in /tmp/openshift-cmd/Mbh6/openshift.local.config/node-127.0.0.1
@stevekuznetsov
stevekuznetsov / dump.txt
Created October 6, 2015 18:54
openldap debug dump
This file has been truncated, but you can view the full file.
$ docker run -e OPENLDAP_DEBUG_LEVEL=-1 openshift/openldap-2441-centos7
+ ulimit -n 1024
+ OPENLDAP_ROOT_PASSWORD=admin
+ OPENLDAP_ROOT_DN_RREFIX=cn=Manager
+ OPENLDAP_ROOT_DN_SUFFIX=dc=example,dc=com
+ OPENLDAP_DEBUG_LEVEL=-1
+ '[' '!' -f /etc/openldap/CONFIGURED ']'
++ id
++ grep -Po '(?<=uid=)\d+'
+ user=0
@stevekuznetsov
stevekuznetsov / branch-dependent-openldap-builds.json
Created October 8, 2015 13:48
branch dependent openldap build chain
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "openldap",
"creationTimestamp": null,
"annotations": {
"description": "OpenLDAP build and test build",
"tags": "openldap"
}
$ oc get pods
NAME READY STATUS RESTARTS AGE
openldap-base-2-build 0/1 Error 0 8m
$ oc logs openldap-base-2-build --loglevel=1000
I1008 10:02:47.569776 18420 debugging.go:101] curl -k -v -XGET -H "User-Agent: oc/v1.1.0 (linux/amd64) kubernetes/86b4e77" -H "Authorization: Bearer Dk1R1IqTz57qWUHxdbtZ31SA2x1MFyOOPMaNTb5440Y" https://localhost:8443/api
I1008 10:02:47.583678 18420 debugging.go:120] GET https://localhost:8443/api 200 OK in 13 milliseconds
I1008 10:02:47.583701 18420 debugging.go:126] Response Headers:
I1008 10:02:47.583707 18420 debugging.go:129] Cache-Control: no-store
I1008 10:02:47.583712 18420 debugging.go:129] Content-Type: application/json
I1008 10:02:47.583718 18420 debugging.go:129] Date: Thu, 08 Oct 2015 14:02:47 GMT
@stevekuznetsov
stevekuznetsov / govet.sh
Created October 15, 2015 14:11
hack-verify-govet.sh
#!/bin/bash
set -o nounset
set -o pipefail
function exit_func() {
echo "exiting from $?"
}
trap exit_func EXIT
HOSTNAME=7c783e03c16c
TERM=xterm
OLDPWD=/root/go/src/github.com/openshift/origin
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35
@stevekuznetsov
stevekuznetsov / test.sh
Created November 5, 2015 14:43
MWE for fail
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
source test/cmd/util.sh
output=$(expect_code 'exit 1' '0' 2>&1 || true)
I1215 15:15:13.013107 1 builder.go:41] $BUILD env var is {"kind":"Build","apiVersion":"v1","metadata":{"name":"openldap-1","namespace":"openldap","selfLink":"/oapi/v1/namespaces/openldap/builds/openldap-1","uid":"a2d05caa-a33e-11e5-88da-54ee753e2644","resourceVersion":"309","creationTimestamp":"2015-12-15T15:15:11Z","labels":{"buildconfig":"openldap","name":"openldap","openshift.io/build-config.name":"openldap"},"annotations":{"openshift.io/build.number":"1"}},"spec":{"serviceAccount":"builder","source":{"type":"Git","git":{"uri":"git://github.com/openshift/origin.git","ref":"master"},"contextDir":"images/openldap"},"strategy":{"type":"Docker","dockerStrategy":{"from":{"kind":"DockerImage","name":"openshift/openldap-2441-centos7@sha256:b70177b808d84eeddde8ea6ebc0c8b27a03027e80f69e655c4ca3f6920db2a25"}}},"output":{"to":{"kind":"DockerImage","name":"172.30.173.179:5000/openldap/openldap-testenv:latest"},"pushSecret":{"name":"builder-dockercfg-jpsmj"}},"resources":{}},"status":{"phase":"New","outputDockerI