1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 03:54:15 +00:00

increase nginx timeout. Enable live snapshot.

This commit is contained in:
catborise 2020-11-06 14:30:41 +03:00
parent 9aed7c7716
commit 4b7554ea14
4 changed files with 16 additions and 28 deletions

View file

@ -196,9 +196,9 @@ server {
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_connect_timeout 1800;
proxy_read_timeout 1800;
proxy_send_timeout 1800;
client_max_body_size 1024M;
}
}

View file

@ -16,9 +16,9 @@ server {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_set_header X-Forwarded-Ssl off;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_connect_timeout 1800;
proxy_read_timeout 1800;
proxy_send_timeout 1800;
client_max_body_size 1024M;
}

View file

@ -18,8 +18,7 @@
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="takesnapshot">
{% if instance.status == 5 %}
<p>{% trans "This may take more than an hour, depending on how much content is on your instance and how large the disk is." %}</p>
<p>{% trans "This may take more than an hour, depending on how much content is on your instance and how large the disk is. It could cause web server timeout.." %}</p>
<form action="{% url 'instances:snapshot' instance.id %}" class="form-inline" method="post" role="form" aria-label="Create snapshot form">
{% csrf_token %}
<div class="form-group row">
@ -27,16 +26,9 @@
<input type="text" class="form-control form-control-lg" name="name" placeholder="{% trans "Enter Snapshot Name" %}" maxlength="14">
</div>
</div>
{% if instance.status == 5 %}
<input type="submit" class="btn btn-lg btn-success float-right" name="snapshot" value="{% trans "Take Snapshot" %}">
{% else %}
<button class="btn btn-lg btn-success float-right disabled">{% trans "Take Snapshot" %}</button>
{% endif %}
<input type="submit" class="btn btn-lg btn-success float-right" name="snapshot" value="{% trans "Take Snapshot" %}" onclick="showPleaseWaitDialog();">
</form>
<div class="clearfix"></div>
{% else %}
<p>{% trans "To take a snapshot please Power Off the instance." %}</p>
{% endif %}
</div>
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="managesnapshot">
{% if instance.snapshots %}

View file

@ -1063,11 +1063,7 @@ def clone(request, pk):
}
messages.error(request, msg)
elif check_instance:
<<<<<<< HEAD
msg = _("Instance '%(clone_name)s' already exists!") % {"clone_name": clone_data["name"]}
=======
msg = _("Instance '%(clone_name)s' already exists!") % {'clone_name': clone_data['name']}
>>>>>>> 159e06221af435700047a8e5ababe758a12d7579
messages.error(request, msg)
elif not re.match(r"^[a-zA-Z0-9-]+$", clone_data["name"]):
msg = _("Instance name '%(clone_name)s' contains invalid characters!") % {"clone_name": clone_data["name"]}