]> gitweb.fluxo.info Git - puppet-virtual.git/commitdiff
update xen stuff for lenny.
authorPietro Ferrari <pietro@riseup.net>
Wed, 11 Feb 2009 12:06:27 +0000 (04:06 -0800)
committerPietro Ferrari <pietro@riseup.net>
Wed, 11 Feb 2009 12:06:27 +0000 (04:06 -0800)
manifests/xen.pp

index 35a5c4a27f42b23e8d19e97dc2fe530c0483993d..7dce210a2bff988718350a0a8d3136ccbc0fac67 100644 (file)
@@ -85,23 +85,33 @@ class xen::domain::centos inherits xen::domain::base {
 }
 
 class xen::domain::debian inherits xen::domain::base {
-       # This package is i386 only
-       # See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=379444
-       case $architecture {
-               'i386': {
-                       package { libc6-xen:
-                               ensure => 'present',
-                       }
-               }
-       }
+  $xen-linux-system = ? {
+    amd64 => xen-linux-system-2.6.26-1-xen-amd64,
+    i386 => xen-linux-system-2.6.26-1-xen-686
+  }
 
-       config_file {
-               "/etc/ld.so.conf.d/nosegneg.conf":
-                       ensure => $xen_ensure,
-                       content => "hwcap 0 nosegneg\n",
-    }
+  package {
+    $xen-linux-system:
+      ensure => present,
+      alias => "xen-linux-system";
+  }
+
+  # fix '4gb seg fixup'
+  # http://wiki.xensource.com/xenwiki/XenFaq#head-e05786f1e0d6a833bc146a6096cab2d96f2b30ae
+  config_file {
+    "/etc/ld.so.conf.d/libc6-xen.conf":
+      content => "hwcap 0 nosegneg\n",
+      require => Package["xen-linux-system"],
+      notify => Exec["ldconfig"];
+  }
+
+  exec {
+    "/sbin/ldconfig":
+       refreshonly => true;
+  }
 }
 
+
 class xen::dom0 inherits xen::domain { 
     case $operatingsystem {
         debian: { include xen::dom0::debian }
@@ -111,18 +121,16 @@ class xen::dom0 inherits xen::domain {
 }
 
 class xen::dom0::base {}
+
 class xen::dom0::centos inherits xen::dom0::base {
     package{ [ "xen", "xen-libs"]:
         ensure => present,
     }
 }
+
 class xen::dom0::debian inherits xen::dom0::base {
-       # install the packages required for managing xen
-       package { 
-               [ "xen-hypervisor-3.0.3-1-$architecture",
-                 "linux-image-xen-$architecture",
-                 'libsysfs2' 
-               ]:
-                       ensure => present
-       }
+  package {
+    "xen-tools":
+      ensure => present;
+  }
 }