Skip to content

Instantly share code, notes, and snippets.

View glennpratt's full-sized avatar

Glenn Pratt glennpratt

View GitHub Profile
@glennpratt
glennpratt / teleport-cluster-v14.0.1-v14.3.18.patch
Last active October 1, 2024 23:44
Teleport git diff v14.0.1...v14.3.18 -- examples/chart/teleport-cluster
diff --git a/examples/chart/teleport-cluster/.lint/extra-containers.yaml b/examples/chart/teleport-cluster/.lint/extra-containers.yaml
new file mode 100644
index 0000000000..14d04af93c
--- /dev/null
+++ b/examples/chart/teleport-cluster/.lint/extra-containers.yaml
@@ -0,0 +1,12 @@
+clusterName: helm-lint.example.com
+extraContainers:
+ - name: nscenter
+ command:
- name: output
hosts: k8s_cluster
tasks:
- name: Rolling (intended behavior)
ansible.builtin.include_tasks: change_config.yml
with_items: "{{ groups['k8s_cluster'] }}"
loop_control:
loop_var: _host_item
when:
- hostvars[_host_item].inventory_hostname == inventory_hostname
@glennpratt
glennpratt / good-client.txt
Created March 13, 2019 23:01
memcached-good-wireshark-summary
No. Time Source Destination Protocol Length Info
1 0.000000 10.0.0.3 10.0.0.1 TCP 74 25060 → 11247 [SYN] Seq=0 Win=26883 Len=0 MSS=8961 SACK_PERM=1 TSval=407815543 TSecr=0 WS=512
2 0.000427 10.0.0.1 10.0.0.3 TCP 74 11247 → 25060 [SYN, ACK] Seq=0 Ack=1 Win=26847 Len=0 MSS=8961 SACK_PERM=1 TSval=441401250 TSecr=407815543 WS=512
3 0.000440 10.0.0.3 10.0.0.1 TCP 66 25060 → 11247 [ACK] Seq=1 Ack=1 Win=27136 Len=0 TSval=407815543 TSecr=441401250
4 0.000456 10.0.0.3 10.0.0.1 TCP 90 25060 → 11247 [PSH, ACK] Seq=1 Ack=1 Win=27136 Len=24 TSval=407815543 TSecr=441401250
5 0.000913 10.0.0.1 10.0.0.3 TCP 66 11247 → 25060 [ACK] Seq=1 Ack=25 Win=27136 Len=0 TSval=441401250 TSecr=407815543
6 0.001039 10.0.0.1 10.0.0.3
@glennpratt
glennpratt / memcached-server-wireshark-summary.txt
Created March 13, 2019 22:40
memcached-server-wireshark-summary
No. Time Source Destination Protocol Length Info
1 0.000000 10.0.0.2 10.0.0.1 TCP 74 58978 → 11247 [SYN] Seq=0 Win=26883 Len=0 MSS=8961 SACK_PERM=1 TSval=441247520 TSecr=0 WS=512
2 0.000042 10.0.0.1 10.0.0.2 TCP 74 11247 → 58978 [SYN, ACK] Seq=0 Ack=1 Win=26847 Len=0 MSS=8961 SACK_PERM=1 TSval=441520309 TSecr=441247520 WS=512
3 0.000467 10.0.0.2 10.0.0.1 TCP 66 58978 → 11247 [ACK] Seq=1 Ack=1 Win=27136 Len=0 TSval=441247520 TSecr=441520309
4 0.000483 10.0.0.2 10.0.0.1 TCP 90 58978 → 11247 [PSH, ACK] Seq=1 Ack=1 Win=27136 Len=24 TSval=441247520 TSecr=441520309
5 0.000488 10.0.0.1 10.0.0.2 TCP 66 11247 → 58978 [ACK] Seq=1 Ack=25 Win=27136 Len=0 TSval=441520309 TSecr=441247520
6 0.000617 10.0.0.1 10.0.0.2
@glennpratt
glennpratt / client-wireshark-summary.txt
Last active March 13, 2019 22:41
Memcached "Connection reset by peer"
No. Time Source Destination Protocol Length Info
1 0.000000 10.0.0.2 10.0.0.1 TCP 74 58978 → 11247 [SYN] Seq=0 Win=26883 Len=0 MSS=8961 SACK_PERM=1 TSval=441247520 TSecr=0 WS=512
2 0.000466 10.0.0.1 10.0.0.2 TCP 74 11247 → 58978 [SYN, ACK] Seq=0 Ack=1 Win=26847 Len=0 MSS=8961 SACK_PERM=1 TSval=441520309 TSecr=441247520 WS=512
3 0.000485 10.0.0.2 10.0.0.1 TCP 66 58978 → 11247 [ACK] Seq=1 Ack=1 Win=27136 Len=0 TSval=441247520 TSecr=441520309
4 0.000495 10.0.0.2 10.0.0.1 TCP 90 58978 → 11247 [PSH, ACK] Seq=1 Ack=1 Win=27136 Len=24 TSval=441247520 TSecr=441520309
5 0.000900 10.0.0.1 10.0.0.2 TCP 66 11247 → 58978 [ACK] Seq=1 Ack=25 Win=27136 Len=0 TSval=441520309 TSecr=441247520
6 0.001031 10.0.0.1 10.0.0.2
@glennpratt
glennpratt / test_http_server.rb
Created August 3, 2017 07:25
TestHTTPServer
require 'thread'
require 'webrick'
class TestHTTPServer
class Servlet < WEBrick::HTTPServlet::AbstractServlet
def initialize(server, requests)
@requests = requests
super
end
@glennpratt
glennpratt / percona-bug1507812.md
Last active October 9, 2016 12:33
percona-bug1507812

When upgrading to percona-server-server-5.6, mysql_install_db still runs:

+ apt-get install -y --allow-unauthenticated percona-server-server-5.6=5.6.32-78.1-1.xenial~1
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libperconaserverclient18 percona-server-common-5.5
Use 'sudo apt autoremove' to remove them.
@glennpratt
glennpratt / logger.sh
Created June 21, 2016 21:35
AWS CodeDeploy logger include.
# This sends all output from the command to journalctl while allowing CodeDeploy
# agent to capture it as well. It also prefixes the output with timestamps for
# better debugging via CodeDeploy logs.
#
# TODO Consider changing codedeploy-agent to do these things itself.
#
# NOTE Not POSIX compliant; must run in bash or bash masquerading as sh.
# TODO Figure out why codedeploy-agent (using Open3), isn't respecting the
# shebang to all our scripts which are /bin/bash. See:
# https://github.com/aws/aws-codedeploy-agent/issues/71
#!/bin/bash
set -ex
# Reproduce bundler issue:
# https://github.com/bundler/bundler/issues/4392
rm -rf /tmp/bundler-GH-4392
mkdir -p /tmp/bundler-GH-4392
cd /tmp/bundler-GH-4392
$ bundle package --all --all-platforms --no-install
Fetching source index from https://rubygems.org/
Resolving dependencies..........
Using rake 10.5.0
Using acquia-http-hmac 2.0.0.pre3 from git://github.com/acquia/http-hmac-ruby.git (at 2.0@0776822)
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using addressable 2.3.8