VirtualBox

Changeset 20405 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Jun 8, 2009 1:37:56 PM (15 years ago)
Author:
vboxsync
Message:

Solaris/SMF: fix manifest and start script. Single VM crash no longer kills webservice, VBoxSVC and all VMs.

Location:
trunk/src/VBox/Installer/solaris
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/solaris/smf-vboxwebsrv.sh

    • Property svn:executable set to *
    r19201 r20405  
    5757        [ -z "$VW_TIMEOUT" ] && VW_TIMEOUT=20
    5858        [ -z "$VW_CHECK_INTERVAL" ] && VW_CHECK_INTERVAL=5
    59         su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\""
     59        exec su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --host \"$VW_HOST\" --port \"$VW_PORT\" --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\""
    6060
    6161        VW_EXIT=$?
     
    6363            echo "vboxwebsrv failed with $VW_EXIT."
    6464            VW_EXIT=1
    65         fi
    66 
    67         # Bump per-process semaphore limit of VBoxSVC
    68         PRCTLBIN=`which prctl`
    69         if test ! -f "$PRTCLBIN"; then
    70             # Wait for VBoxSVC to spawn
    71             TRIES=0
    72             while test $TRIES -le 3; do
    73                 VBOXSVC_PID=`ps -eo pid,fname | grep VBoxSVC | grep -v grep | cut -f 1 -d " "`
    74                 if test $VBOXSVC_PID -ge 0; then
    75                     $PRCTLBIN -r -n project.max-sem-ids -v 1024 $VBOXSVC_PID
    76                     if test $? -eq 0; then
    77                         echo "Successfully bumped VBoxSVC (pid $VBOXSVC_PID) semaphore id limit to 1024."
    78                     else
    79                         echo "Failed to bump VBoxSVC (pid $VBOXSVC_PID) semaphore id limit."
    80                     fi
    81                     break
    82                 else
    83                     sleep 1
    84                 fi
    85                 TRIES=`expr $TRIES + 1`
    86             done
    87             if test $TRIES -eq 3; then
    88                 echo "Stopped waiting for VBoxSVC to spawn..."
    89                 echo "Failed to bump VBoxSVC process' semaphore id limit."
    90             fi
    91         else
    92             echo "Failed to find prctl to bump VBoxSVC semaphore id limit."
    93             echo "As a result, not more than 100 VMs can be started."
    9465        fi
    9566    ;;
  • trunk/src/VBox/Installer/solaris/virtualbox-webservice.xml

    r18265 r20405  
    7676            type='method'
    7777            name='stop'
    78             exec='/opt/VirtualBox/smf-vboxwebsrv %m %{restarter/contract}'
     78            exec=':kill'
    7979            timeout_seconds='15'>
    8080            <method_context>
     
    8282            </method_context>
    8383        </exec_method>
     84
     85        <property_group name='startd' type='framework'>
     86            <!-- The default contract restarter behavior is not appropriate,
     87                 it will kill VMs if the service is restarted. -->
     88            <propval name='duration' type='astring' value='child' />
     89            <!-- sub-process core dumps/signals shouldn't restart session -->
     90            <propval name='ignore_error' type='astring' value='core,signal' />
     91        </property_group>
    8492
    8593        <property_group name='config' type='application'>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette