shebang

Oct 30 2010

Puppet broke my Xen

Actually it didn't , but now I got your attention.
We just adopted the use of adding headers to all of our files that are managed by puppet so people will know not to touch it

  1. file {
  2. "/etc/xen/scripts/network-custom-vlan-bridges":
  3. owner => "root",
  4. group => "root",
  5. mode => "0755",
  6. content => template(
  7. "headers/header-hash.erb',
  8. "xen/co-mmx-network-custom-vlan-bridges.erb");
  9. }

All worked nice however upon bootstrapping our Xen host the bridges stopped working .. running the network-custom-vlan-bridges script manually solved everything and created the appropriate bridges. But at boottime it didn't..

I added some debug info to the script and figured it never got executed at boot time.

Turns out that when I removed the headers Xen actually does configure the bridges at boot time, Xen probably checks for a shebang at the beginning of the file.

Putting the header at the end of the file therefore solved the problem. ,