Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f33b8e3e7d |
@@ -1,9 +1,8 @@
|
|||||||
## Version 4.8.4
|
## Version 4.8.5
|
||||||
|
|
||||||
### Исправлено
|
### Исправлено
|
||||||
|
|
||||||
#### kvmvm
|
#### kvmvm
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BATF-1015 | Ошибка при изменении полей `ram` и `cpu`, приводящая к невозможности измения параметров виртуальной машины в resources `decort_kvmvm` и `decort_cb_kvmvm` в cloudapi/kvmvm и в cloudbroker/kvmvm |
|
| BATF-1053 | Перезагрузка виртуальной машины при изменении полей `ram` и `cpu` в resources `decort_kvmvm` и `decort_cb_kvmvm` в cloudapi/kvmvm и в cloudbroker/kvmvm |
|
||||||
| BATF-1017 | Ошибка при изменении поля `started`, приводящая к невозможности запуска виртуальной машины в resources `decort_kvmvm` в cloudapi/kvmvm |
|
|
||||||
2
Makefile
2
Makefile
@@ -7,7 +7,7 @@ ZIPDIR = ./zip
|
|||||||
BINARY=${NAME}
|
BINARY=${NAME}
|
||||||
WORKPATH= ./examples/terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAMESPACE}/${VERSION}/${OS_ARCH}
|
WORKPATH= ./examples/terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAMESPACE}/${VERSION}/${OS_ARCH}
|
||||||
MAINPATH = ./cmd/decort/
|
MAINPATH = ./cmd/decort/
|
||||||
VERSION=4.8.4
|
VERSION=4.8.5
|
||||||
OS_ARCH=$(shell go env GOHOSTOS)_$(shell go env GOHOSTARCH)
|
OS_ARCH=$(shell go env GOHOSTOS)_$(shell go env GOHOSTARCH)
|
||||||
|
|
||||||
FILES = ${BINARY}_${VERSION}_darwin_amd64\
|
FILES = ${BINARY}_${VERSION}_darwin_amd64\
|
||||||
|
|||||||
@@ -866,10 +866,14 @@ func resourceComputeUpdate(ctx context.Context, d *schema.ResourceData, m interf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note bene: numa_affinity, cpu_pin and hp_backed, cpu, ram are not allowed to be changed for compute in STARTED tech status.
|
// Note bene: numa_affinity, cpu_pin, old_cpu > new_cpu and hp_backed are not allowed to be changed for compute in STARTED tech status.
|
||||||
// If STARTED, we need to stop it before update
|
// If STARTED, we need to stop it before update
|
||||||
var isStopRequired bool
|
var isStopRequired bool
|
||||||
if d.HasChanges("numa_affinity", "cpu_pin", "hp_backed", "chipset", "preferred_cpu", "ram", "cpu") && d.Get("started").(bool) {
|
if d.HasChanges("numa_affinity", "cpu_pin", "hp_backed", "chipset", "preferred_cpu") && d.Get("started").(bool) {
|
||||||
|
isStopRequired = true
|
||||||
|
}
|
||||||
|
old, new := d.GetChange("cpu")
|
||||||
|
if old.(int) > new.(int) && d.Get("started").(bool) {
|
||||||
isStopRequired = true
|
isStopRequired = true
|
||||||
}
|
}
|
||||||
if isStopRequired {
|
if isStopRequired {
|
||||||
|
|||||||
@@ -114,7 +114,13 @@ func utilityComputeResize(ctx context.Context, d *schema.ResourceData, m interfa
|
|||||||
c := m.(*controller.ControllerCfg)
|
c := m.(*controller.ControllerCfg)
|
||||||
computeId, _ := strconv.ParseUint(d.Id(), 10, 64)
|
computeId, _ := strconv.ParseUint(d.Id(), 10, 64)
|
||||||
|
|
||||||
if d.Get("started").(bool) {
|
var isStopRequired bool
|
||||||
|
old, new := d.GetChange("cpu")
|
||||||
|
if d.Get("started").(bool) && (old.(int) > new.(int)) {
|
||||||
|
isStopRequired = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if isStopRequired {
|
||||||
stopReq := compute.StopRequest{
|
stopReq := compute.StopRequest{
|
||||||
ComputeID: computeId,
|
ComputeID: computeId,
|
||||||
Force: false,
|
Force: false,
|
||||||
@@ -179,7 +185,7 @@ func utilityComputeResize(ctx context.Context, d *schema.ResourceData, m interfa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if d.Get("started").(bool) {
|
if isStopRequired {
|
||||||
if _, err := c.CloudBroker().Compute().Start(ctx, compute.StartRequest{ComputeID: computeId}); err != nil {
|
if _, err := c.CloudBroker().Compute().Start(ctx, compute.StartRequest{ComputeID: computeId}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user