Skip to content

Instantly share code, notes, and snippets.

@kayrus
kayrus / bufio-smtp.go
Last active August 31, 2022 20:51
bufio half closed tcp connections
package main
import (
"fmt"
"io"
"log"
"os"
"os/exec"
"strings"
"time"
@kayrus
kayrus / volumes.go
Created January 25, 2021 12:42
gophercloud volumes list test
package main
import (
"fmt"
"net/http"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack"
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes"
"github.com/gophercloud/gophercloud/pagination"
@kayrus
kayrus / jeos-packages.txt
Created October 31, 2019 10:04
jeos-packages.txt
libisccfg160-9.11.2-lp151.11.3.1.x86_64
cracklib-dict-small-2.9.6-lp151.3.69.x86_64
bind-utils-9.11.2-lp151.11.3.1.x86_64
kbd-legacy-2.0.4-lp151.8.1.noarch
2019/09/12 13:00:05 [INFO] Terraform version: 0.12.8
2019/09/12 13:00:05 [INFO] Go runtime version: go1.12.9
2019/09/12 13:00:05 [INFO] CLI args: []string{"/home/user/bin/terraform", "apply"}
2019/09/12 13:00:05 [DEBUG] Attempting to open CLI config file: /home/user/.terraformrc
2019/09/12 13:00:05 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/09/12 13:00:05 [DEBUG] checking for credentials in "/home/user/.terraform.d/plugins"
2019/09/12 13:00:05 [INFO] CLI command args: []string{"apply"}
2019/09/12 13:00:05 [DEBUG] New state was assigned lineage "a5f048f1-6c04-f0aa-6ac2-8f00929de7a0"
2019/09/12 13:00:05 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2019/09/12 13:00:05 [TRACE] Meta.Backend: instantiated backend of type <nil>
@kayrus
kayrus / deployment.yaml
Last active September 11, 2019 12:51
deployment status inconsistency
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: "2019-08-21T16:04:57Z"
generation: 13329
labels:
component: blackbox-exporter
garden.sapcloud.io/role: system-component
@kayrus
kayrus / cloud-controller-manager.log
Last active July 3, 2019 21:03
shoot cluster deletion
$ kubectl --kubeconfig soil -n shoot--garden--region1 logs -f cloud-controller-manager-6f5548f8f6-wk4fg --tail 10
I0703 20:05:23.369277 1 node_controller.go:329] This node shoot--garden--region1-cpu-worker-z1-5bb54fbdbb-6kjl7 is registered without the cloud taint. Will not process.
I0703 20:05:30.370979 1 node_controller.go:329] This node shoot--garden--region1-cpu-worker-z1-5bb54fbdbb-zf7zq is registered without the cloud taint. Will not process.
I0703 20:05:33.001121 1 node_controller.go:329] This node shoot--garden--region1-cpu-worker-z1-5bb54fbdbb-m7wp4 is registered without the cloud taint. Will not process.
I0703 20:05:33.077097 1 node_controller.go:329] This node shoot--garden--region1-cpu-worker-z1-5bb54fbdbb-zt9mc is registered without the cloud taint. Will not process.
I0703 20:05:33.167723 1 node_controller.go:329] This node shoot--garden--region1-cpu-worker-z1-5bb54fbdbb-v8gsv is registered without the cloud taint. Will not process.
I0703 20:05:33.382567 1 node_
$ ./kg -n garden get shoot seed-region1
NAME CLOUDPROFILE VERSION SEED DOMAIN OPERATION PROGRESS APISERVER CONTROL NODES SYSTEM AGE
seed-region1 region1 1.12.9 soil region1-seed.gdn.domain Processing 86 False False Unknown Unknown 2d21h
$ ./ks -n shoot--garden--seed-region1 get pods
NAME READY STATUS RESTARTS AGE
cloud-controller-manager-85fdb77958-k5wdz 1/1 Running 25 2d21h
dependency-watchdog-5b77fd7c74-p46bf 1/1 Running 0 2d21h
etcd-events-0 2/2 Running 0 2d21h
etcd-main-0 1/2 Running 0 2d21h
grafana-86cc5ddcd-tr2n7 1/1 Running 0 2d21h
package env
import (
"os"
"syscall"
"golang.org/x/sys/windows"
"golang.org/x/text/encoding/charmap"
)
@kayrus
kayrus / subnet_panic.log
Created April 3, 2019 14:55
subnet_panic
2019-04-03T13:22:27.927Z [DEBUG] plugin.terraform-provider-openstack_v1.16.0_x4: panic: interface conversion: interface {} is nil, not string
2019-04-03T13:22:27.928Z [DEBUG] plugin.terraform-provider-openstack_v1.16.0_x4:
2019-04-03T13:22:27.928Z [DEBUG] plugin.terraform-provider-openstack_v1.16.0_x4: goroutine 277 [running]:
2019-04-03T13:22:27.928Z [DEBUG] plugin.terraform-provider-openstack_v1.16.0_x4: github.com/terraform-providers/terraform-provider-openstack/openstack.resourceSubnetDNSNameserversV2CheckIsSet(0xc0002eeb60, 0xc0001688d0, 0x7)
2019-04-03T13:22:27.928Z [DEBUG] plugin.terraform-provider-openstack_v1.16.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-openstack/openstack/resource_openstack_networking_subnet_v2.go:445 +0x308
2019-04-03T13:22:27.928Z [DEBUG] plugin.terraform-provider-openstack_v1.16.0_x4: github.com/terraform-providers/terraform-provider-openstack/openstack.resourceNetworkingSubnetV2Create(0xc0002eeb60, 0x110b3a0, 0x
@kayrus
kayrus / lb_pool_panic.log
Created April 3, 2019 14:19
lb_pool_panic
panic: persistence: '': source data must be an array or slice, got struct
2019-04-03T16:13:40.193+0200 [DEBUG] plugin.terraform-provider-openstack_v1.17.0_x4:
2019-04-03T16:13:40.193+0200 [DEBUG] plugin.terraform-provider-openstack_v1.17.0_x4: goroutine 121 [running]:
2019-04-03T16:13:40.193+0200 [DEBUG] plugin.terraform-provider-openstack_v1.17.0_x4: github.com/terraform-providers/terraform-provider-openstack/vendor/github.com/hashicorp/terraform/helper/schema.(*ResourceData).Set(0xc0001da0e0, 0x11734f6, 0xb, 0x104fe40, 0xc0002d89e0, 0x0, 0x0)
2019-04-03T16:13:40.193+0200 [DEBUG] plugin.terraform-provider-openstack_v1.17.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-openstack/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go:191 +0x334
2019-04-03T16:13:40.193+0200 [DEBUG] plugin.terraform-provider-openstack_v1.17.0_x4: github.com/terraform-providers/terraform-provider-openstack/openstack.resourcePoolV2Read(0xc0001da0e0, 0x1124080,