Merge remote-tracking branch 'mainRepo/master' into 7894/show-one-time-payment-invoices
This commit is contained in:
commit
ffae844ee5
5 changed files with 23 additions and 10 deletions
14
Changelog
14
Changelog
|
@ -1,3 +1,17 @@
|
||||||
|
2.11: 2020-06-11
|
||||||
|
* Bugfix: Correct the wrong constant name (caused payment to go thru and showing error and VMs not instantiated)
|
||||||
|
2.10.8: 2020-06-10
|
||||||
|
* #8102: Refactor MAX_TIME_TO_WAIT_FOR_VM_TERMINATE to increase time to poll whether VM has been terminated or not (MR!737)
|
||||||
|
2.10.7: 2020-05-25
|
||||||
|
* Bugfix: Handle VM templates deleted in OpenNebula but VM instances still existing (MR!736)
|
||||||
|
Notes for deployment:
|
||||||
|
When deploying define a UPDATED_TEMPLATES string represented dictionary value in .env
|
||||||
|
```
|
||||||
|
# Represents Template Ids that were
|
||||||
|
# deleted and the new template Id to look for the template
|
||||||
|
# definition
|
||||||
|
UPDATED_TEMPLATES="{1: 100}"
|
||||||
|
```
|
||||||
2.10.6: 2020-03-25
|
2.10.6: 2020-03-25
|
||||||
* Bugfix: Handle Nonetype for discount's name (MR!735)
|
* Bugfix: Handle Nonetype for discount's name (MR!735)
|
||||||
2.10.5: 2020-03-17
|
2.10.5: 2020-03-17
|
||||||
|
|
|
@ -1011,14 +1011,6 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
user_hosting_key = UserHostingKey.objects.get(id=self.request.session['new_user_hosting_key_id'])
|
user_hosting_key = UserHostingKey.objects.get(id=self.request.session['new_user_hosting_key_id'])
|
||||||
user_hosting_key.user = new_user
|
user_hosting_key.user = new_user
|
||||||
user_hosting_key.save()
|
user_hosting_key.save()
|
||||||
|
|
||||||
owner = new_user
|
|
||||||
manager = OpenNebulaManager(
|
|
||||||
email=owner.username,
|
|
||||||
password=owner.password
|
|
||||||
)
|
|
||||||
keys_to_save = get_all_public_keys(new_user)
|
|
||||||
manager.save_key_in_opennebula_user('\n'.join(keys_to_save))
|
|
||||||
else:
|
else:
|
||||||
# We assume that if the user is here, his/her StripeCustomer
|
# We assume that if the user is here, his/her StripeCustomer
|
||||||
# object already exists
|
# object already exists
|
||||||
|
|
|
@ -768,6 +768,9 @@ UPDATED_TEMPLATES_DICT = {}
|
||||||
if UPDATED_TEMPLATES_STR:
|
if UPDATED_TEMPLATES_STR:
|
||||||
UPDATED_TEMPLATES_DICT = eval(UPDATED_TEMPLATES_STR)
|
UPDATED_TEMPLATES_DICT = eval(UPDATED_TEMPLATES_STR)
|
||||||
|
|
||||||
|
MAX_TIME_TO_WAIT_FOR_VM_TERMINATE = int_env(
|
||||||
|
'MAX_TIME_TO_WAIT_FOR_VM_TERMINATE', 15)
|
||||||
|
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
from .local import * # flake8: noqa
|
from .local import * # flake8: noqa
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1817,7 +1817,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
||||||
)
|
)
|
||||||
response['text'] = str(_('Error terminating VM')) + str(vm.id)
|
response['text'] = str(_('Error terminating VM')) + str(vm.id)
|
||||||
else:
|
else:
|
||||||
for t in range(15):
|
for t in range(settings.MAX_TIME_TO_WAIT_FOR_VM_TERMINATE):
|
||||||
try:
|
try:
|
||||||
manager.get_vm(vm.id)
|
manager.get_vm(vm.id)
|
||||||
except WrongIdError:
|
except WrongIdError:
|
||||||
|
@ -1840,6 +1840,10 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
logger.debug(
|
||||||
|
'Sleeping 2 seconds for terminate action on VM %s' %
|
||||||
|
vm.id
|
||||||
|
)
|
||||||
sleep(2)
|
sleep(2)
|
||||||
if not response['status']:
|
if not response['status']:
|
||||||
response['text'] = str(_("VM terminate action timed out. "
|
response['text'] = str(_("VM terminate action timed out. "
|
||||||
|
|
|
@ -266,7 +266,7 @@ class LdapManager:
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error reading int value from {}. {}"
|
"Error reading int value from {}. {}"
|
||||||
"Returning default value {} instead".format(
|
"Returning default value {} instead".format(
|
||||||
settings.LDAP_MAX_UID_PATH,
|
settings.LDAP_MAX_UID_FILE_PATH,
|
||||||
str(ve),
|
str(ve),
|
||||||
settings.LDAP_DEFAULT_START_UID
|
settings.LDAP_DEFAULT_START_UID
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue