Skip to content

Instantly share code, notes, and snippets.

@jhoblitt
jhoblitt / rancher-rke2.repo
Created June 21, 2024 17:00
/etc/yum.repos.d/rancher-rke2.repo as created by `curl -sfL https://get.rke2.io`
[rancher-rke2-common-stable]
name=Rancher RKE2 Common (stable)
baseurl=https://rpm.rancher.io/rke2/stable/common/centos/9/noarch
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://rpm.rancher.io/public.key
[rancher-rke2-1.28-stable]
name=Rancher RKE2 1.28 (stable)
baseurl=https://rpm.rancher.io/rke2/stable/1.28/centos/9/x86_64
@jhoblitt
jhoblitt / README
Created June 3, 2024 18:46
finding route53 records with names that match 'pdu' and formatting them into prometheus file sd json format.
aws route53 list-resource-record-sets --hosted-zone-id ZPIEHXTK3ZPMR | jq '.ResourceRecordSets' > ls.lsst.org.json
aws route53 list-resource-record-sets --hosted-zone-id Z2CCXZLXGUUYM5 | jq '.ResourceRecordSets' > cp.lsst.org.json
./r53_to_file_sd.rb ls.lsst.org.json cp.lsst.org.json > /home/jhoblitt/github/k8s-cookbook/fleet/lib/snmp-exporter-pre/files/sd/dev/snmp-raritan-pdu.json
@jhoblitt
jhoblitt / inv_to_file_sd.rb
Created May 9, 2024 21:47
Recursively extract the hostnames from an ansible inventory file and construct as prometheus sd file.
#!/bin/env ruby
require 'yaml'
require 'json'
inv = YAML.load_file('auto_inventory.yml')
def find_hosts(parent, h, output)
h.each {|k, v|
if v.is_a?(Hash)
@jhoblitt
jhoblitt / ceph_mds_possible_mem_leak.md
Created July 7, 2023 15:35
A ceph 17.2.6 mds suspected of leaking memory...
[root@rook-ceph-mds-auxtel-a-dfdfb685f-sdpmd ceph]# ceph daemon mds.auxtel-a heap stats 
mds.auxtel-a tcmalloc heap stats:------------------------------------------------
MALLOC:    11869592120 (11319.7 MiB) Bytes in use by application
MALLOC: +            0 (    0.0 MiB) Bytes in page heap freelist
MALLOC: +    582126792 (  555.2 MiB) Bytes in central cache freelist
MALLOC: +      6150656 (    5.9 MiB) Bytes in transfer cache freelist
MALLOC: +      3751680 (    3.6 MiB) Bytes in thread cache freelists
MALLOC: +     75235328 (   71.8 MiB) Bytes in malloc metadata
MALLOC:   ------------
@jhoblitt
jhoblitt / CHANGELOG.md
Last active March 14, 2023 20:26
lsst-it/lsst-control github_changelog_generator
@jhoblitt
jhoblitt / multisite-setup-test.md
Last active September 28, 2022 15:43
Ceph multisite replication configuration using rook fails without manually commiting period

ceph multisite setup

All test clusters are running:

  • k8s v1.23.7-rancher1-1
  • rook 1.10.1
  • ceph 17.2.3

Two baremetal clusters are being used for testing.

@jhoblitt
jhoblitt / gist:153f93284c60356e4540087a68794593
Created July 23, 2020 20:06
comcam-fp01 -> starlight-dtn
[jhoblitt@comcam-fp01 ~]$ for i in $(seq 1 10); do iperf3 -V -c starlight-dtn.ncsa.illinois.edu -p 5002; done
iperf 3.1.7
Linux comcam-fp01.ls.lsst.org 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64
Control connection MSS 1448
Time: Thu, 23 Jul 2020 20:03:18 GMT
Connecting to host starlight-dtn.ncsa.illinois.edu, port 5002
Cookie: comcam-fp01.ls.lsst.org.1595534598.0
TCP MSS: 1448 (default)
[ 4] local 139.229.150.3 port 47428 connected to 141.142.141.66 port 5002
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
@jhoblitt
jhoblitt / gist:1bac667207e6bf2d01447de6b80091e7
Created July 23, 2020 18:03
comcam-arctl01 -> starlight-dtn
[jhoblitt@comcam-arctl01 ~]$ for i in $(seq 1 10); do iperf3 -V -c starlight-dtn.ncsa.illinois.edu -p 5002 -B 139.229.140.4; done
iperf 3.1.7
Linux comcam-arctl01.ls.lsst.org 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64
Control connection MSS 8948
Time: Thu, 23 Jul 2020 18:01:07 GMT
Connecting to host starlight-dtn.ncsa.illinois.edu, port 5002
Cookie: comcam-arctl01.ls.lsst.org.159552726
TCP MSS: 8948 (default)
[ 4] local 139.229.140.4 port 55004 connected to 141.142.141.66 port 5002
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
@jhoblitt
jhoblitt / gist:707368afde90ff54d5fd05fdd2394b0b
Created July 23, 2020 17:37
ls-dtn01 -> 141.142.238.247
[jhoblitt@ls-dtn01 ~]$ for i in $(seq 1 10); do iperf3 -V -c 141.142.238.247 -p 5000; done
iperf 3.1.7
Linux ls-dtn01.ls.lsst.org 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64
Control connection MSS 1448
Time: Thu, 23 Jul 2020 17:33:40 GMT
Connecting to host 141.142.238.247, port 5000
Cookie: ls-dtn01.ls.lsst.org.1595525620.3310
TCP MSS: 1448 (default)
[ 4] local 139.229.146.14 port 46300 connected to 141.142.238.247 port 5000
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
[jhoblitt@ls-dtn01 ~]$ for i in $(seq 1 10); do iperf3 -V -c starlight-dtn.ncsa.illinois.edu -p 5002; done
iperf 3.1.7
Linux ls-dtn01.ls.lsst.org 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64
Control connection MSS 1448
Time: Thu, 23 Jul 2020 17:17:00 GMT
Connecting to host starlight-dtn.ncsa.illinois.edu, port 5002
Cookie: ls-dtn01.ls.lsst.org.1595524620.3765
TCP MSS: 1448 (default)
[ 4] local 139.229.146.14 port 42374 connected to 141.142.141.66 port 5002
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test