diff --git a/README.md b/README.md index aacc663..76a4976 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,25 @@ -# proxstar +Proxstar +=========== + +Proxstar is a proxmox VM web management tool used by [Rochester Institute of Technology](https://rit.edu/)'s [Computer Science House](https://csh.rit.edu). + +## Overview + +Written using [Python](http://nodejs.org), [Flask](https://npmjs.com). + +Proxstar removes the need for CSH members to have direct access to the proxmox web interface. -Proxstar is a proxmox VM web management tool used by [Computer Science House](https://csh.rit.edu). -
-Written in Python Flask, proxstar removes the need for CSH members to have direct access to the proxmox web -interface. -
Proxstar is also used to enforce proxmox resource limits automagically. -
-Available to house members at proxstar.csh.rit.edu behind PYOIDC authentication. + +It is available to house members at [proxstar.csh.rit.edu](https://proxstar.csh.rit.edu) behind PYOIDC authentication. + +## Contributing + +1. [Fork](https://help.github.com/en/articles/fork-a-repo) this repository + - Optionally create a new [git branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) if your change is more than a small tweak (`git checkout -b BRANCH-NAME-HERE`) +3. Make your changes locally, commit, and push to your fork +4. Create a [Pull Request](https://help.github.com/en/articles/about-pull-requests) on this repo for our Webmasters to review + +## Questions/Concerns + +Please file an [Issue](https://github.com/ComputerScienceHouse/proxstar/issues/new) on this repository. \ No newline at end of file diff --git a/proxstar/tasks.py b/proxstar/tasks.py index 92e5ef5..84af3cb 100644 --- a/proxstar/tasks.py +++ b/proxstar/tasks.py @@ -95,7 +95,15 @@ def delete_vm_task(vmid): starrs = connect_starrs() vm = VM(vmid) # do this before deleting the VM since it is hard to reconcile later - delete_starrs(starrs, vm.name) + retry = 0 + while retry < 3: + try: + delete_starrs(starrs, vm.name) + break + except: + retry += 1 + time.sleep(3) + continue if vm.status != 'stopped': vm.stop() retry = 0 @@ -162,12 +170,12 @@ def setup_template_task(template_id, name, user, ssh_key, cores, memory): logging.info( '[{}] Waiting until Proxmox is done provisioning.'.format(name)) set_job_status(job, 'waiting for Proxmox') - timeout = 20 + timeout = 25 retry = 0 while retry < timeout: if not VM(vmid).is_provisioned(): retry += 1 - time.sleep(3) + time.sleep(12) continue break if retry == timeout: diff --git a/proxstar/templates/create.html b/proxstar/templates/create.html index db68f6c..33973c4 100644 --- a/proxstar/templates/create.html +++ b/proxstar/templates/create.html @@ -72,7 +72,7 @@ diff --git a/requirements.txt b/requirements.txt index 6bf3af7..7b7d164 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ flask-pyoidc==1.3.0 gunicorn==19.9.0 paramiko==2.4.2 proxmoxer==1.0.3 -psutil==5.4.7 +psutil==5.6.6 psycopg2-binary==2.7.5 python-dateutil==2.7.3 raven~=6.10.0 @@ -13,7 +13,7 @@ requests==2.20.1 rq==0.12.0 rq-dashboard==0.4.0 rq-scheduler==0.8.3 -sqlalchemy==1.2.12 +sqlalchemy==1.3 sshtunnel==0.1.4 tenacity==5.0.2 websockify==0.8.0