import getafsgroups
import re
import string
+import dns.resolver
from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall
from invirt.config import structs as config
from webcommon import InvalidInput
name = name.lower()
if machine is not None and name == machine.name:
return None
- if not Machine.query().filter_by(name=name).count():
+ try:
+ f = open('/tmp/log', 'a')
+ dns.resolver.query('%s.%s.' % (name, config.dns.domains[0]), 'A')
+ # If the hostname didn't exist, it would have thrown an
+ # exception by now - error out
+ raise InvalidInput('name', name, 'Name is already taken.')
+ except dns.resolver.NXDOMAIN, e:
if not validMachineName(name):
raise InvalidInput('name', name, 'You must provide a machine name. Max 63 chars, alnum plus \'-\', does not begin or end with \'-\'.')
return name
- raise InvalidInput('name', name, "Name is already taken.")
+ except InvalidInput:
+ raise
+ except:
+ # Any other error is a validation failure
+ raise InvalidInput('name', name, 'We were unable to verify that this name is available. If you believe this is in error, please contact us at %s' % config.dns.contact)
def testDescription(user, description, machine=None):
if description is None or description.strip() == '':
-invirt-web-iptables (0.0.2) unstable; urgency=low
+invirt-web (0.0.5) unstable; urgency=low
- * Be sure to enable IP forwarding for VNC
+ * Add new dependency on python-dns
- -- Evan Broder <broder@mit.edu> Wed, 29 Oct 2008 01:27:48 -0400
+ -- Evan Broder <broder@mit.edu> Fri, 31 Oct 2008 22:57:41 -0400
-invirt-web-iptables (0.0.1) unstable; urgency=low
+invirt-web (0.0.4) unstable; urgency=low
- * sipb-xen-iptables -> invirt-web-iptables
+ * sipb-xen-base -> invirt-base
- -- Greg Price <price@mit.edu> Sat, 25 Oct 2008 17:47:46 -0400
+ -- Evan Broder <broder@mit.edu> Tue, 28 Oct 2008 04:23:35 -0400
-sipb-xen-iptables (3) unstable; urgency=low
+invirt-web (0.0.3) unstable; urgency=low
- * shorten initscript with std-init.sh
- * make reload work too, just for fun
+ * sipb-xen-vnc-client -> invirt-vnc-client
- -- Greg Price <price@mit.edu> Sat, 25 Oct 2008 15:37:07 -0400
+ -- Evan Broder <broder@mit.edu> Sun, 26 Oct 2008 17:28:51 -0400
-sipb-xen-iptables (2) unstable; urgency=low
+invirt-web (0.0.2) unstable; urgency=low
- * invirt-configurize sipb-xen-iptables
+ * /sipb-xen -> /invirt in apt repo URI
- -- Evan Broder <broder@mit.edu> Sun, 05 Oct 2008 01:22:25 -0400
+ -- Greg Price <price@mit.edu> Sun, 26 Oct 2008 04:56:21 -0400
-sipb-xen-iptables (1) unstable; urgency=low
+invirt-web (0.0.1) unstable; urgency=low
+
+ * sipb-xen-www -> invirt-web
+
+ -- Greg Price <price@mit.edu> Sat, 25 Oct 2008 22:09:29 -0400
+
+sipb-xen-www (3.18) unstable; urgency=low
+
+ * sipb-xen-database-common -> invirt-database
+
+ -- Evan Broder <broder@mit.edu> Sat, 25 Oct 2008 21:04:09 -0400
+
+sipb-xen-www (3.17) unstable; urgency=low
+
+ [ Quentin Smith ]
+ * Add Kerberos-authenticated web interface on port 442
+
+ [ Evan Broder ]
+ * Add config-package-dev to the build dependencies
+
+ -- Evan Broder <broder@mit.edu> Fri, 24 Oct 2008 15:32:34 -0400
+
+sipb-xen-www (3.16) unstable; urgency=low
+
+ * Shorten initscript with spiffy new library from sipb-xen-base
+ * Fix comment copy-paste error in initscript, now that it's mostly comments
+
+ -- Greg Price <price@mit.edu> Fri, 24 Oct 2008 07:19:13 -0400
+
+sipb-xen-www (3.15) unstable; urgency=low
+
+ * Use /etc/invirt/keytab instead of a separate keytab for apache
+
+ -- Evan Broder <broder@mit.edu> Sun, 19 Oct 2008 19:56:04 -0400
+
+sipb-xen-www (3.14.4) unstable; urgency=low
+
+ * allow '*' wildcard in config.errormail_exclude
+
+ -- Greg Price <price@mit.edu> Sat, 11 Oct 2008 17:32:42 -0700
+
+sipb-xen-www (3.14.3) unstable; urgency=low
+
+ * Actually stop Apache on shutdown
+
+ -- Evan Broder <broder@mit.edu> Sun, 05 Oct 2008 00:24:40 -0400
+
+sipb-xen-www (3.14.2) unstable; urgency=low
+
+ * Be a good debian package and undo what you did on uninstall
+
+ -- Evan Broder <broder@mit.edu> Sun, 05 Oct 2008 00:06:30 -0400
+
+sipb-xen-www (3.14.1) unstable; urgency=low
+
+ * Try again, now that I actually understand what the problem is
+
+ -- Evan Broder <broder@mit.edu> Sat, 04 Oct 2008 23:58:46 -0400
+
+sipb-xen-www (3.14) unstable; urgency=low
+
+ * Try to fix startup ordering problem by specifying that the new startup
+ script depends on $remote_fs
+
+ -- Evan Broder <broder@mit.edu> Sat, 04 Oct 2008 23:32:14 -0400
+
+sipb-xen-www (3.13.1) unstable; urgency=low
+
+ * Don't add another Listen 443 directive - apache gets angry
+ * And this, kids, is why you should always test your code before
+ committing
+
+ -- Evan broder <broder@mit.edu> Fri, 03 Oct 2008 22:01:22 -0400
+
+sipb-xen-www (3.13) unstable; urgency=low
+
+ * Make sure we're listening on all the necessary ports
+
+ -- Evan Broder <broder@mit.edu> Fri, 03 Oct 2008 21:40:47 -0400
+
+sipb-xen-www (3.12) unstable; urgency=low
+
+ * invirt-confiscate the SVN checkout
+
+ -- Evan Broder <broder@mit.edu> Fri, 03 Oct 2008 21:01:33 -0400
+
+sipb-xen-www (3.11) unstable; urgency=low
+
+ * fix distribution
+
+ -- Greg Price <price@mit.edu> Tue, 30 Sep 2008 23:48:37 -0400
+
+sipb-xen-www (3.10) hardy; urgency=low
+
+ * depend on debathena-afs-config and python-flup
+
+ -- Greg Price <price@mit.edu> Mon, 29 Sep 2008 05:58:01 +0000
+
+sipb-xen-www (3.9) unstable; urgency=low
+
+ * further integration of invirt.config
+
+ -- Yang Zhang <y_z@mit.edu> Fri, 8 Aug 2008 02:39:15 -0400
+
+sipb-xen-www (3.8) unstable; urgency=low
+
+ * sipb_xen_database -> invirt.database in cache_acls.py
+
+ -- Yang Zhang <y_z@mit.edu> Sun, 3 Aug 2008 19:45:19 -0400
+
+sipb-xen-www (3.7) unstable; urgency=low
+
+ uncommitted changes in /etc/apache2 on xvm.mit.edu:
+ * rewrite static/ uris for admin mode
+ * allow ~ uris
+
+ * take instance from keytab in k5start apache2.init wrapper
+
+ -- Greg Price <price@mit.edu> Mon, 4 Aug 2008 01:22:47 -0400
+
+sipb-xen-www (3.6) unstable; urgency=low
+
+ * Add Anders' kstart-using apache2 init script.
+ * Add some dependencies the svn site needs.
+ * Use daemon/xvm-2.mit.edu for svn site, as it's on xvm-2 now
+
+ -- Greg Price <price@mit.edu> Fri, 1 Aug 2008 20:23:50 -0400
+
+sipb-xen-www (3.5) unstable; urgency=low
+
+ * Use FCGI.
+ * Lengthen timeouts to let the autoinstaller work.
+
+ -- Greg Price <price@mit.edu> Sun, 15 Jun 2008 21:51:59 -0400
+
+sipb-xen-www (3.4) unstable; urgency=low
+
+ * xvm.mit.edu rather than sipb-xen-dev.mit.edu
+
+ -- Greg Price <price@mit.edu> Sun, 11 May 2008 00:49:58 -0400
+
+sipb-xen-www (3.3) unstable; urgency=low
+
+ * Fix the SVN server to point to the new AFS mountpoint
+
+ -- Evan Broder <broder@mit.edu> Fri, 9 May 2008 02:37:21 -0400
+
+sipb-xen-www (3.2) unstable; urgency=low
+
+ * Check in (part of?) the Apache config.
+ * Modify it to allow an informative front page without certs.
+ * Add that front page.
+
+ -- Greg Price <price@mit.edu> Fri, 9 May 2008 02:11:04 -0400
+
+sipb-xen-www (3.1) unstable; urgency=low
+
+ * Fixed the crontab definition
+
+ -- SIPB Xen Project <sipb-xen@mit.edu> Mon, 31 Mar 2008 05:49:32 -0400
+
+sipb-xen-www (3) unstable; urgency=low
+
+ * Refresh the ACL cache every 5 minutes
+
+ -- SIPB Xen Project <sipb-xen@mit.edu> Mon, 31 Mar 2008 05:38:16 -0400
+
+sipb-xen-www (2) unstable; urgency=low
+
+ * Create sipb-xen group in preinst script.
+
+ -- Eric Price <ecprice@sipb-xen-dev.mit.edu> Sat, 29 Mar 2008 18:45:02 -0400
+
+sipb-xen-www (1) unstable; urgency=low
* Initial Release.
- -- SIPB Xen Project <sipb-xen@mit.edu> Fri, 28 Mar 2008 21:22:12 -0500
+ -- SIPB Xen Project <sipb-xen@mit.edu> Fri, 28 Mar 2008 22:43:12 -0500