Skip to content

Instantly share code, notes, and snippets.

View kskmori's full-sized avatar

Keisuke MORI kskmori

View GitHub Profile
@kskmori
kskmori / PR320-IPaddr2-reproduce.sh
Created June 18, 2014 03:29
Script to reproduce IPaddr2 issue regarding to resource-agents PR#320
#!/bin/sh
export OCF_ROOT=/usr/lib/ocf
export OCF_RESKEY_ip=192.168.100.251
export OCF_RESKEY_netmask=24
export OCF_RESKEY_nic=eth0
LOGDIR=/tmp/netdev
LOG=$LOGDIR/ipaddr2.log
@kskmori
kskmori / testipv6-pr1109.sh
Created March 1, 2018 06:27
quick test script for resource-agents PR1109
#!/bin/sh
# quick test script for resource-agents PR1109
# https://github.com/ClusterLabs/resource-agents/pull/1109
# specify RA path for testing
#RA=./IPaddr2.org
#RA=./IPaddr2.PR1109
RA=./IPaddr2.iproute
@kskmori
kskmori / winsvc.py
Created April 20, 2018 09:23
python windows service test script
#!/usr/bin/env python
import logging
import os
import signal
import sys
import win32serviceutil
logging.basicConfig(
# invoke as:
# powershell -NoProfile -ExecutionPolicy Unrestricted -NonInteractive .\findif.ps1
#
Param(
[Parameter(Mandatory=$True,Position=1)][string]$IPAddress,
[Parameter(Mandatory=$True,Position=2)][string]$InterfaceAddress
)
# check if the ipaddr is already assigned
@kskmori
kskmori / 00-debug.yml
Created August 26, 2019 06:45
osc2018tk-demo sudo install debug.yml
- hosts: 127.0.0.1
connection: local
become: true
max_fail_percentage: 0
tasks:
- name: debug
debug:
var: ansible_facts
@kskmori
kskmori / IPaddr2-ipv6-sanitize
Last active September 11, 2019 10:00
OCFT test case for IPaddr2 IPv6 address sanitization
# IPaddr2-ipv6-sanitize
#
# usage:
# ocft make -d . IPaddr2-ipv6-sanitize
# ocft test -v -X IPaddr2-ipv6-sanitize
#
# inspect log files:
# /var/lib/resource-agents/ocft/cases/logs/IPaddr2-ipv6-sanitize.log
# /var/lib/heartbeat/trace_ra/IPaddr2/*
@kskmori
kskmori / drbd build commands
Last active October 8, 2019 10:05
Build drbd-9.* on CentOS 7
$ curl -L -O https://www.linbit.com/downloads/drbd/utils/drbd-utils-9.10.0.tar.gz
$ tar xfvz drbd-utils-9.10.0.tar.gz
$ cd drbd-utils-9.10.0/
$ ./configure
$ make rpm RPMOPT="--without sbinsymlinks"
# rpm -ivh drbd-utils-9.10.0-1.el7.x86_64.rpm
準備しています... ################################# [100%]
更新中 / インストール中...
1:drbd-utils-9.10.0-1.el7 ################################# [100%]
@kskmori
kskmori / trac2md.py
Last active August 14, 2024 11:43
Trac Wiki to Markdown converter
#!/usr/bin/env python
#
# Trac Wiki to Markdown converter
#
# Copyright(c) 2019 Keisuke MORI ([email protected])
#
# This program 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; either version 2
# of the License, or (at your option) any later version.
@kskmori
kskmori / git-spec-import
Last active November 22, 2019 04:13
a git extention to import patches from the RPM spec file to a git branch
#!/bin/sh
#
# git spec-import
# a git extention to import patches from the RPM spec file to a git branch
#
# Copyright(c) 2019 Keisuke MORI ([email protected])
#
# This program 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; either version 2
@kskmori
kskmori / trac2adoc.py
Created September 18, 2020 09:21
trac2adoc.py: a tiny Trac to AsciiDOC converter
#!/usr/bin/env python
#
# Trac Wiki to Markdown converter
#
# Copyright(c) 2019 Keisuke MORI ([email protected])
#
# This program 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; either version 2
# of the License, or (at your option) any later version.