Gitで特定のコミットの差分を見る

git show コマンドを使えばよい。引数にはコミットハッシュ。もちろんHEADやHEAD^も使える。
$ git show 23343dbc

OpenStackでErrorやSuspendがずっと続くインスタンスをリセットする。

Adminで以下のようにして対象のインスタンスのIDを調べる。
$ nova list --all-tenant
そのIDを指定してreset-stateコマンドを実行。
$ nova reset-state --active  3275980c-3142-489f-b722-fca73adb98c3

マシンが停止している場合、ハードリブートすれば、再起動する。

OpenStackのNovaですべてのテナントのリストを表示

$ nova list --all-tenant 1

Ubuntu 14.04にRedmineをインストール

まず、apt-getでRedmineとpassengerパッケージをインストール
# apt-get install redmine libapache2-mod-passenger
# gem install bundler
/etc/apache2/sites-available/000-default.confのVirtualHostタグ内に次の内容を追加
        <Directory /var/www/html/redmine>
                RailsBaseURI /redmine
                PassengerResolveSymlinksInDocumentRoot on
        </Directory>
/etc/apache2/conf.d/passenger.confに次の内容を記述
RailsBaseURI /redmine
リンクを作成。
ln -s /usr/share/redmine/public /var/www/html/redmine
# chmod 666 /usr/share/redmine/*
必要に応じて以下のパーミッションを確認
/var/lib/dbconfig-common/sqlite3/redmine/instances/default/redmine_default

OpenStackでコマンドラインでイメージを登録する例

$ glance image-create --name='image name' --is-public=true --container-format=bare --disk-format=qcow2 < file.img
イメージを標準入力から受け取るので、以下のようにcurlでダウンロードしながら、それを登録することもできる。
$ curl https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img | glance image-create --name='Ubuntu Server 14.04 LTS' --is-public=true --container-format=bare --disk-format=qcow2

Neutoron serverがpackage upgradeにより起動しなくなった場合の対応方法

Packageをアップデートした後、以下のエラーでNeutron serverが起動しなくなった。
# /etc/init.d/neutron-server start
neutron-db-check: ERROR: neutron database does not have version information. You must run the "neutron-db-manage stamp" command before starting neutron services.
以下のようにするとこの問題は解決した。
# neutron-db-manage --config-file /etc/neutron/neutron.conf stamp havana
No handlers could be found for logger "neutron.common.legacy"
INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.