Changeset 2161 for trunk


Ignore:
Timestamp:
Feb 17, 2009, 5:01:23 AM (16 years ago)
Author:
andersk
Message:

Don't confuse {KB, MB, GB} with {KiB, MiB, GiB}.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-autoinstaller/common/usr/sbin/invirt-create-image

    r1497 r2161  
    33# "arguments" come in environment:
    44#  TARGET a device filename
    5 #  FSSIZE the desired filesystem size in megabytes (rest will be swap)
     5#  FSSIZE the desired filesystem size in mebibytes (rest will be swap)
    66#  ARCH, DIST, MIRROR
    77#  HOSTNAME, IP
  • trunk/packages/invirt-autoinstaller/debian/changelog

    r2128 r2161  
     1invirt-autoinstaller (0.0.14) jaunty; urgency=low
     2
     3  * Don't confuse MB with MiB.
     4
     5 -- Anders Kaseorg <andersk@mit.edu>  Tue, 17 Feb 2009 04:56:38 -0500
     6
    17invirt-autoinstaller (0.0.13) unstable; urgency=low
    28
  • trunk/packages/invirt-autoinstaller/host/usr/sbin/invirt-install

    r1497 r2161  
    1313export DIST="$3"
    1414export MIRROR="$4"
    15 export FSSIZE="$5"    # in megabytes
    16 SWAPSIZE="$6"  # in megabytes
     15export FSSIZE="$5"    # in mebibytes
     16SWAPSIZE="$6"  # in mebibytes
    1717export IP="$7"
    1818
     
    2020VGNAME=xenvg
    2121
    22 #LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
     22#LVSIZE=`lvs --noheadings --units m --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
    2323
    2424if [ -z "$IP" ]; then
     
    2626fi
    2727
    28 /sbin/lvcreate -L $(($FSSIZE+$SWAPSIZE))M -n "${NAME}_hda" $VGNAME
     28/sbin/lvcreate -L $(($FSSIZE+$SWAPSIZE))m -n "${NAME}_hda" $VGNAME
    2929
    3030export TARGET=/dev/mapper/xenvg-"$(echo "${NAME}_hda" | sed -e 's/-/--/g')"
  • trunk/packages/invirt-remote/debian/changelog

    r2135 r2161  
     1invirt-remote (0.3.6) unstable; urgency=low
     2
     3  * Don't confuse KB with KiB, or MB with MiB.
     4
     5 -- Anders Kaseorg <andersk@mit.edu>  Tue, 17 Feb 2009 04:58:06 -0500
     6
    17invirt-remote (0.3.5) unstable; urgency=low
    28
  • trunk/packages/invirt-remote/host/usr/sbin/invirt-availability

    r2114 r2161  
    99import os
    1010
    11 # return the amount of memory in kilobytes represented by s
     11# return the amount of memory in kibibytes represented by s
    1212def parseUnits(s):
    1313    num, unit = s.split(' ')
    14     return int(num) * {'kb':1, 'mb':1024}[unit.lower()]
     14    assert unit == 'kB', "unexpected unit"
     15    return int(num)
    1516
    1617def main(argv):
    1718    """
    1819    Calculate the amount of memory available for new VMs
    19     The numbers returned by xm info and xm info -c are in MB
    20     The numbers in /proc/xen/balloon have nice units
    21     All math is done in kilobytes for consistency
    22     Output is in MB
     20    The numbers returned by xm info and xm info -c are in MiB
     21    The numbers in /proc/xen/balloon are in KiB
     22    All math is done in kibibytes for consistency
     23    Output is in MiB
    2324
    2425    Bail if /etc/invirt/nocreate exists
     
    5152    xminfoc = yaml.load(output, yaml.CSafeLoader)
    5253
    53     # In kilobytes
     54    # In kibibytes
    5455    dom0minmem = int(xminfoc['dom0-min-mem']) * 1024
    5556
  • trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-create

    r2135 r2161  
    7272        max_memory = maxMemory(owner, vms.keys())
    7373        if vm_memory > max_memory:
    74             print >>sys.stderr, "owner %s requested %d MB of memory for vm %s; %d MB allowed" % (owner, vm_memory, machine_name, max_memory)
     74            print >>sys.stderr, "owner %s requested %d MiB of memory for vm %s; %d MiB allowed" % (owner, vm_memory, machine_name, max_memory)
    7575            return 1
    7676
  • trunk/packages/invirt-web/code/main.py

    r2005 r2161  
    480480                    'Quotas': """
    481481Quotas are determined on a per-locker basis.  Each locker may have a
    482 maximum of 512 megabytes of active ram, 50 gigabytes of disk, and 4
     482maximum of 512 mebibytes of active ram, 50 gibibytes of disk, and 4
    483483active machines.""",
    484484                    'Console': """
     
    489489""",
    490490                    'Windows': """
    491 <strong>Windows Vista:</strong> The Vista image is licensed for all MIT students and will automatically activate off the network; see <a href="/static/msca-email.txt">the licensing confirmation e-mail</a> for details. The installer req     uires 512 MB RAM and at least 7.5 GB disk space (15 GB or more recommended).<br>
     491<strong>Windows Vista:</strong> The Vista image is licensed for all MIT students and will automatically activate off the network; see <a href="/static/msca-email.txt">the licensing confirmation e-mail</a> for details. The installer requires 512 MiB RAM and at least 7.5 GiB disk space (15 GiB or more recommended).<br>
    492492<strong>Windows XP:</strong> This is the volume license CD image. You will need your own volume license key to complete the install. We do not have these available for the general MIT community; ask your department if they have one.
    493493"""
  • trunk/packages/invirt-web/debian/changelog

    r2134 r2161  
     1invirt-web (0.0.20) unstable; urgency=low
     2
     3  * Don't confuse MB with MiB, or GB with GiB.
     4
     5 -- Anders Kaseorg <andersk@mit.edu>  Tue, 17 Feb 2009 04:54:54 -0500
     6
    17invirt-web (0.0.19) unstable; urgency=low
    28
  • trunk/scripts/invirt-admin/invirt-admin

    r2040 r2161  
    99    echo "    --hostname, --ip, --mac, --arch, --dist, --mirror"
    1010    echo
    11     echo "  fs-size, swap-size, memory in MB"
     11    echo "  fs-size, swap-size, memory in MiB"
    1212    echo "  fs-size + swap-size will be total disk-image size"
    1313    exit 2
Note: See TracChangeset for help on using the changeset viewer.