fix error in stop metadata
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
feee5aca8a
commit
1262c07900
1 changed files with 2 additions and 1 deletions
|
|
@ -77,6 +77,7 @@ function qemu_stop_vm {
|
|||
local ip="$(echo "${vm_def}" | cut -d\; -f 5)"
|
||||
local subnet_def=$(get_from_db "subnet" "${subnet_name}")
|
||||
local vpc_name="$(echo "${subnet_def}" | cut -d\; -f 2)"
|
||||
local gateway_ip="$(echo "${subnet_def}" | cut -d\; -f 5 | cut -d\/ -f 1)"
|
||||
|
||||
|
||||
local unix_path="/tmp/${vm_name}.qmp-sock"
|
||||
|
|
@ -88,7 +89,7 @@ function qemu_stop_vm {
|
|||
print_in_color "${COLOR_RED}" "Delete tap${tap_id}"
|
||||
ip -n "${vpc_name}" link del dev "tap${tap_id}"
|
||||
|
||||
metadata_stop "${vpc_name}" "${ip}" "${metadata_port}"
|
||||
metadata_stop "${vpc_name}" "${gateway_ip}" "${metadata_port}"
|
||||
delete_in_db "vm" "${vm_name}"
|
||||
|
||||
print_in_color "${COLOR_GREY}" "Try to delete ${subnet_name}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue