Permalink
Browse files

Fixing limits.conf to just use integers.

  • Loading branch information...
1 parent bb803c5 commit 3bb1c95f91d18a91fe3c49e74ea7dc268ea3c24f @samuelclay committed Mar 26, 2013
Showing with 9 additions and 7 deletions.
  1. +9 −7 fabfile.py
View
@@ -325,7 +325,8 @@ def setup_db(engine=None, skip_common=False):
setup_db_firewall()
setup_db_motd()
copy_task_settings()
- setup_memcached()
+ if engine == "memcached":
+ setup_memcached()
if engine == "postgres":
setup_postgres(standby=False)
elif engine == "postgres_slave":
@@ -529,15 +530,15 @@ def setup_logrotate():
put('config/logrotate.conf', '/etc/logrotate.d/newsblur', use_sudo=True)
def setup_ulimit():
- # Increase File Descriptor limits.
+ # Increase File Descriptor limits.
run('export FILEMAX=`sysctl -n fs.file-max`', pty=False)
sudo('mv /etc/security/limits.conf /etc/security/limits.conf.bak', pty=False)
sudo('touch /etc/security/limits.conf', pty=False)
sudo('chmod 666 /etc/security/limits.conf', pty=False)
- run('echo "root soft nofile $FILEMAX" >> /etc/security/limits.conf', pty=False)
- run('echo "root hard nofile $FILEMAX" >> /etc/security/limits.conf', pty=False)
- run('echo "* soft nofile $FILEMAX" >> /etc/security/limits.conf', pty=False)
- run('echo "* hard nofile $FILEMAX" >> /etc/security/limits.conf', pty=False)
+ run('echo "root soft nofile 10000" >> /etc/security/limits.conf', pty=False)
+ run('echo "root hard nofile 10000" >> /etc/security/limits.conf', pty=False)
+ run('echo "* soft nofile 10000" >> /etc/security/limits.conf', pty=False)
+ run('echo "* hard nofile 10000" >> /etc/security/limits.conf', pty=False)
sudo('chmod 644 /etc/security/limits.conf', pty=False)
# run('touch /home/ubuntu/.bash_profile')
@@ -926,7 +927,8 @@ def setup_do(name, size=2):
size_id=size_id,
image_id=image_id,
region_id=region_id,
- ssh_key_ids=[str(ssh_key_id)])
+ ssh_key_ids=[str(ssh_key_id)],
+ virtio=True)
print "Booting droplet: %s/%s (size: %s)" % (instance.id, IMAGE_NAME, INSTANCE_SIZE)
instance = doapi.show_droplet(instance.id)

0 comments on commit 3bb1c95

Please sign in to comment.