Skip to content

Instantly share code, notes, and snippets.

View rjarry's full-sized avatar

Robin Jarry rjarry

  • Red Hat
  • Paris, France
View GitHub Profile

Topology

+--------+     VLAN 280      +------+
|       0+-------------------+      |
| trex   |     VLAN 290      |      |
|       1+-------------------+      |
+--------+                   |      |
                             |      |
+--------+     VLAN 280      |      |
@rjarry
rjarry / mutex-bug.patch
Last active June 25, 2020 19:45
Tooling to reproduce a dead lock with sysrepo shared mutex
From 820aed8c8bc479b0866e6488a4bd980546547dda Mon Sep 17 00:00:00 2001
From: Robin Jarry <robin.jarry@6wind.com>
Date: Thu, 25 Jun 2020 10:37:32 +0200
Subject: mutex bug
First, build libyang and sysrepo
Then:
cd sysrepo/mutex-bug
@rjarry
rjarry / cleanup-db-postgres.sql
Created December 15, 2019 09:47
Buildbot database cleanup script for postgresql
BEGIN;
-- Delete all sourcestamps without any changes.
DELETE FROM sourcestamps WHERE id NOT IN (SELECT sourcestampid FROM changes);
-- Modify the foreign key constraint on changes.parent_changeids.
-- This is mandatory to allow deleting old changes without deleting all
-- "child" changes in cascade.
ALTER TABLE ONLY changes DROP CONSTRAINT changes_parent_changeids_fkey;

Keybase proof

I hereby claim:

  • I am rjarry on github.
  • I am diabeteman (https://keybase.io/diabeteman) on keybase.
  • I have a public key ASAyLYZJzkFuQk7iEC1wDl355Mn9JR9gItD1zyEi8cGZQAo

To claim this, I am signing this object:

@rjarry
rjarry / cleanupdb.sql
Last active December 15, 2019 09:48
Buildbot database cleanup script for any backend (sqlite, mysql)
-- This file is part of Buildbot. Buildbot is free software: you can
-- redistribute it and/or modify it under the terms of the GNU General Public
-- License as published by the Free Software Foundation, version 2.
--
-- This program is distributed in the hope that it will be useful, but WITHOUT
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-- details.
--
-- You should have received a copy of the GNU General Public License along with
@rjarry
rjarry / new-kernel-pkg.patch
Last active August 29, 2015 14:05
new-kernel-pkg_grub-mkconfig
--- a/sbin/new-kernel-pkg 2014-08-28 14:31:33.850957813 +0200
+++ b/sbin/new-kernel-pkg 2014-08-28 15:08:01.832738130 +0200
@@ -23,7 +23,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-PATH=/sbin:/bin:$PATH
+PATH=/sbin:/bin:/usr/sbin:$PATH
lilo=/sbin/lilo
--- a/etc/grub.d/00_header 2014-07-18 18:06:43.409469512 +0200
+++ b/etc/grub.d/00_header 2014-07-18 18:02:34.733561337 +0200
@@ -101,23 +101,43 @@ function savedefault {
}
EOF
+boot_part_writeable() {
+ for abstraction in "$(grub-probe --target=abstraction "${grubdir}")";
+ do
+ case "$abstraction" in