main 6.1.1
sskarimov 2 months ago
parent 54c306b13b
commit 45355b3dd3

@ -1,88 +1,12 @@
# Список изменений в версии 6.1.0 # Список изменений в версии 6.1.1
## Добавлено ## Добавлено
### Модуль decort_kvmvm
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-602 | Добавлена возможность изменения параметра `chipset` у существующей виртуальной машины. |
| BANS-620 | Добавлены параметры `cpu_pin`, `hp_backed`, `numa_affinity` для создания и изменения виртуальной машины. |
| BANS-622 | Добавлена возможность изменения параметра `description` у существующей виртуальной машины. |
| BANS-201 | Добавлен параметр `description` в связи с переименованием из `annotation`.|
| BANS-625 | Добавлен параметр `custom_fields` для создания и изменения виртуальной машины.|
### Модуль decort_k8s
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-598 | Добавлен параметр `master_chipset` для указания чипсета для master-узлов при создании кластера и параметр `workers.chipset` для указания чипсета для worker-узлов.<br>Для параметров `workers.annotations`, `workers.chipset`, `workers.ci_user_data`, `workers.cpu`, `workers.labels`, `workers.num`, `workers.ram`, `workers.taints` установлены значения по умолчанию при создании.|
### Модуль decort_disk
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Добавлен параметр `description` в связи с переименованием из `annotation`.|
### Модуль decort_lb
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Добавлен параметр `description` в связи с переименованием из `annotation`.|
### Модуль decort_vins
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Добавлен параметр `description` в связи с переименованием из `annotation`.|
### Модуль decort_rg
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Добавлен параметр `description` в связи с переименованием из `annotation`.|
## Удалено ## Удалено
### Модуль decort_group
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-656 | Удалён неиспользуемый ключ `config` в возвращаемом словаре. |
| BANS-201 | Удалены неиспользуемые параметры `annotation` и `description`.|
### Модуль decort_disk
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Удален параметр `annotation` в связи с переименованием в `description`.|
### Модуль decort_kvmvm
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Удален параметр `annotation` в связи с переименованием в `description`.|
### Модуль decort_lb
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Удален параметр `annotation` в связи с переименованием в `description`.|
### Модуль decort_rg
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Удален параметр `annotation` в связи с переименованием в `description`.|
### Модуль decort_vins
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Удален параметр `annotation` в связи с переименованием в `description`.|
### Модуль decort_bservice
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Удалены неиспользуемые параметры `annotation` и `description`.|
### Модуль decort_k8s
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BANS-201 | Удален неиспользуемый параметр `annotation`.|
## Исправлено ## Исправлено
### Модуль decort_kvmvm ### Модуль decort_kvmvm
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | --- | | --- | --- |
| BANS-9 | Исправлена ошибка, из-за которой модуль не устанавливал параметр `description` при создании виртуальной машины. | | BANS-676 | При удалении ВМ, модуль завершал свою работу ошибкой запроса к API. |
| BANS-13 | Исправлена ошибка, из-за которой модуль не возвращал ошибку при попытке уменьшить размер загрузочного диска. | | BANS-677 | Параметр `custom_fields` не устанавливался при создании ВМ без образа. |

@ -5,7 +5,7 @@
| Версия платформы | Версия модулей Ansible | | Версия платформы | Версия модулей Ansible |
|:----------------:|:--------------------------:| |:----------------:|:--------------------------:|
| 4.1.0 | 6.0.x, 6.1.x | | 4.1.0 | 6.0.x, 6.1.x |
| 4.0.0 | 5.6.x, 5.5.x, 5.4.x, 5.3.x | | 4.0.0 | 5.6.x, 5.5.x, 5.4.x, 5.3.x |
| 3.8.8, 3.8.9 | 5.2.6 | | 3.8.8, 3.8.9 | 5.2.6 |
| 3.8.7 | 5.2.5 | | 3.8.7 | 5.2.5 |

@ -268,13 +268,6 @@ class decort_kvmvm(DecortController):
if numa_affinity is None: if numa_affinity is None:
numa_affinity = 'none' numa_affinity = 'none'
if self.aparams['custom_fields'] is None:
custom_fields_disable = True
custom_fields_fields = None
else:
custom_fields_disable = self.aparams['custom_fields']['disable']
custom_fields_fields = self.aparams['custom_fields']['fields']
# if we get through here, all parameters required to create new Compute instance should be at hand # if we get through here, all parameters required to create new Compute instance should be at hand
# NOTE: KVM VM is created in HALTED state and must be explicitly started # NOTE: KVM VM is created in HALTED state and must be explicitly started
@ -291,8 +284,7 @@ class decort_kvmvm(DecortController):
chipset=self.amodule.params['chipset'], chipset=self.amodule.params['chipset'],
cpu_pin=cpu_pin, cpu_pin=cpu_pin,
hp_backed=hp_backed, hp_backed=hp_backed,
numa_affinity=numa_affinity, numa_affinity=numa_affinity)
custom_fields=custom_fields_fields)
self.comp_should_exist = True self.comp_should_exist = True
# Originally we would have had to re-read comp_info after VM was provisioned # Originally we would have had to re-read comp_info after VM was provisioned
@ -340,7 +332,19 @@ class decort_kvmvm(DecortController):
# NOTE: see NOTE above regarding libvirt "feature" and new VMs created in HALTED state # NOTE: see NOTE above regarding libvirt "feature" and new VMs created in HALTED state
if self.amodule.params['state'] not in ('halted', 'poweredoff'): if self.amodule.params['state'] not in ('halted', 'poweredoff'):
self.compute_powerstate(self.comp_info, 'started') self.compute_powerstate(self.comp_info, 'started')
if self.aparams['custom_fields'] is None:
custom_fields_disable = True
custom_fields_fields = None
else:
custom_fields_disable = self.aparams['custom_fields']['disable']
custom_fields_fields = self.aparams['custom_fields']['fields']
if not custom_fields_disable:
self.compute_set_custom_fields(
compute_id=self.comp_info['id'],
custom_fields=custom_fields_fields,
)
# read in Compute facts once more after all initial setup is complete # read in Compute facts once more after all initial setup is complete
_, self.comp_info, _ = self.compute_find(comp_id=self.comp_id) _, self.comp_info, _ = self.compute_find(comp_id=self.comp_id)
@ -409,9 +413,7 @@ class decort_kvmvm(DecortController):
aparam_custom_fields = self.amodule.params['custom_fields'] aparam_custom_fields = self.amodule.params['custom_fields']
if aparam_custom_fields is not None: if aparam_custom_fields is not None:
compute_custom_fields = self.compute_get_custom_fields( compute_custom_fields = self.comp_info['custom_fields']
compute_id=self.comp_info['id'],
)
if aparam_custom_fields['disable']: if aparam_custom_fields['disable']:
if compute_custom_fields is not None: if compute_custom_fields is not None:
self.compute_disable_custom_fields( self.compute_disable_custom_fields(
@ -543,9 +545,7 @@ class decort_kvmvm(DecortController):
ret_dict['hp_backed'] = self.comp_info['hpBacked'] ret_dict['hp_backed'] = self.comp_info['hpBacked']
ret_dict['numa_affinity'] = self.comp_info['numaAffinity'] ret_dict['numa_affinity'] = self.comp_info['numaAffinity']
ret_dict['custom_fields'] = self.compute_get_custom_fields( ret_dict['custom_fields'] = self.comp_info['custom_fields']
compute_id=self.comp_info['id'],
)
return ret_dict return ret_dict

@ -1207,6 +1207,13 @@ class DecortController(object):
ret_comp_dict['interfaces'].sort(key=lambda k: k['pciSlot']) ret_comp_dict['interfaces'].sort(key=lambda k: k['pciSlot'])
ret_rg_id = ret_comp_dict['rgId'] ret_rg_id = ret_comp_dict['rgId']
custom_fields = None
if ret_comp_dict['status'] not in ('DESTROYED', 'DELETED'):
custom_fields = self.compute_get_custom_fields(
compute_id=ret_comp_id,
)
ret_comp_dict['custom_fields'] = custom_fields
else: else:
self.result['warning'] = ("compute_get_by_id(): failed to get Compute by ID {}. HTTP code {}, " self.result['warning'] = ("compute_get_by_id(): failed to get Compute by ID {}. HTTP code {}, "
"response {}.").format(comp_id, api_resp.status_code, api_resp.reason) "response {}.").format(comp_id, api_resp.status_code, api_resp.reason)
@ -1378,8 +1385,7 @@ class DecortController(object):
start_on_create=True, start_on_create=True,
cpu_pin: bool = False, cpu_pin: bool = False,
hp_backed: bool = False, hp_backed: bool = False,
numa_affinity: Literal['none', 'loose', 'strict'] = 'none', numa_affinity: Literal['none', 'loose', 'strict'] = 'none'):
custom_fields: Optional[dict] = None):
"""Manage KVM VM provisioning. To remove existing KVM VM compute instance use compute_remove method, """Manage KVM VM provisioning. To remove existing KVM VM compute instance use compute_remove method,
to resize use compute_resize, to manage power state use compute_powerstate method. to resize use compute_resize, to manage power state use compute_powerstate method.
@ -1430,8 +1436,6 @@ class DecortController(object):
api_params['hpBacked'] = hp_backed api_params['hpBacked'] = hp_backed
api_params['numaAffinity'] = numa_affinity api_params['numaAffinity'] = numa_affinity
if custom_fields is not None:
api_params['customFields'] = json.dumps(custom_fields)
if userdata: if userdata:
api_params['userdata'] = json.dumps(userdata) # we need to pass a string object as "userdata" api_params['userdata'] = json.dumps(userdata) # we need to pass a string object as "userdata"

Loading…
Cancel
Save