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
$ hack/test-go.sh pkg/generate/git/
==================
WARNING: DATA RACE
Read by goroutine 12:
github.com/openshift/origin/pkg/generate/git.timedCommand()
github.com/openshift/origin/pkg/generate/git/_test/_obj_test/repository.go:479 +0x19b6
github.com/openshift/origin/pkg/generate/git.TestListRemoteTimeout.func2()
/home/stevekuznetsov/go/src/github.com/openshift/origin/pkg/generate/git/list_remote_timeout_test.go:25 +0x173
Previous write by goroutine 13:
@stevekuznetsov
stevekuznetsov / test-integration.sh
Created April 18, 2016 17:58
integration test using vagrant-openshift
rm -rf * .vagrant
vagrant origin-local-checkout --replace
if [ -n "$ORIGIN_PULL_ID" ]; then
set +x
echo "
*****Locally Merging Pull Request: https://github.com/openshift/origin/pull/$ORIGIN_PULL_ID"
set -x
test_pull_requests --local_merge_pull_request $ORIGIN_PULL_ID --repo origin --config ~/.test_pull_requests_origin.json
fi
SUCCESS after 254.870s: test/cmd/newapp.sh:226: executing 'oc new-app installable:file --loglevel=8' expecting failure
There was no output from the command.
Standard error from the command:
I0413 10:39:37.537463 2135 loader.go:242] Config loaded from file /tmp/openshift/test-cmd//openshift.local.home/.kube/non-default-config
I0413 10:39:37.537835 2135 round_trippers.go:264] GET https://127.0.0.1:28443/oapi
I0413 10:39:37.537840 2135 round_trippers.go:271] Request Headers:
I0413 10:39:37.537843 2135 round_trippers.go:274] Accept: application/json, */*
I0413 10:39:37.537845 2135 round_trippers.go:274] User-Agent: oc/v1.1.6 (linux/amd64) openshift/baf4504
I0413 10:39:37.537848 2135 round_trippers.go:274] Authorization: Bearer S39FEmvjES6lLHjp6xjTAuzZ9QnkL1tiF2GxDEIx_LU
I0413 10:39:37.560351 2135 round_trippers.go:289] Response Status: 200 OK in 22 milliseconds
SUCCESS after 254.602s: test/cmd/newapp.sh:226: executing 'oc new-app installable:file' expecting failure
There was no output from the command.
Standard error from the command:
error: installing "installable:file" requires that you grant the image access to run with your credentials
WARNING: This will allow the pod to act as you across the entire cluster - ensure you
trust the image with those permissions before you continue.
You can see more information about the image by adding the --dry-run flag.
If you trust the provided image, include the flag --grant-install-rights.
@stevekuznetsov
stevekuznetsov / log.txt
Created April 13, 2016 14:22
SUCCESS after 254.700s: test/cmd/newapp.sh:225: executing 'oc new-app installable:file' expecting failure
I0413 10:12:50.065022 11763 helper.go:335] Image metadata already filled for sha256:33955e1cbbaa7c1ec046e1ba056c893dbb13ec47eb9d4c67e26044ac7286ae7e
I0413 10:12:50.071321 11763 rest.go:250] updated stream {"name":"installable","namespace":"cmd-newapp","uid":"cdd8acd3-0181-11e6-8458-54ee753e2644","resourceVersion":"555","generation":1,"creationTimestamp":"2016-04-13T14:12:49Z","Spec":{"DockerImageRepository":"","Tags":{"file":{"Name":"file","Annotations":{"io.openshift.generate.job":"true","io.openshift.generate.token.as":"file:/var/run/openshift.secret.token"},"From":{"kind":"DockerImage","name":"openshift/origin:v1.0.6"},"Reference":false,"Generation":
A: 1,"ImportPolicy":{"Insecure":false,"Scheduled":false}},"latest":{"Name":"latest","Annotations":null,"From":{"kind":"ImageStreamTag","name":"installable:token"},"Reference":false,"Generation":1,"ImportPolicy":{"Insecure":false,"Scheduled":false}},"no-token":{"Name":"no-token","Annotations":{"io.openshift.generate.job":"true"},"From":{"kind":"DockerImage
@stevekuznetsov
stevekuznetsov / resourcefor.go
Created March 21, 2016 17:04
getting resource name
var groupVersionResource unversioned.GroupVersionResource
resource := strings.ToLower(hpa.Spec.ScaleRef.Kind)
if groupVersion, err := unversioned.ParseGroupVersion(hpa.Spec.ScaleRef.APIVersion); err == nil {
groupVersionResource = groupVersion.WithResource(resource)
} else {
groupVersionResource = unversioned.GroupVersionResource{Resource: resource}
}
groupVersionResource, err := registered.RESTMapper().ResourceFor(groupVersionResource)
if err != nil {
@stevekuznetsov
stevekuznetsov / output.txt
Created March 15, 2016 18:32
shellcheck on util
In hack/util.sh line 75:
--write-config=${SERVER_CONFIG_DIR} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In hack/util.sh line 87:
os::util::sed "s/:4001$/:${ETCD_PORT}/g" ${SERVER_CONFIG_DIR}/master/master-config.yaml
^-- SC2086: Double quote to prevent globbing and word splitting.
@stevekuznetsov
stevekuznetsov / tput.sh
Last active March 11, 2016 20:20
messing with lines
#!/bin/bash
# os::text::save_cursor saves the current cursor position if it is called in a TTY
# to allow us to provide os::text::clear_from_saved_cursor
function os::text::save_cursor() {
if [ -t 1 ]; then
tput sc
fi
}
@stevekuznetsov
stevekuznetsov / shadow.go
Created February 24, 2016 18:08
shadowing
package main
func main() {
a, err := someFunc()
if err != nil {
return
}
if err := someOtherFunc(a); err != nil { // this `err` is not aliasing `err` in the outer scope
return
$ UPSTREAM_REMOTE=upstream hack/cherry-pick.sh 21265
++ Generating patch for 22ad56ddeda7bfd71714ab12b721c28336028987...49f1193126b92158ee089a7bcf91fca7ff6956e5 onto f0cd09a ...
fatal: Cannot update paths and switch to branch 'last_upstream_branch' at the same time.
Did you intend to checkout 'f0cd09a' which can not be resolved as commit?
!!! Error in hack/cherry-pick.sh:51
'git checkout -b last_upstream_branch "${lastrev}"' exited with status 128
Call stack:
1: hack/cherry-pick.sh:51 main(...)
Exiting with status 1