Skip to content

Instantly share code, notes, and snippets.

View ronen-fr's full-sized avatar

Ronen Friedman ronen-fr

  • Red Hat
View GitHub Profile
@ronen-fr
ronen-fr / run_slow
Created April 3, 2024 13:54
example of initiating a slow deep-scrub
#
MDS=1 MGR=1 OSD=4 MON=1 ../src/vstart.sh -n --without-dashboard -n --msgr2 -X --memstore -o "memstore_device_bytes=68435456" -o "osd_op_queue=wpq"
sleep 5
bin/ceph -s
bin/ceph config set global osd_pool_default_pg_autoscale_mode off
sleep 2
bin/ceph osd pool create pl1 8 8
@ronen-fr
ronen-fr / gsoc24_wip_2.md
Last active March 11, 2024 15:56
GSOC24 - suggested description

Tidy Up Song

Background

Static analysis is a powerful tool when searching for code issues. It does, however, have its costs. Careful tuning is required so that the developers are not overwhelmed with "false positive" detections, while on the other hand - critical errors are not missed. It also requires simple integration into the development flow, so that new issues are continuously detected and addressed.

In this project we use clang-tidy for automated static analysis

@ronen-fr
ronen-fr / gsoc24_wip_1.md
Created March 5, 2024 14:26
GSOC24 - first edit of Yuval's

Tidy Up Song

Background

Static analysis is a powerful tool when searching for code issues. It does, however, have its costs. Careful tuning is required so that the developers are not overwhelmed with "false positive" detections, while on the other hand - critical errors are not missed. It also requires simple integration into the development flow, so that new issues are continuously detected and addressed.

In this project we use clang-tidy for automated static analysis

@ronen-fr
ronen-fr / 04092023_cpptools_log1
Created September 4, 2023 06:41
re vscode issue
-------- Diagnostics - 9/4/2023, 1:39:29 AM
Version: 1.17.5
Current Configuration:
{
"name": "Linux",
"includePath": [
"/mnt/nvme0/src/k5/ceph/**"
],
"defines": [],
"compilerPath": "/usr/lib64/ccache/clang++",
@ronen-fr
ronen-fr / scrub-dump-timeline.txt
Created February 23, 2023 16:24
timeline of scrub reservations vs osd-scrub-dump.sh collected data
0 166221 2023 02 15T23 47 38 823+0000 7f1eb72ce700 15 osd 0 pg_epoch 50 pg[3 6( v 47'64 (0'0,47'64] local lis/les=41/43 n=64 ec=41/41 lis/c=41/41 les/c/f=43/43/0 sis=41) [0,1,4] r=0 lpr=41 crt=47'64 lcod 47'63 mlcod 47'63 active+clean] scrubber<NotActive> reserve_local local resources reserved
1 218584 2023 02 15T23 47 38 823+0000 7f6c6c685700 20 osd 1 scrub queue inc_scrubs_remote 0 > 1 (max 4, local 0)
1 218618 2023 02 15T23 47 38 862+0000 7f6c7feac700 15 osd 1 pg_epoch 50 pg[1 a( v 47'61 (0'0,47'61] local lis/les=32/33 n=61 ec=32/32 lis/c=32/32 les/c/f=33/34/0 sis=32) [1,2,4] r=0 lpr=32 crt=47'61 lcod 47'60 mlcod 47'60 active+clean] scrubber<NotActive> reserve_local local resources reserved
2 148602 2023 02 15T23 47 38 927+0000 7fbf7973f700 20 osd 2 scrub queue inc_scrubs_remote 0 > 1 (max 4, local 0)
4 199823 2023 02 15T23 47 38 890+0000 7fd96b2f9700 20 osd 4 scrub queue inc_scrubs_remote 0 > 1 (max 4, local 0)
4 199942 2023 02 15T23 47 38 890+0000 7fd96bafa700 20 osd 4 scrub queue inc_
@ronen-fr
ronen-fr / teu_collect.py
Created October 26, 2022 06:00
~/teu_collect_oct.py -v --logs --parse rfriedma-2022-10-22_18:19:41-rados:thrash-rf-tous1-ci-2110-distro-default-smithi 7077467
#!/usr/bin/python3
import sys
import argparse
import datetime
import subprocess
import tempfile
import os
import pathlib
import re
@ronen-fr
ronen-fr / clang-format-0908
Created August 9, 2022 11:39
clang-format configuration (matching some requests)
---
Language: Cpp
BasedOnStyle: Google
AlignAfterOpenBracket: AlwaysBreak
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
#AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
@ronen-fr
ronen-fr / test_scrubber_be.cc
Created February 14, 2022 12:41
question re test_scrubber_be.cc
#include <gtest/gtest.h>
#include <signal.h>
#include <stdio.h>
#include "common/async/context_pool.h"
#include "common/ceph_argparse.h"
#include "mon/MonClient.h"
#include "msg/Messenger.h"
#include "os/ObjectStore.h"
#include "osd/OSD.h"
@ronen-fr
ronen-fr / order.awk
Created January 30, 2022 06:17
gawk -v PGID=21.37a7 -f order.awk < log
#!/bin/gawk
# call with the "pg of interest" as parameter, as in:
# gawk -v PGID=21.37a7 -f this-file < log
func logtm(tst)
{
gsub(/[:.]/," ",tst); split(tst,x);
return x[1]*3600 + x[2]*60 + x[3] + x[4]/1000.0
}
@ronen-fr
ronen-fr / pulpito.py
Created August 9, 2021 14:35
querying remotes of running jobs
#!/usr/bin/python3
from bs4 import BeautifulSoup
import re
import requests
import argparse
import subprocess
import sys
import os
import pathlib