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
b3e1acf7
Commit
b3e1acf7
authored
May 29, 2019
by
Francesc Guasch
Browse files
Merge branch 'hotfix/0.4.1'
parents
71946bd2
179b4915
Changes
3
Show whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
b3e1acf7
...
...
@@ -1236,6 +1236,8 @@ sub _upgrade_tables {
$self
->
_upgrade_table
('
grant_types
','
enabled
','
int not null default 1
');
$self
->
_upgrade_table
('
vms
','
mac
','
char(18)
');
$self
->
_upgrade_table
('
volumes
','
name
','
char(200)
');
}
...
...
lib/Ravada/Domain/KVM.pm
View file @
b3e1acf7
...
...
@@ -1652,7 +1652,7 @@ sub _find_base {
run3
(
\
@cmd
,
\
$in
,
\
$out
,
\
$err
);
my
(
$base
)
=
$out
=~
m{^backing file: (.*)}mi
;
confess
"
No base for
$file
in
$out
"
if
!
$base
;
warn
"
No base for
$file
in
$out
"
if
!
$base
;
return
$base
;
}
...
...
t/kvm/20_domain_kvm.t
View file @
b3e1acf7
...
...
@@ -55,6 +55,30 @@ sub test_remove_domain_by_name {
}
sub
test_remove_corrupt_clone
{
my
$vm
=
shift
;
my
$base
=
create_domain
(
$vm
);
$base
->
add_volume_swap
();
my
$clone
=
$base
->
clone
(
name
=>
new_domain_name
,
user
=>
user_admin
);
for
my
$file
(
$clone
->
list_disks
)
{
warn
$file
;
open
my
$out
,
'
>
',
$file
or
die
"
$!
$file
";
print
$out
"
bogus
\n
";
close
$out
;
}
eval
{
$clone
->
start
(
user_admin
)
};
diag
(
$@
);
$clone
->
shutdown_now
(
user_admin
);
$clone
->
remove
(
user_admin
);
$base
->
remove
(
user_admin
);
}
sub
search_domain_db
{
my
$name
=
shift
;
...
...
@@ -116,7 +140,6 @@ sub test_new_domain_iso {
$domain
=
$RAVADA
->
create_domain
(
name
=>
$name
,
id_iso
=>
search_id_iso
('
alpine
')
,
active
=>
$active
,
id_owner
=>
$USER
->
id
,
iso_file
=>
$iso
->
{
device
}
,
disk
=>
1024
*
1024
,
vm
=>
$BACKEND
);
};
...
...
@@ -306,6 +329,7 @@ test_vm_kvm();
remove_old_domains
();
remove_old_disks
();
test_domain
();
test_remove_corrupt_clone
(
$vm
);
test_domain_with_iso
();
test_domain_missing_in_db
();
test_domain_inactive
();
...
...
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