Skip to content

Instantly share code, notes, and snippets.

@ianb-mp
ianb-mp / clean_virsh_snapshots.sh
Created March 3, 2024 23:33
Cleanup libvirt snapshots
#!/bin/bash
set -e
DRYRUN=true
[ $# -lt 2 ] && echo "Usage: $0 <domain> <keep>" && exit 1
DOMAIN=$1
KEEP=$2
@ianb-mp
ianb-mp / csinode.yaml
Last active April 19, 2024 11:40
zfs-localpv error 2024-04-19
apiVersion: v1
items:
- apiVersion: storage.k8s.io/v1
kind: CSINode
metadata:
annotations:
storage.alpha.kubernetes.io/migrated-plugins: kubernetes.io/aws-ebs,kubernetes.io/azure-disk,kubernetes.io/azure-file,kubernetes.io/cinder,kubernetes.io/gce-pd,kubernetes.io/vsphere-volume
creationTimestamp: "2024-04-16T22:30:43Z"
name: bne-lab-vr-2.i.example.com
ownerReferences:
@ianb-mp
ianb-mp / k0sctl_output.log
Created April 29, 2024 23:15
k0sctl output log
$ k0sctl apply -d -c k0sctl.yaml
DEBU[0000] Loaded configuration:
apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: bne-lab-vr-3
spec:
hosts:
- ssh:
address: 10.2.5.20
I0430 23:40:02.637916 1 main.go:89] ZFS Driver Version :- 2.5.0 - commit :- c0d0bfd5bb2a69ecd42f120d633e95a49664d268
I0430 23:40:02.637960 1 main.go:90] DriverName: zfs.csi.openebs.io Plugin: controller EndPoint: unix:///var/lib/csi/sockets/pluginproxy/csi.sock Node Name:
I0430 23:40:02.637983 1 driver.go:48] enabling volume access mode: SINGLE_NODE_WRITER
I0430 23:40:02.667093 1 controller.go:140] waiting for k8s & zfs node informer caches to be synced
I0430 23:40:02.667109 1 controller.go:144] synced k8s & zfs node informer caches
I0430 23:40:02.667382 1 grpc.go:190] Listening for connections on address: &net.UnixAddr{Name:"//var/lib/csi/sockets/pluginproxy/csi.sock", Net:"unix"}
I0430 23:40:03.460034 1 grpc.go:72] GRPC call: /csi.v1.Identity/Probe requests {}
I0430 23:40:03.461149 1 grpc.go:81] GRPC response: {}
I0430 23:40:03.461948 1 grpc.go:72] GRPC call: /csi.v1.Identity/GetPluginInfo requests {}
I0430 23:40:03.462007 1 grpc.go:81] GRPC respo
@ianb-mp
ianb-mp / k0scontroller.log
Last active May 15, 2024 01:11
k0s isolateEmulatorThread issue
# journalctl -u k0sworker -f
May 15 11:03:49 bne-lab-srv-6 k0s[4191056]: time="2024-05-15 11:03:49" level=info msg="I0515 11:03:49.792855 4191367 scope.go:117] \"RemoveContainer\" containerID=\"65e47dcfdbfecc00911f824f7f7267af95f0e36619c666fbb0f748e1f0739fb2\"" component=kubelet stream=stderr
May 15 11:03:49 bne-lab-srv-6 k0s[4191056]: time="2024-05-15 11:03:49" level=info msg="time=\"2024-05-15T11:03:49.792965242+10:00\" level=error msg=\"ContainerStatus for \\\"65e47dcfdbfecc00911f824f7f7267af95f0e36619c666fbb0f748e1f0739fb2\\\" failed\" error=\"rpc error: code = NotFound desc = an error occurred when try to find container \\\"65e47dcfdbfecc00911f824f7f7267af95f0e36619c666fbb0f748e1f0739fb2\\\": not found\"" component=containerd stream=stderr
May 15 11:03:49 bne-lab-srv-6 k0s[4191056]: time="2024-05-15 11:03:49" level=info msg="E0515 11:03:49.793078 4191367 remote_runtime.go:432] \"ContainerStatus from runtime service failed\" err=\"rpc error: code = NotFound desc = an error occurred when try to find contai
@ianb-mp
ianb-mp / second-controller.log
Created May 21, 2024 03:03
k0s controller join issue
May 21 02:44:50 ip-172-31-37-26 systemd[1]: Started k0scontroller.service - k0s - Zero Friction Kubernetes.
May 21 02:44:50 ip-172-31-37-26 k0s[49706]: time="2024-05-21 02:44:50" level=debug pre-flight-check=memory property="1.9 GiB"
May 21 02:44:50 ip-172-31-37-26 k0s[49706]: time="2024-05-21 02:44:50" level=debug pre-flight-check="disk:/var/lib/k0s" property="18.5 GiB"
May 21 02:44:50 ip-172-31-37-26 k0s[49706]: time="2024-05-21 02:44:50" level=debug pre-flight-check="nameResolution:localhost" property="[::1 127.0.0.1]"
May 21 02:44:50 ip-172-31-37-26 k0s[49706]: time="2024-05-21 02:44:50" level=debug pre-flight-check=os property=Linux
May 21 02:44:50 ip-172-31-37-26 k0s[49706]: time="2024-05-21 02:44:50" level=debug pre-flight-check=os/kernelRelease property=6.1.0-13-cloud-amd64
May 21 02:44:50 ip-172-31-37-26 k0s[49706]: time="2024-05-21 02:44:50" level=debug pre-flight-check=os/RLIMIT_NOFILE property="current: 999999 / max: 999999"
May 21 02:44:50 ip-172-31-37-26 k0s[49706]: time="2024-05-21 02:44:50" le
This file has been truncated, but you can view the full file.
Jun 06 03:40:23 ip-172-31-47-173 systemd[1]: Started k0scontroller.service - k0s - Zero Friction Kubernetes.
Jun 06 03:40:23 ip-172-31-47-173 k0s[97460]: time="2024-06-06 03:40:23" level=debug pre-flight-check=memory property="1.9 GiB"
Jun 06 03:40:23 ip-172-31-47-173 k0s[97460]: time="2024-06-06 03:40:23" level=debug pre-flight-check="disk:/var/lib/k0s" property="18.5 GiB"
Jun 06 03:40:23 ip-172-31-47-173 k0s[97460]: time="2024-06-06 03:40:23" level=debug pre-flight-check="nameResolution:localhost" property="[::1 127.0.0.1]"
Jun 06 03:40:23 ip-172-31-47-173 k0s[97460]: time="2024-06-06 03:40:23" level=debug pre-flight-check=os property=Linux
Jun 06 03:40:23 ip-172-31-47-173 k0s[97460]: time="2024-06-06 03:40:23" level=debug pre-flight-check=os/kernelRelease property=6.1.0-13-cloud-amd64
Jun 06 03:40:23 ip-172-31-47-173 k0s[97460]: time="2024-06-06 03:40:23" level=debug pre-flight-check=os/RLIMIT_NOFILE property="current: 999999 / max: 999999"
Jun 06 03:40:23 ip-172-31-47-173 k0s[97460]: time="2024-06-06 03:4