Merge updates from master

This commit is contained in:
Max Meinhold 2020-10-11 13:33:43 -04:00
commit 746c50123d
No known key found for this signature in database
GPG key ID: 00B8B1017EEC103F
4 changed files with 37 additions and 14 deletions

View file

@ -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).
<br>
Written in Python Flask, proxstar removes the need for CSH members to have direct access to the proxmox web
interface.
<br>
Proxstar is also used to enforce proxmox resource limits automagically.
<br>
Available to house members at <code>proxstar.csh.rit.edu</code> 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.

View file

@ -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
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:

View file

@ -72,7 +72,7 @@
<label for="user" class="pull-left">User</label>
<select name="user" id="user" class="form-control">
{% for pool in pools %}
<option value="{{ pool }}">{{ pool }}</option>
<option value="{{ pool }}" {{ "selected" if user.name == pool else "" }}>{{ pool }}</option>
{% endfor %}
</select>
</div>

View file

@ -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