Skip to content

Instantly share code, notes, and snippets.

View jlevon's full-sized avatar

John Levon jlevon

View GitHub Profile
@jlevon
jlevon / gist:cca9df07c5cf3888d372a4638d78fc71
Last active June 17, 2019 14:22
testing java-manta-cli with restarted haproxy
$ java -jar java-manta-cli/target/java-manta-cli-3.4.1-SNAPSHOT-jar-with-dependencies.jar put-file --log-level=INFO /var/tmp/4g.file /poseidon/stor/4g.file.23
13:46:53.043 [main] INFO c.j.m.c.c.ExternalSecurityProviderLoader - Security provider chosen for CSE: BC version 1.61
13:46:53.144 [main] WARN c.j.m.h.MantaSSLConnectionSocketFactory - Configuration: tlsInsecure is true. ALL TLS VERIFICATION IS DISABLED!
13:47:04.634 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://manta.emy-15.joyent.us:443: Broken pipe (Write failed)
13:47:04.635 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec - Retrying request to {s}->https://manta.emy-15.joyent.us:443
13:47:33.896 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://manta.emy-15.joyent.us:443: Broken pipe (Write failed)
13:47:33.897 [main] INFO c.j.m.o.a.h.impl.execchain.RetryExec -

Creating Gerrit reviews against a branch

It can be useful to create Gerrit reviews with a base branch other than 'master'. For this to work, the branch has to be pushed into cr.joyent.us. If our base branch is my-dev-branch:

  1. make sure your local check-out of the base branch is identical to that hosted on github (same SHA for HEAD).

  2. add yourself to "Temporary Git Superusers" via the

@jlevon
jlevon / haproxy-testing.md
Last active June 24, 2019 15:27
haproxy testing for MANTA-3730, MANTA-3525

List of testing done / to do for the above bugs

  1. make check/test in muppet repo
  2. make test for node-manta
  3. make test for java-manta
  4. mlive runs
  5. check haplog still works
  6. check pfiles with old and new PIs doesn't break haproxy
  7. verify core dumps, SIGTERMs etc of haproxy worker restart service properly
  8. verify refresh actually works as intended, put and get clients aren't interrupted
[2019-06-25T18:10:58.726Z] WARN: muskie/926795 on ebd2c5c9-68eb-4353-bcbe-e94671e7d572: mako: connection failed (req_id=4fbe7348-c09f-48ff-96b5-368b66b85b8a, method=GET, shark="[object SharkClient<1.stor.emy-15.joyent.us>]")
ConnectTimeoutError: failed to connect to 1.stor.emy-15.joyent.us in 2000ms
at onTimeout [as _onTimeout] (/opt/smartdc/muskie/lib/shark_client.js:88:12)
at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
--
path: /poseidon/stor/logs/manatee-snapshotter/2019/06/25/14/67fff7b3.log
[2019-06-25T18:10:52.305Z] DEBUG: muskie/926795 on ebd2c5c9-68eb-4353-bcbe-e94671e7d572: setup complete (req_id=4fbe7348-c09f-48ff-96b5-368b66b85b8a, method=GET)
path: /poseidon/stor/logs/manatee-snapshotter/2019/06/25/14/67fff7b3.log
--
params: {
@jlevon
jlevon / gist:7c6f19fcc9f73c4dcb8cab00c476f2f7
Created June 25, 2019 18:50
4fbe7348-c09f-48ff-96b5-368b66b85b8a
{"name":"muskie","hostname":"ebd2c5c9-68eb-4353-bcbe-e94671e7d572","pid":926795,"method":"GET","path":"/poseidon/stor/logs/manatee-snapshotter/2019/06/25/14/67fff7b3.log","req_id":"4fbe7348-c09f-48ff-96b5-368b66b85b8a","level":40,"err":{"message":"failed to connect to 1.stor.emy-15.joyent.us in 2000ms","name":"ConnectTimeoutError","stack":"ConnectTimeoutError: failed to connect to 1.stor.emy-15.joyent.us in 2000ms\n at onTimeout [as _onTimeout] (/opt/smartdc/muskie/lib/shark_client.js:88:12)\n at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)"},"shark":"[object SharkClient<1.stor.emy-15.joyent.us>]","msg":"mako: connection failed","time":"2019-06-25T18:10:58.726Z","v":0}
{"name":"muskie","hostname":"ebd2c5c9-68eb-4353-bcbe-e94671e7d572","pid":926795,"method":"GET","path":"/poseidon/stor/logs/manatee-snapshotter/2019/06/25/14/67fff7b3.log","req_id":"4fbe7348-c09f-48ff-96b5-368b66b85b8a","level":20,"params":{"0":"poseidon","1":"/logs/manatee-snapshotter/2019/06/25/14/67fff7b3.log","2":"logs/manatee
@jlevon
jlevon / git-squashing.md
Created June 27, 2019 11:51
Forcing git to squash without rebasing

Let's say I have a particular commit (for example, a gerrit patchset), with a whole bunch of merging history. I want a single commit of all its changes against master, without having to walk through a huge rebase of the intermediate commits.

First let's get it as a branch:

~/src/grot/gerrit-pull 6225/9
git checkout -b gerrit
@jlevon
jlevon / git-submodule-hell.md
Created June 27, 2019 15:34
resetting haproxy-1.5

Add the module back:

echo '[submodule "deps/haproxy-1.5"]
>        path = deps/haproxy-1.5
>        url = https://github.com/joyent/haproxy-1.5.git
>        branch = joyent/v1.5.19
> ' >>.gitmodules
git add .gitmodules
git commit -m 1
@jlevon
jlevon / smartos-boot-hang.md
Last active July 17, 2019 15:22
debugging SmartOS boot hang

In the loader menu, drop into:

    2. [Esc]ape to loader prompt

then

boot -kv -m verbose -B nmi=kmdb
@jlevon
jlevon / linux-kirby.md
Last active July 26, 2019 13:18
testing joyent/documentation changes on Linux with Kirby

Installing kirby for testing changes to documentation.git On sent local Linux

Need kirby 2 (maybe?)

in ~/public_html

Get the kirby bits, but reset .htaccess etc.

[root@e4-11-5b-97-83-48 (emy-15) ~]# dtrace -n '__vmx_load_host_state:entry /args[0]->host_state.gs_ldt_reload_needed/ { print(cpu); stack(); }'
dtrace: description '__vmx_load_host_state:entry ' matched 1 probe
CPU ID FUNCTION:NAME
24 77227 __vmx_load_host_state:entry processorid_t 0x18
kvm`vmx_vcpu_put+0x1a
kvm`kvm_arch_vcpu_put+0x1e
kvm`vcpu_put+0x36