After I installed nova on multiple machine, and created networks using "nova-mange network create ...", I failed with bug 678393. So I updated the column bridge of table networks manually. And I tried start an instance again, it failed with the messages as this bug described.
I have read the source of disk.py, it is clear that folder "/var/lib/nova/tmp/tmpuaJWRG/etc/network/" wasn't created in method _inject_net_into_fs(). So it caused the following command "tee" failed.
Contrast to _inject_net_into_fs(), in the method _inject_key_into_fs() just above, the corresponding folder is created before command tee is executed. As a reference, paste the code in following.
Firstly this bug is related with https:/ /bugs.launchpad .net/nova/ +bug/678393.
After I installed nova on multiple machine, and created networks using "nova-mange network create ...", I failed with bug 678393. So I updated the column bridge of table networks manually. And I tried start an instance again, it failed with the messages as this bug described.
I have read the source of disk.py, it is clear that folder "/var/lib/ nova/tmp/ tmpuaJWRG/ etc/network/ " wasn't created in method _inject_ net_into_ fs(). So it caused the following command "tee" failed.
Contrast to _inject_ net_into_ fs(), in the method _inject_ key_into_ fs() just above, the corresponding folder is created before command tee is executed. As a reference, paste the code in following.
def _inject_ key_into_ fs(key, fs, execute=None): join(os. path.join( fs, 'root'), '.ssh') join(sshdir, 'authorized_keys')
sshdir = os.path.
yield execute('sudo mkdir -p %s' % sshdir) # existing dir doesn't matter
yield execute('sudo chown root %s' % sshdir)
yield execute('sudo chmod 700 %s' % sshdir)
keyfile = os.path.
yield execute('sudo tee -a %s' % keyfile, '\n' + key.strip() + '\n')