Skip to content

Instantly share code, notes, and snippets.

@candlerb
candlerb / gist:572ec8c87055942a77e329942b8724f6
Created Sep 21, 2021
Backtrace for vector issue with loki
View gist:572ec8c87055942a77e329942b8724f6
Sep 21 09:35:24 loki systemd[1]: Starting Vector...
Sep 21 09:35:24 loki vector[24928]: √ Loaded ["/etc/vector/vector.toml"]
Sep 21 09:35:24 loki vector[24928]: √ Component configuration
Sep 21 09:35:24 loki vector[24928]: √ Health check "loki"
Sep 21 09:35:24 loki vector[24928]: ------------------------------------
Sep 21 09:35:24 loki vector[24928]: Validated
Sep 21 09:35:24 loki systemd[1]: Started Vector.
Sep 21 09:35:24 loki vector[24932]: Sep 21 09:35:24.385 INFO vector::app: Log level is enabled. level="vector=trace,codec=trace,vrl=trace,file_source=trace,tower_limit=trace,rdkafka=trace" enable_datadog_tracing=false
Sep 21 09:35:24 loki vector[24932]: Sep 21 09:35:24.386 INFO vector::app: Loading configs. paths=["/etc/vector/vector.toml"]
Sep 21 09:35:24 loki vector[24932]: Sep 21 09:35:24.417 DEBUG vector::tls::settings: Fetching system root certs.
@candlerb
candlerb / gf-run.py
Created Jul 12, 2021
Simplified gf-run.py
View gf-run.py
#!/usr/bin/python3
import os
import shutil
import subprocess
import sys
index = int(sys.argv[1])
num_disks = int(sys.argv[2])
base = os.path.abspath("mybase.img")
@candlerb
candlerb / err.txt
Created Jul 12, 2021
Debug output from guestfs when not starting correctly
View err.txt
libguestfs: create: flags = 0, handle = 0x55be3d261850, program = guestfish
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/home/nsrc/nsrc-gns3/scripts/mybase.img,compat=1.1
libguestfs: command: run: \ /tmp/gf-run.20461/node0.qcow2
Formatting '/tmp/gf-run.20461/node0.qcow2', fmt=qcow2 size=1474560 compat=1.1 backing_file=/home/nsrc/nsrc-gns3/scripts/mybase.img cluster_size=65536 lazy_refcounts=off refcount_bits=16
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
@candlerb
candlerb / gf-run.py
Created Jul 12, 2021
gf-run.py (create qcow2 clones and upload data to them)
View gf-run.py
#!/usr/bin/python3
import os
import shutil
import subprocess
import sys
index = int(sys.argv[1])
num_disks = int(sys.argv[2])
base = os.path.abspath("mybase.img")
@candlerb
candlerb / gf-par.py
Created Jul 12, 2021
gf-par.py (run multiple instances of gf-run.py in parallel)
View gf-par.py
#!/usr/bin/python3
import subprocess, sys
COUNT = 36
CONCURRENCY = 12
NUM_DISKS = 46
jobs = []
errors = []
@candlerb
candlerb / project.gns3
Created May 6, 2021
gns3-web-ui-1125 project.gns3
View project.gns3
{
"auto_close": false,
"auto_open": false,
"auto_start": false,
"drawing_grid_size": 25,
"grid_size": 75,
"name": "gns3-web-ui-1125",
"project_id": "1052ec96-de04-45fc-9fc2-dff8584cf303",
"revision": 9,
"scene_height": 1000,
@candlerb
candlerb / gns3-web-ui-1125.gns3project.b64
Last active May 6, 2021
base64 encoding of gns3-web-ui-1125.gns3project
View gns3-web-ui-1125.gns3project.b64
UEsDBBQACAAIAHRJplIAAAAAAAAAAAAAAAAMAAAAcHJvamVjdC5nbnMzzVdLk9wmEP4rU8o1
7KK3ND7lkGsqB6dySFwqxENDVgIF0I7HW/vf06DHaGfXTuzKwTMX0cBHP77uhqeITE43tNeW
R8eDIL3lPx5moR65upVZR4zbCZkhZ6m6pjOSNVZ+8iBJDhN7QekFigz+O+qUTdGZt2iSKI6T
PIK50ei/OHWNZH5FjPOE07pAjOMMZbmgqBY0QUyIKq8yKlKc+l2GP0ortdexhqGlXPHmxGV3
8hrGGONNepbMnbxqi/Ckz0HlnSVBJpXjRhDKm560vLe38z25cPNCqsjYgF9uwaZx7CU3IFJT
34PE6VH3uruA5Cmiehgnxz3QHx+uXtzGvVQPYfAUCdm7+cin52VmcVNKeJuIuEaU1BXKYlyj
iqQxanmCE8ITmvLCu0lpxhcwwsgIaI2ahjYo550RLA1qGe2Imx0avOQufQiZ0MohQQbZX46H
95eR/24kwLwLch9j7+07PI/PIQDHQ6t79g6074+HH3D4hRHSI6HSAVAMO7x+jn/08Yo49qOP
8JnG8OE9hWL8vFiwGE24KPOMx95ogjJW5KiiBUGYxRmL85bVqQiM0sbtzASU79x6Rdxmf4UX
+8vsxvyiqjNMqxYlnDGUtTVGbZzUSKSipHEmcEH5W+Z/CJy0kNAbS4Nsx42Fk8tBvaak90hU
View gist:b231ce074555b2619c18a0e86109e63f
root@node1:~# linstor storage-pool list
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
┊ StoragePool ┊ Node ┊ Driver ┊ PoolName ┊ FreeCapacity ┊ TotalCapacity ┊ CanSnapshots ┊ State ┊
╞══════════════════════════════════════════════════════════════════════════════════════════════════════════╡
┊ DfltDisklessStorPool ┊ node1 ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
┊ DfltDisklessStorPool ┊ node2 ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
┊ DfltDisklessStorPool ┊ node3 ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
┊ DfltDisklessStorPool ┊ node4 ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
┊ pool_ssd ┊ node1 ┊ LVM ┊ vg_ssd ┊ 9.31 GiB ┊ 9.31 GiB ┊ False ┊ Ok ┊
┊ pool_ssd ┊ node2 ┊ LVM ┊ vg_ssd ┊ 9.31 GiB ┊ 9.31 GiB ┊ False ┊ Ok ┊
View gist:2ec6ad4be4800e85fe65e8bb8bf3fc2e
root@node1:~# linstor resource-definition modify --resource-group ssd_crit bar
SUCCESS:
...
root@node1:~# linstor resource list -r bar
╭───────────────────────────────────────────────────────────────────────────────╮
┊ ResourceName ┊ Node ┊ Port ┊ Usage ┊ Conns ┊ State ┊ CreatedOn ┊
╞═══════════════════════════════════════════════════════════════════════════════╡
┊ bar ┊ node1 ┊ 7002 ┊ Unused ┊ Ok ┊ UpToDate ┊ 2021-02-15 10:25:45 ┊
┊ bar ┊ node2 ┊ 7002 ┊ Unused ┊ Ok ┊ UpToDate ┊ 2021-02-15 10:25:45 ┊
╰───────────────────────────────────────────────────────────────────────────────╯
@candlerb
candlerb / gist:995a54bf2050a4287c1dd4ca0b39951b
Created Feb 15, 2021
linstor resource-group spawn-resources
View gist:995a54bf2050a4287c1dd4ca0b39951b
root@node1:~# linstor resource list -r bar
╭─────────────────────────────────────────────────────────────────────────────────────────╮
┊ ResourceName ┊ Node ┊ Port ┊ Usage ┊ Conns ┊ State ┊ CreatedOn ┊
╞═════════════════════════════════════════════════════════════════════════════════════════╡
┊ bar ┊ node1 ┊ 7002 ┊ Unused ┊ Ok ┊ SyncTarget(12.66%) ┊ 2021-02-15 10:25:45 ┊
┊ bar ┊ node2 ┊ 7002 ┊ Unused ┊ Ok ┊ UpToDate ┊ 2021-02-15 10:25:45 ┊
╰─────────────────────────────────────────────────────────────────────────────────────────╯
root@node1:~# linstor volume list -r bar
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
┊ Node ┊ Resource ┊ StoragePool ┊ VolNr ┊ MinorNr ┊ DeviceName ┊ Allocated ┊ InUse ┊ State ┊