Skip to content

Instantly share code, notes, and snippets.

View glennpratt's full-sized avatar

Glenn Pratt glennpratt

View GitHub Profile
@glennpratt
glennpratt / Y_before.txt
Last active February 18, 2026 00:57
Linodego bug check
❯ go run ./bugcheck/test_region_availability_bug.go
Testing GetRegionAvailability bug...
Calling GetRegionAvailability for region: us-sea
2026/02/17 19:35:14.910336 WARN RESTY json: cannot unmarshal array into Go value of type linodego.RegionAvailability, Attempt 1
2026/02/17 19:35:14.910440 ERROR RESTY json: cannot unmarshal array into Go value of type linodego.RegionAvailability
❌ Error (as expected): [002] json: cannot unmarshal array into Go value of type linodego.RegionAvailability
Making raw API call to show actual response format:
✅ Raw API returns an ARRAY with 72 elements
#!/bin/bash
set -e
# Setup directories
TEST_DIR=$(pwd)/test-proxy-tls
mkdir -p "$TEST_DIR/certs"
cd "$TEST_DIR"
echo "### 1. Generating Certificates"
# CA
@glennpratt
glennpratt / sts.yaml
Created May 19, 2025 22:49
RKE2 Server in a Pod
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: rke2-server
namespace: rke2-bootstrap-system
spec:
serviceName: "rke2-server"
replicas: 1
selector:
matchLabels:
@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.