<div class="gmail_quote">On Wed, Oct 24, 2012 at 6:22 PM, heut2008 <span dir="ltr"><<a href="mailto:heut2008@gmail.com" target="_blank">heut2008@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
HI,all<br>
        I see the network config template file in<br>
nova/virt/interfaces.template ,and it seems to be used for config an<br>
instance with static ip,also  this template now only  is a debian<br>
format . I don't find a  flag  used for  choosing  dhcp or static<br>
template file which is injected to instance disk file.<br>
my question is should nova support  static ip configration by inject<br>
network info to disk file in the future? if so, should we support<br>
multi linux systems such as RHEL ?<br>
<span class="HOEnZb"></span></blockquote><div><br>This was already discussed on this list[1] and there's open bug <a href="https://bugs.launchpad.net/nova/+bug/678395">https://bugs.launchpad.net/nova/+bug/678395</a><br>
<br>Currently, openstack-nova RPM in Fedora overwrites this template with its own:<br><a href="http://pkgs.fedoraproject.org/cgit/openstack-nova.git/tree/nova-ifc-template">http://pkgs.fedoraproject.org/cgit/openstack-nova.git/tree/nova-ifc-template</a><br>
But it doesn't really help: _inject_net_into_fs 
in nova/virt/disk/api.py has hardcoded /etc/network/interfaces 
so neither Fedora(wrong path) nor Debian(wrong content) based guests will work.<br>This template also ends up in "network_config" metadata, which latest cloud-init expects in Debian format and tries to translate to distro specific format[2]<br>
As noted, netcf could be a solution as a distro neutral format, but question is really how common is flat injected use-case?<br><br>Cheers,<br>Alan<br><br>[1]  <a href="http://www.mail-archive.com/openstack@lists.launchpad.net/msg07532.html">http://www.mail-archive.com/openstack@lists.launchpad.net/msg07532.html</a><br>
[2] <a href="http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/distros/rhel.py#L95">http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/distros/rhel.py#L95</a><br>
<br></div></div>