Skip to content

Instantly share code, notes, and snippets.

/home/rmeggins/viaq/watches-cli(master)>python --version
Python 2.7.13
/home/rmeggins/viaq/watches-cli(master)>python3 --version
Python 3.5.3
/home/rmeggins/viaq/watches-cli(master)>rpm -qa|grep virtualenv
python2-virtualenv-15.0.3-2.fc25.noarch
/home/rmeggins/viaq/watches-cli(master)>virtualenv --python=python3 .venv
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/rmeggins/viaq/watches-cli/.venv/bin/python3
@richm
richm / esdups.json
Created February 7, 2017 18:43
es duplicates
{
"_id": "AVoZ0Rq0x2ogvT0Q6AbG",
"_index": "project.this-is-project-04.namespaceid.2017.02.07",
"_score": 1.0,
"_source": {
"@timestamp": "2017-02-07T18:22:52.933911+00:00",
"UNKNOWN1": "1",
"UNKNOWN2": "2",
"hostname": "localhost",
"kubernetes": {
[2016-10-13 15:30:04,779][DEBUG][io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter] [Ringer] Handling Request...
[2016-10-13 15:30:04,779][DEBUG][io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter] [Ringer] Evaluating request for user '' with a empty token
[2016-10-13 15:30:04,779][DEBUG][io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter] [Ringer] Cache has user: false
[2016-10-13 15:30:04,779][DEBUG][io.fabric8.elasticsearch.plugin.KibanaUserReindexFilter] Handling Request in Kibana User Reindex filter...
[2016-10-13 15:30:04,779][DEBUG][io.fabric8.elasticsearch.plugin.KibanaUserReindexFilter] Received user '' and index '', checking for kibana index '.kibana'
[2016-10-13 15:30:04,807][DEBUG][io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter] [Ringer] Handling Request...
[2016-10-13 15:30:04,807][DEBUG][io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter] [Ringer] Evaluating request for user '' with a empty token
[2016-10-13 15:30:04,807][DEBUG][io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter
# ausearch -ts recent -m avc
----
time->Tue Feb 23 20:09:26 2016
type=SYSCALL msg=audit(1456258166.390:135): arch=c000003e syscall=2 success=no exit=-13 a0=7ffc5ab7df59 a1=80000 a2=1b6 a3=21000 items=0 ppid=1033 pid=13577 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="iptables-restor" exe="/usr/sbin/xtables-multi" subj=system_u:system_r:iptables_t:s0 key=(null)
type=AVC msg=audit(1456258166.390:135): avc: denied { open } for pid=13577 comm="iptables-restor" path="/tmp/kube-temp-iptables-restore-850979159" dev="vda1" ino=16818306 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:init_tmp_t:s0 tclass=file
----
time->Tue Feb 23 20:09:26 2016
type=SYSCALL msg=audit(1456258166.453:137): arch=c000003e syscall=2 success=no exit=-13 a0=7ffc5a3a5f59 a1=80000 a2=1b6 a3=21000 items=0 ppid=1033 pid=13584 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="iptables-restor" exe="/usr/sbin/xtable
# cat /etc/systemd/system/multi-user.target.wants/openshift.service
[Unit]
Description=OpenShift All-In-One server
After=network.target
After=docker.service
Requires=network.target
Requires=docker.service
[Service]
Type=simple
# oc describe dc/docker-registry
Name: docker-registry
Created: About an hour ago
Labels: docker-registry=default
Annotations: <none>
Latest Version: 1
Triggers: Config
Strategy: Rolling
Template:
Selector: docker-registry=default
I0223 16:45:16.436816 1 common.go:134] Running post commit hook with image test/ruby-sample-build-1:b192773d ...
/bin/sh: bundle: command not found
F0223 16:45:22.239957 1 builder.go:204] Error: build error: container "openshift_s2i-build_ruby-sample-build-1_test_post-commit" returned non-zero exit code: 127
When it works, this is the docker command:
docker run -it --rm --privileged -v /home/rmeggins/bitscout/efk-atomicapp/run:/atomicapp -v /run:/run -v /:/host \
--net=host --name efk-atomicapp -e NAME=efk-atomicapp -e IMAGE=bitscout/efk-atomicapp \
bitscout/efk-atomicapp -v run /atomicapp
This is the RUN label added by the commit:
RUN="docker run --rm \${OPT1} --privileged -v `pwd`:/atomicapp -v /run:/run -v /:/host --net=host --name \${NAME} -e NAME=\${NAME} -e IMAGE=\${IMAGE} \${IMAGE} -v \${OPT2} run \${OPT3} \${IMAGE}"
When it fails using the above, this is the docker command:
diff --git a/.fixtures.yml b/.fixtures.yml
index 34dd37c..862ed07 100644
--- a/.fixtures.yml
+++ b/.fixtures.yml
@@ -6,7 +6,6 @@ fixtures:
'mysql':
repo: 'git://github.com/puppetlabs/puppetlabs-mysql.git'
ref: 'origin/2.2.x'
- 'openstacklib': 'git://github.com/stackforge/puppet-openstacklib.git'
'stdlib': 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
diff --git a/lib/puppet/provider/openstack.rb b/lib/puppet/provider/openstack.rb
index 4fcd377..2be4d5b 100644
--- a/lib/puppet/provider/openstack.rb
+++ b/lib/puppet/provider/openstack.rb
@@ -1,4 +1,5 @@
require 'puppet'
+require 'csv'
class Puppet::Error::OpenstackRequestError < Puppet::Error
end