Ignore:
Timestamp:
Dec 28, 2009, 2:03:33 PM (15 years ago)
Author:
broder
Message:

Add more user-friendly error handling for common errors, so they don't
send us e-mail. (LP: #307296)

Location:
trunk/packages/invirt-web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/controls.py

    r2737 r2803  
    7474        raise InvalidInput('action', 'create',
    7575                           'VM %s is already on' % machine.name)
     76    elif 'I need' in err and 'but dom0_min_mem is' in err:
     77        raise InvalidInput('action', 'create',
     78                           "We're really sorry, but our servers don't have enough capacity to create your VM right now. Try creating a VM with less RAM, or shutting down another VM of yours. Feel free to ask %s if you would like to know when we plan to have more resources." % (config.contact))
     79    elif ('Booting VMs is temporarily disabled for maintenance, sorry' in err or
     80          'LVM operations are temporarily disabled for maintenance, sorry' in err):
     81        raise InvalidInput('action', 'create',
     82                           err)
     83    elif "Boot loader didn't return any data!" in err:
     84        raise InvalidInput('action', 'create',
     85                           "The ParaVM bootloader was unable to find an operating system to boot. Do you have GRUB configured correctly?")
     86    elif 'xc_dom_find_loader: no loader found' in err:
     87        raise InvalidInput('action', 'create',
     88                           "The ParaVM bootloader was unable to boot the kernel you have configured. Are you sure this kernel is capable of running as a Xen ParaVM guest?")
    7689    elif err:
    7790        raise CodeError('"%s" on "control %s create %s'
  • trunk/packages/invirt-web/debian/changelog

    r2765 r2803  
     1invirt-web (0.1.3) unstable; urgency=low
     2
     3  * Add some more user-friendly error handling for common errors. (LP:
     4    #307296)
     5
     6 -- Evan Broder <broder@mit.edu>  Mon, 28 Dec 2009 13:03:00 -0600
     7
    18invirt-web (0.1.2) unstable; urgency=low
    29
Note: See TracChangeset for help on using the changeset viewer.