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
7d24b6b0
Commit
7d24b6b0
authored
Jun 22, 2021
by
Francesc Guasch
Browse files
wip(install); wait for grants creation before add user
parent
4407235b
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
7d24b6b0
...
...
@@ -198,7 +198,6 @@ sub _do_create_constraints($self) {
return
;
}
}
my
$pid_file
=
Proc::PID::
File
->
new
(
name
=>
"
ravada_constraint
");
$pid_file
->
file
({
dir
=>
"
/run/user/$>
"})
if
$>
;
if
(
$pid_file
->
alive
)
{
...
...
@@ -229,6 +228,14 @@ sub _init_user_daemon {
$USER_DAEMON
=
Ravada::Auth::
SQL
->
new
(
name
=>
$USER_DAEMON_NAME
);
if
(
!
$USER_DAEMON
->
id
)
{
for
(;;)
{
my
@list
=
$self
->
_list_pids
();
last
if
!
@list
;
sleep
1
if
@list
;
$self
->
_wait_pids
();
}
$USER_DAEMON
=
Ravada::Auth::
SQL
->
new
(
name
=>
$USER_DAEMON_NAME
);
return
if
$USER_DAEMON
->
id
;
$USER_DAEMON
=
Ravada::Auth::SQL::
add_user
(
name
=>
$USER_DAEMON_NAME
,
is_admin
=>
1
...
...
@@ -3639,8 +3646,8 @@ sub _can_fork {
$req
->
at_time
(
time
+
10
);
return
0
;
}
sub
_wait_pids
{
my
$self
=
shift
;
sub
_wait_pids
($self) {
my
@done
;
for
my
$type
(
keys
%
{
$self
->
{
pids
}}
)
{
...
...
@@ -3681,6 +3688,15 @@ sub _add_pid($self, $pid, $request=undef) {
}
sub
_list_pids
($self) {
my
@alive
;
for
my
$type
(
keys
%
{
$self
->
{
pids
}}
)
{
for
my
$pid
(
keys
%
{
$self
->
{
pids
}
->
{
$type
}})
{
push
@alive
,
(
$pid
);
}
}
return
@alive
;
}
sub
_delete_pid
{
my
$self
=
shift
;
...
...
t/vm/80_network.t
View file @
7d24b6b0
...
...
@@ -15,6 +15,7 @@ $Ravada::CAN_FORK = 1;
my
$FILE_CONFIG
=
'
t/etc/ravada.conf
';
init
();
my
$RVD_BACK
=
rvd_back
();
my
$RVD_FRONT
=
rvd_front
();
...
...
@@ -163,8 +164,7 @@ sub test_interface_macvtap {
}
###############################################################################
remove_old_domains
();
remove_old_disks
();
clean
();
for
my
$vm_name
(
@VMS
)
{
my
$vm
;
...
...
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