Ignore:
Timestamp:
Jan 1, 2010, 7:18:12 PM (15 years ago)
Author:
gdb
Message:

Merged r2829 and 2830 into the hvirt branch

Location:
package_branches/invirt-xen-config/hvirt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-xen-config/hvirt

  • package_branches/invirt-xen-config/hvirt/debian/changelog

    r2828 r2831  
    77invirt-xen-config (0.0.27) unstable; urgency=low
    88
     9  [ Greg Brockman ]
    910  * Nuked the pinning of libxen3
    1011
    11  -- Greg Brockman <gdb@mit.edu>  Fri, 01 Jan 2010 18:28:45 -0500
     12  [ Evan Broder ]
     13  * Don't try to start sysvms in the invirt-xen-config init script. The
     14    code has never been reliable.
     15
     16 -- Evan Broder <broder@mit.edu>  Fri, 01 Jan 2010 17:58:57 -0600
    1217
    1318invirt-xen-config (0.0.26hvirt1) unstable; urgency=low
  • package_branches/invirt-xen-config/hvirt/debian/invirt-xen-config.init

    r2087 r2831  
    1414DESC="Invirt Xen host"
    1515PARENTPACKAGE=xend
    16 SYSVM_FILES=($(run-parts --list /etc/xen/sysvms))
    17 SYSVMS=("${SYSVM_FILES[@]/#\/etc\/xen\/sysvms\/}")
    1816GEN_FILES=(/etc/xen/xend-config.sxp.invirt)
    1917
     
    2321. /lib/init/std-init.sh
    2422
    25 start_sysvm() {
    26     # Attempt to start a sysvm, but only if it's not running already
    27     # somewhere on the cluster
    28    
    29     VM="$1"
    30     LV="${VM}_hda"
    31     DISK="/dev/xenvg/$LV"
    32    
    33     # Don't bother trying to start the VM if it's already running
    34     if xm list "$VM" >/dev/null 2>&1; then
    35         return 1
    36     fi
    37    
    38     RET=1
    39     # To keep multiple hosts from trying to start a VM at the same
    40     # time, lock VM creation at startup-time with a lock LV, since LV
    41     # creation is atomic
    42     if lvcreate -L 1K -n "lock_${LV}" xenvg >/dev/null 2>&1; then
    43         # If we can disable the LV, then the VM isn't already running
    44         # somewhere else
    45         if lvchange -a n "$DISK" >/dev/null 2>&1; then
    46             lvchange -a y "$DISK" >/dev/null 2>&1
    47            
    48             [ "$VERBOSE" != no ] && log_daemon_msg "Starting sysvm $VM"
    49             xm create "sysvms/$VM" >/dev/null
    50             [ "$VERBOSE" != no ] && log_end_msg $?
    51             RET=0
    52         fi
    53        
    54         # Regardless of whether we could get the lock or not, the
    55         # lvchange -a n probably disabled the LV somewhere; be sure we
    56         # clean up
    57         lvchange -a y "$DISK" >/dev/null 2>&1
    58    
    59         # Cleanup the lock, regardless of whether we started the LV
    60         lvchange -a n "/dev/xenvg/lock_${LV}" >/dev/null 2>&1
    61         lvchange -a ey "/dev/xenvg/lock_${LV}" >/dev/null 2>&1
    62         lvremove -f "/dev/xenvg/lock_${LV}" >/dev/null 2>&1
    63     fi
    64    
    65     return $RET
    66 }
    67 
    6823do_startup() {
    6924    gen_files
    70    
    71     for vm in "${SYSVMS[@]}"; do
    72         start_sysvm "$vm"
    73     done
    7425   
    7526    echo 1 >/proc/sys/net/ipv4/ip_forward
  • package_branches/invirt-xen-config/hvirt/debian/rules

    r2828 r2831  
    66        /etc/xen/qemu-ifup.invirt \
    77        /etc/xen/xend-config.sxp.invirt
     8
     9DEB_UNDIVERT_FILES_invirt-xen-config += \
     10        /etc/apt/preferences.invirt
     11
     12DEB_UNDIVERT_VERISON_/etc/apt/preferences.invirt = 0.0.27~
    813
    914include /usr/share/cdbs/1/rules/debhelper.mk
Note: See TracChangeset for help on using the changeset viewer.