Fix munin, kernel modules in container
| ... | ... |
@@ -29,6 +29,7 @@ if ! which cgdelete | grep -q cgdelete; then |
| 29 | 29 |
cd libcgroup-0.37.1 |
| 30 | 30 |
./configure |
| 31 | 31 |
make install |
| 32 |
+ ldconfig |
|
| 32 | 33 |
fi |
| 33 | 34 |
|
| 34 | 35 |
# Create lxc configuration |
| ... | ... |
@@ -99,6 +100,11 @@ echo stack:pass | chroot $ROOTFS chpasswd |
| 99 | 99 |
# stack requires) |
| 100 | 100 |
echo "stack ALL=(ALL) NOPASSWD: ALL" >> $ROOTFS/etc/sudoers |
| 101 | 101 |
|
| 102 |
+# Copy kernel modules |
|
| 103 |
+mkdir -p $ROOTFS/lib/modules/`uname -r`/kernel |
|
| 104 |
+cp -p /lib/modules/`uname -r`/modules.dep $ROOTFS/lib/modules/`uname -r`/ |
|
| 105 |
+cp -pR /lib/modules/`uname -r`/kernel/net $ROOTFS/lib/modules/`uname -r`/kernel/ |
|
| 106 |
+ |
|
| 102 | 107 |
# Gracefully cp only if source file/dir exists |
| 103 | 108 |
function cp_it {
|
| 104 | 109 |
if [ -e $1 ] || [ -d $1 ]; then |
| ... | ... |
@@ -74,7 +74,7 @@ NOVNC_DIR=$DEST/noVNC |
| 74 | 74 |
MUNIN_DIR=$DEST/openstack-munin |
| 75 | 75 |
|
| 76 | 76 |
# Specify which services to launch. These generally correspond to screen tabs |
| 77 |
-ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash,mysql,rabbit}
|
|
| 77 |
+ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash,mysql,rabbit,munin}
|
|
| 78 | 78 |
|
| 79 | 79 |
# Use the first IP unless an explicit is set by ``HOST_IP`` environment variable |
| 80 | 80 |
if [ ! -n "$HOST_IP" ]; then |
| ... | ... |
@@ -302,7 +302,7 @@ if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then |
| 302 | 302 |
# qcow images) and kvm (hardware based virtualization). If unable to |
| 303 | 303 |
# load kvm, set the libvirt type to qemu. |
| 304 | 304 |
sudo modprobe nbd || true |
| 305 |
- if ! -e /dev/kvm; then |
|
| 305 |
+ if [ ! -e /dev/kvm ]; then |
|
| 306 | 306 |
LIBVIRT_TYPE=qemu |
| 307 | 307 |
fi |
| 308 | 308 |
# User needs to be member of libvirtd group for nova-compute to use libvirt. |