2017年4月20日木曜日

libvirt からの xxx-nic っていう interface について

FAQ なんだろうけどメモ。

例えば libvirt のデフォルトのネットワークの場合、virbr0 というブリッジに
virbr0-nic っていう interface がアタッチされている。
これはなんぞやといつも不思議に思っていたものの気にせず、ホストからの接続のた
めのダミー NIC か何かかと勝手に決めつけて放置していた。が、いつも link down
してるのでやっぱり気持ち悪いので調べることに。

ソース読む ability も power も無く、ググッて見つけたのがこれ。↓

https://www.redhat.com/archives/libvirt-users/2012-September/msg00038.html

| It's a workaround for kernel bug/feature. The bridge's MAC is copied
| from the first NIC attached. So if one detach all interfaces from a
| bridge and then attach just one, the bridge will lost previous MAC and
| gain a new one - just the same as the attached interface has.
|
| So if libvirt has to ensure a MAC for virtual bridge - it creates this
| dummy device (no traffic is routed through though) and just attach it to
| the virtual bridge.

うぅ、これ Red Hat の中の人が言ってるし本当だよね?
なんと MAC アドレスを固定化させるためのダミーの NIC だったとは知らなんだ。








2017年4月12日水曜日

openstack baremetal import が返ってこない。

FAQ だろうけどメモ。表題の件、解決策は pm_password の指定方法に
あった...

https://access.redhat.com/solutions/1603243

RHOSP な環境で instackenv.json を作る時に

     "pm_type": "pxe_ssh",

にした際の pm_passwod の値をよく Web で見かける "$(cat ~/.ssh/id_rsa)"
にしちゃうと openstack baremetal import が返ってこない。長らく待って
返ってきてもエラー(エラー文字列は無くしてしまった)。

上記 URL に回避策あり。秘密鍵の値をそのまま記すが、改行の部分は「\n」
で表現する。以下例。

      "pm_password": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAwCz1ReNdQg5NxOx2ZZeOA4k+UaRAb4gobdL1lv/HJnNYlcrg\n.....................................\n6AJkDzAIQwQ1s1gjSdc7SYt1FcAPB/El0U6BAiI5lnYjWxfHAyMHkOs=\n-----END RSA PRIVATE KEY-----",


うーーん、なんちゅー仕様w。ま、ありか。