Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ptrlv on github.
  • I am ptrlv (https://keybase.io/ptrlv) on keybase.
  • I have a public key ASDYAJhkHKUFyQJZX50z1WvL2Ses6rMMilOOD723qajZtwo

To claim this, I am signing this object:

@ptrlv
ptrlv / gist:4a8768c55a58b10a3a8c
Created December 11, 2014 14:00
Why are ssh_args ignored? Why control socket does not exist? Why bind() Operation not permitted?
$ cat ansible.cfg
[defaults]
timeout = 20
remote_tmp = /tmp/ansible/$USER
hostfile = inventory
ssh_args = foo
$ ansible -vvvv test -o --sudo -m ping
<example.com> ESTABLISH CONNECTION FOR USER: user
<example.com> REMOTE_MODULE ping
[plove@aiadm054 ops]$ ansible -vvvv test -o --sudo -m ping
<aipanda017.cern.ch> ESTABLISH CONNECTION FOR USER: plove
<aipanda017.cern.ch> REMOTE_MODULE ping
<aipanda017.cern.ch> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/afs/cern.ch/user/p/plove/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=5', 'aipanda017.cern.ch', "/bin/sh -c 'mkdir -p /tmp/ansible/$USER/ansible-tmp-1417470380.34-257132056167384 && chmod a+rx /tmp/ansible/$USER/ansible-tmp-1417470380.34-257132056167384 && echo /tmp/ansible/$USER/ansible-tmp-1417470380.34-257132056167384'"]
aipanda017.cern.ch | FAILED => SSH encountered an unknown error. The output was:
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: auto-mux: Trying
# What does logstash do with the topic string?
# How can I filter messages zmq.SUBSCRIBE?
# Is logstash missing this: http://zguide.zeromq.org/page%3aall#Pub-Sub-Message-Envelopes
# logstash config
input {
generator {
lines => [
@ptrlv
ptrlv / gist:80cf15fdc6f6b42852ee
Created August 3, 2014 14:28
wrapper set_limits
function set_limits() {
# Set some limits to catch jobs which go crazy from killing nodes
# 20GB limit for output size (block = 1K in bash)
fsizelimit=$((20*1024*1024))
echo Setting filesize limit to $fsizelimit
ulimit -f $fsizelimit
# Apply memory limit?
memLimit=0
@ptrlv
ptrlv / gist:d2a852a0153fd6ded0a1
Last active August 29, 2015 14:02
Broken pip install
$ virtualenv --version
1.11.6
$ virtualenv env
New python executable in env/bin/python
Installing setuptools, pip...done.
$ . env/bin/activate
(env)$
$ _CONDOR_TOOL_DEBUG=D_ALL condor_submit -debug -remote cloudscheduler.cern.ch:8081 /tmp/asoka.jdl
02/12/14 21:27:32 (fd:3) (pid:17633) (D_CONFIG) config: using subsystem 'SUBMIT', local ''
02/12/14 21:27:32 (fd:3) (pid:17633) (D_LOAD) Reading from /proc/cpuinfo
02/12/14 21:27:32 (fd:3) (pid:17633) (D_LOAD) Found: Physical-IDs:False; Core-IDs:False
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) condor_gethostname() claims we are aipanda020
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) NETWORK_INTERFACE=* matches lo 127.0.0.1, eth0 128.142.135.97, virbr0 192.168.122.1, choosing IP 128.142.135.97
02/12/14 21:27:32 (fd:3) (pid:17633) (D_CONFIG) ENABLE_IPV6 is undefined, using default value of False
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) Considering aipanda020.cern.ch (Ranked at 3) as possible local hostname versus aipanda020/ (0)
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) Identifying myself as: Short:: aipanda020, Long: aipanda020.cern.ch, IP: 128.142.135.97
02/12/14 21:27:32 (fd:3)
$ _CONDOR_TOOL_DEBUG=D_ALL condor_submit -debug -remote cloudscheduler.cern.ch:8081 /tmp/asoka.jdl
02/12/14 20:57:13 (fd:3) (pid:13681) (D_CONFIG) config: using subsystem 'SUBMIT', local ''
02/12/14 20:57:13 (fd:3) (pid:13681) (D_LOAD) Reading from /proc/cpuinfo
02/12/14 20:57:13 (fd:3) (pid:13681) (D_LOAD) Found: Physical-IDs:False; Core-IDs:False
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) condor_gethostname() claims we are aipanda020
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) NETWORK_INTERFACE=* matches lo 127.0.0.1, eth0 128.142.135.97, virbr0 192.168.122.1, choosing IP 128.142.135.97
02/12/14 20:57:13 (fd:3) (pid:13681) (D_CONFIG) ENABLE_IPV6 is undefined, using default value of False
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) Considering aipanda020.cern.ch (Ranked at 3) as possible local hostname versus aipanda020/ (0)
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) Identifying myself as: Short:: aipanda020, Long: aipanda020.cern.ch, IP: 128.142.135.97
02/12/14 20:57:13 (fd:3) (pi
@ptrlv
ptrlv / gist:7889634
Created December 10, 2013 12:08
ARC mcore jdl
rsladd = '(runtimeenvironment = APPS/HEP/ATLAS-SITE-LCG)(runtimeenvironment = ENV/PROXY)'
rsladd += '(jobname = arc_pilot)'
if corecount:
rsladd += '(count = %d)' % corecount
rsladd += '(countpernode = %d)' % corecount
if maxmemory and corecount:
percore = maxmemory/corecount
rsladd += '(memory = %d)' % percore
elif memory:
rsladd += '(memory = %d)' % memory
@ptrlv
ptrlv / gist:7804550
Created December 5, 2013 12:40
ARC xrsl
nordugridrsl = '(jobname = arc_pilot)'
rsladd = '(runtimeenvironment = APPS/HEP/ATLAS-SITE-LCG)(runtimeenvironment = ENV/PROXY)'
rsladd += '(jobname = arc_pilot)'
if memory:
rsladd += '(memory = %d)' % memory
if corecount:
rsladd += '(count = %d)' % corecount
if maxmemory and corecount:
percore = maxmemory/corecount
rsladd += '(maxmemory = %d)' % percore