Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
a50d80af
Commit
a50d80af
authored
Feb 14, 2020
by
Francesc Guasch
Browse files
refactor(backend): cope with already removed volumes
parent
b31831bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/Domain/KVM.pm
View file @
a50d80af
...
...
@@ -339,7 +339,8 @@ sub _disk_device($self, $with_info=undef, $attribute=undef, $value=undef) {
my
(
$boot_node
)
=
$disk
->
findnodes
('
boot
');
my
$info
=
{};
$info
=
$self
->
_volume_info
(
$file
)
if
$file
&&
$device
eq
'
disk
';
eval
{
$info
=
$self
->
_volume_info
(
$file
)
if
$file
&&
$device
eq
'
disk
'
};
die
$@
if
$@
&&
$@
!~
/not found/i
;
$info
->
{
device
}
=
$device
;
if
(
!
$info
->
{
name
}
)
{
if
(
$file
)
{
...
...
t/vm/35_remove2.t
View file @
a50d80af
...
...
@@ -45,6 +45,12 @@ sub test_remove_domain_volumes_already_gone {
next
if
$file
=~
/iso/
;
unlink
$file
or
die
"
$!
$file
";
}
$domain
->
storage_refresh
()
if
$vm
->
type
ne
'
Void
';
my
@volumes
=
$domain
->
list_volumes_info
();
for
my
$vol
(
@volumes
)
{
next
if
$vol
->
file
=~
/\.iso$/
;
ok
(
!-
e
$vol
->
file
);
}
eval
{
$domain
->
remove
(
user_admin
)
};
is
(''
.
$@
,'',
$vm
->
type
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment