Skip to content

Instantly share code, notes, and snippets.

View sebastian-philipp's full-sized avatar
🔫
I'm here

Sebastian Wagner sebastian-philipp

🔫
I'm here
View GitHub Profile
@sebastian-philipp
sebastian-philipp / cephadm_status.sh
Last active April 25, 2022 08:15
cephadm_status.sh to properly write the status of cephadm avoiding asking for the same kind of information again and again
CEPHADM="sudo cephadm"
echo '# `ceph -s`'
echo '```'
$CEPHADM shell -- ceph -s
echo '```'
echo '# `ceph health detail`'
echo '```'
$CEPHADM shell -- ceph health detail
@sebastian-philipp
sebastian-philipp / drive-groups-debug.md
Last active January 28, 2020 11:42
Debugging drive groups

create

root@ubuntu:~# losetup -f
/dev/loop12
root@ubuntu:~# LANG=C losetup /dev/loop12 disk-image
root@ubuntu:~# pvcreate /dev/loop12
  Physical volume "/dev/loop12" successfully created.
root@ubuntu:~# vgcreate MyVg /dev/loop12
  Volume group "MyVg" successfully created
#!/usr/bin/python
import json
import rados
import sys
from itertools import groupby
PY2 = False
def run_command(cluster_handle, cmd):
return cluster_handle.mon_command(json.dumps(cmd), b'', timeout=5)
@sebastian-philipp
sebastian-philipp / mypy_report.txt
Last active July 25, 2020 10:37
Ceph mypy report
pybind/Found 70 errors in 3 files (checked 3 source files)
pybind/mgr/Found 966 errors in 119 files (checked 213 source files)
ceph-volume/ceph_volume/Found 115 errors in 17 files (checked 45 source files)
ceph-volume/ceph_volume/api/lvm.py: note: In function "_splitname_parser":
ceph-volume/ceph_volume/api/lvm.py:70: error: Need type annotation for 'parsed' (hint: "parsed: Dict[<type>, <type>] = ...")
ceph-volume/ceph_volume/api/lvm.py: note: In function "_is_vdo":
ceph-volume/ceph_volume/api/lvm.py:218: error: Need type annotation for 'devices' (hint: "devices: List[<type>] = ...")
ceph-volume/ceph_volume/api/lvm.py: note: In member "set_tags" of class "PVolume":
ceph-volume/ceph_volume/api/lvm.py:336: error: "PVolume" has no attribute "pv_name"
ceph-volume/ceph_volume/api/lvm.py:336: error: "PVolume" has no attribute "pv_uuid"
@sebastian-philipp
sebastian-philipp / json_to_plain.py
Created November 29, 2018 13:06
json_to_plain.py -- convert any JSON to plain text.
import json
from prettytable import PrettyTable
from functools import reduce
from orchestrator import InventoryDevice, InventoryNode, ServiceDescription
d = [
{
"path": "/dev/nvme0n1",
### Keybase proof
I hereby claim:
* I am sebastian-philipp on github.
* I am sebastianwagner (https://keybase.io/sebastianwagner) on keybase.
* I have a public key whose fingerprint is 6FF5 5FAC A1E2 3BEA CB21 0E0D 8D24 4280 7E69 79F8
To claim this, I am signing this object: