Skip to content

Instantly share code, notes, and snippets.

View yosshy's full-sized avatar

Akira YOSHIYAMA yosshy

  • NEC Corporation
View GitHub Profile
@yosshy
yosshy / make_nova.sh
Last active August 29, 2015 14:06
Calltrace for Nova Juno-3
#!/bin/bash
LINE=""
DIR=`dirname $0`
/bin/grep -Ev '^#' $DIR/nova_list > /tmp/list2
while read i ; do
if [ -n "$LINE" ]; then
LINE=$LINE,$i:nova.ct.ct
else
@yosshy
yosshy / boot.log
Created September 16, 2014 01:49
Calltracer for Nova, Glance and Neutron (Juno-3)
nova-api-140029996071664 entering nova.api.openstack.compute.images.Controller.index
nova-api-140029996071664 |entering nova.image.api.API.get_all
nova-api-140029996071664 ||entering nova.image.glance.get_default_image_service
nova-api-140029996071664 |||entering nova.image.glance.GlanceImageService.__init__
nova-api-140029996071664 ||||entering nova.image.glance.GlanceClientWrapper.__init__
nova-api-140029996071664 ||||exiting nova.image.glance.GlanceClientWrapper.__init__
nova-api-140029996071664 ||||entering nova.image.download.file.get_schemes
nova-api-140029996071664 ||||exiting nova.image.download.file.get_schemes
nova-api-140029996071664 |||exiting nova.image.glance.GlanceImageService.__init__
nova-api-140029996071664 ||exiting nova.image.glance.get_default_image_service
@yosshy
yosshy / mysqlite.py
Created October 9, 2014 14:36
SQL dump converter from MySQL to SQLite
#!/usr/bin/python
import re
import sys
import shlex
inputfile = sys.argv[1]
outputfile = sys.argv[2]
@yosshy
yosshy / boot.log
Created October 24, 2014 13:43
Calltrace patches for Nova/Neutron/Glance 2014.2 (Juno Release)
nova-conductor-140567688091120 entering nova.conductor.manager.ConductorManager._object_dispatch
nova-conductor-140567688091120 exiting nova.conductor.manager.ConductorManager._object_dispatch
nova-api-139774599882064 entering nova.api.openstack.compute.images.Controller.show
nova-api-139774599882064 |entering nova.image.api.API.get
nova-api-139774599882064 ||entering nova.image.glance.get_remote_image_service
nova-api-139774599882064 |||entering nova.image.glance.GlanceImageService.__init__
nova-api-139774599882064 ||||entering nova.image.glance.GlanceClientWrapper.__init__
nova-api-139774599882064 ||||exiting nova.image.glance.GlanceClientWrapper.__init__
nova-api-139774599882064 ||||entering nova.image.download.file.get_schemes
nova-api-139774599882064 ||||exiting nova.image.download.file.get_schemes
@yosshy
yosshy / Dockerfile
Last active August 19, 2019 16:26
Dockerfile for Ubuntu 14.04 with upstart
FROM ubuntu:14.04
MAINTAINER Akira Yoshiyama <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p /etc/apt /var/run
ADD sources.list /etc/apt/sources.list
RUN rm /etc/apt/sources.list.d/*
RUN apt-get update
RUN apt-get install --reinstall -y openssh-server python-apt upstart sysvinit-utils
RUN mv /sbin/initctl.distrib /sbin/initctl
@yosshy
yosshy / boot.seq
Created December 4, 2014 16:37
seqdiag source for creating instance on OpenStack Juno
seqdiag {
client; nova-api; glance-api; nova-conductor; nova-scheduler; nova-compute; nova-compute_2; nova-compute_3; neutron-server;
client => nova-api [label ="3-40;イメージ情報取得"]{
nova-api => glance-api [label ="19-34;glance.api.v1.images.Controller.meta"];
}
client => nova-api [label ="43-46;フレーバ情報取得"];
client -> nova-api [label ="57-254;VM作成"];
nova-api => glance-api [label ="89-104;glance.api.v1.images.Controller.meta"];
@yosshy
yosshy / dhcp_server.py
Created March 21, 2015 11:09
DHCP Server with Python Scapy
from scapy.all import DHCP_am
from scapy.base_classes import Net
dhcp_server = DHCP_am(iface='eth1', domain='example.com',
pool=Net('192.168.10.0/24'),
network='192.168.10.0/24',
gw='192.168.10.254',
renewal_time=600, lease_time=3600)
dhcp_server()
@yosshy
yosshy / local.conf
Created April 26, 2015 03:59
devstack configuration
# Sample ``local.conf`` for user-configurable variables in ``stack.sh``
# NOTE: Copy this file to the root ``devstack`` directory for it to
# work properly.
# ``local.conf`` is a user-maintained setings file that is sourced from ``stackrc``.
# This gives it the ability to override any variables set in ``stackrc``.
# Also, most of the settings in ``stack.sh`` are written to only be set if no
# value has already been set; this lets ``local.conf`` effectively override the
# default values.
@yosshy
yosshy / monkeypatch_utils.py
Created April 27, 2015 06:19
monkeypatch utils
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@yosshy
yosshy / nova-boot.log
Last active August 29, 2015 14:20
calltrace of Nova/Neutron/Glance kilo on Apr. 26th
nova-api-139738565434096 entering nova.api.openstack.compute.images.Controller.index
nova-api-139738565434096 |entering nova.image.api.API.get_all
nova-api-139738565434096 ||entering nova.image.glance.get_default_image_service
nova-api-139738565434096 |||entering nova.image.download.file.get_schemes
nova-api-139738565434096 |||exiting nova.image.download.file.get_schemes
nova-api-139738565434096 ||exiting nova.image.glance.get_default_image_service
nova-api-139738565434096 ||entering nova.image.glance.GlanceImageService.detail
nova-api-139738565434096 |||entering nova.image.glance._extract_query_params
nova-api-139738565434096 |||exiting nova.image.glance._extract_query_params
nova-api-139738565434096 |||entering nova.image.glance.GlanceClientWrapper.call