Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
2a1379b7
Commit
2a1379b7
authored
Oct 02, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates for vzctl 4.0
parent
b8238244
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
23 deletions
+67
-23
OpenVZ.pm
PVE/API2/OpenVZ.pm
+5
-1
pvestatd
bin/pvestatd
+46
-1
changelog.Debian
debian/changelog.Debian
+12
-0
control.in
debian/control.in
+1
-1
defines.mk
defines.mk
+1
-1
VNCConsole.js
www/manager/VNCConsole.js
+2
-9
Config.js
www/manager/openvz/Config.js
+0
-10
No files found.
PVE/API2/OpenVZ.pm
View file @
2a1379b7
...
...
@@ -864,7 +864,11 @@ __PACKAGE__->register_method ({
my
$remcmd
=
$remip
?
['
/usr/bin/ssh
',
'
-c
',
'
blowfish-cbc
',
'
-t
',
$remip
]
:
[]
;
my
$shcmd
=
[
'
/usr/sbin/vzctl
',
'
enter
',
$vmid
];
mkdir
"
/var/run/dtach
";
my
$shcmd
=
[
'
/usr/bin/dtach
',
'
-A
',
"
/var/run/dtach/vzctlconsole
$vmid
",
'
-r
',
'
winch
',
'
-z
',
'
/usr/sbin/vzctl
',
'
console
',
$vmid
];
my
$realcmd
=
sub
{
my
$upid
=
shift
;
...
...
bin/pvestatd
View file @
2a1379b7
...
...
@@ -6,7 +6,7 @@ use POSIX ":sys_wait_h";
use
Fcntl
'
:flock
';
use
Getopt::
Long
;
use
Time::
HiRes
qw (gettimeofday);
use
PVE::
Tools
;
use
PVE::
Tools
qw(dir_glob_foreach file_read_firstline)
;
use
PVE::
ProcFSTools
;
use
Filesys::
Df
;
use
PVE::
INotify
;
...
...
@@ -199,6 +199,45 @@ sub update_qemu_status {
}
}
sub
find_vzctl_console_pids
{
my
$res
=
{};
dir_glob_foreach
('
/proc
',
'
\
d+
',
sub
{
my
(
$pid
)
=
@_
;
my
$cmdline
=
file_read_firstline
("
/proc/
$pid
/cmdline
");
return
if
!
$cmdline
;
my
@args
=
split
(
/\0/
,
$cmdline
);
# serach for vzctl console <vmid>
return
if
scalar
(
@args
)
!=
3
;
return
if
$args
[
1
]
ne
'
console
';
return
if
$args
[
2
]
!~
m/^\d+$/
;
return
if
$args
[
0
]
!~
m|^(/usr/sbin/)?vzctl$|
;
my
$vmid
=
$args
[
2
];
push
@
{
$res
->
{
$vmid
}},
$pid
;
});
return
$res
;
}
sub
remove_stale_openvz_consoles
{
my
$vmstatus
=
PVE::OpenVZ::
vmstatus
();
my
$pidhash
=
find_vzctl_console_pids
();
foreach
my
$vmid
(
keys
%
$pidhash
)
{
next
if
defined
(
$vmstatus
->
{
$vmid
});
syslog
('
info
',
"
remove stale vzctl console for CT
$vmid
");
foreach
my
$pid
(
@
{
$pidhash
->
{
$vmid
}})
{
kill
(
9
,
$pid
);
}
}
}
sub
update_openvz_status
{
my
$ctime
=
time
();
...
...
@@ -281,6 +320,12 @@ sub update_status {
};
$err
=
$@
;
syslog
('
err
',
"
storage status update error:
$err
")
if
$err
;
eval
{
remove_stale_openvz_consoles
();
};
$err
=
$@
;
syslog
('
err
',
"
openvz console cleanup error:
$err
")
if
$err
;
}
my
$next_update
=
0
;
...
...
debian/changelog.Debian
View file @
2a1379b7
pve-manager (2.2-20) unstable; urgency=low
* openvz: use real console instead of 'vzctl enter'
* openvz: remove init-logger pagers
* dpenend on dtach (used by openvz console)
* pvestatd: remove stale 'vzctl console' processes
-- Proxmox Support Team <support@proxmox.com> Tue, 02 Oct 2012 06:49:12 +0200
pve-manager (2.2-19) unstable; urgency=low
* fix bug 178: use new API call to get next free VMID
...
...
debian/control.in
View file @
2a1379b7
...
...
@@ -3,7 +3,7 @@ Version: @VERSION@-@PACKAGERELEASE@
Section: admin
Priority: optional
Architecture: all
Depends: perl5, libtimedate-perl, apache2-mpm-prefork, libauthen-pam-perl, libintl-perl, rsync, libapache2-request-perl, libjson-perl, liblockfile-simple-perl, vncterm, qemu-server (>= 1.1-1), libwww-perl, wget, libnet-dns-perl, vlan, ifenslave-2.6 (>= 1.1.0-10), liblinux-inotify2-perl, debconf (>= 0.5) | debconf-2.0, netcat-traditional, pve-cluster, libpve-common-perl, libpve-storage-perl, libterm-readline-gnu-perl, libpve-access-control, libio-socket-ssl-perl, libfilesys-df-perl, libfile-readbackwards-perl, libfile-sync-perl, redhat-cluster-pve, resource-agents-pve, fence-agents-pve, cstream, mail-transport-agent, libxml-parser-perl, perl-suid, lzop
Depends: perl5, libtimedate-perl, apache2-mpm-prefork, libauthen-pam-perl, libintl-perl, rsync, libapache2-request-perl, libjson-perl, liblockfile-simple-perl, vncterm, qemu-server (>= 1.1-1), libwww-perl, wget, libnet-dns-perl, vlan, ifenslave-2.6 (>= 1.1.0-10), liblinux-inotify2-perl, debconf (>= 0.5) | debconf-2.0, netcat-traditional, pve-cluster, libpve-common-perl, libpve-storage-perl, libterm-readline-gnu-perl, libpve-access-control, libio-socket-ssl-perl, libfilesys-df-perl, libfile-readbackwards-perl, libfile-sync-perl, redhat-cluster-pve, resource-agents-pve, fence-agents-pve, cstream, mail-transport-agent, libxml-parser-perl, perl-suid, lzop
, dtach
Conflicts: netcat-openbsd, vzdump
Replaces: vzdump
Provides: vzdump
...
...
defines.mk
View file @
2a1379b7
...
...
@@ -2,7 +2,7 @@ RELEASE=2.2
VERSION=2.2
PACKAGE=pve-manager
PACKAGERELEASE=
19
PACKAGERELEASE=
20
BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5
...
...
www/manager/VNCConsole.js
View file @
2a1379b7
...
...
@@ -360,7 +360,7 @@ Ext.define('PVE.OpenVZConsole', {
{
text
:
gettext
(
'
Start
'
),
handler
:
function
()
{
vm_command
(
"
start
"
,
{},
1
);
vm_command
(
"
start
"
);
}
},
{
...
...
@@ -387,14 +387,7 @@ Ext.define('PVE.OpenVZConsole', {
});
}
},
// Note: no migrate here, because we can't display migrate log
// and openvz migrate does not work if console is open
{
text
:
gettext
(
'
Console
'
),
handler
:
function
()
{
PVE
.
Utils
.
openConoleWindow
(
'
openvz
'
,
me
.
vmid
,
me
.
nodename
,
me
.
vmname
);
}
},
// Note: no migrate here, because we can't display migrate log
'
->
'
,
{
text
:
gettext
(
'
Refresh
'
),
...
...
www/manager/openvz/Config.js
View file @
2a1379b7
...
...
@@ -152,16 +152,6 @@ Ext.define('PVE.openvz.Config', {
]
});
if
(
caps
.
vms
[
'
VM.Console
'
])
{
me
.
items
.
push
({
title
:
"
InitLog
"
,
itemId
:
'
initlog
'
,
xtype
:
'
pveLogView
'
,
url
:
'
/api2/extjs/nodes/
'
+
nodename
+
'
/openvz/
'
+
vmid
+
'
/initlog
'
});
}
if
(
caps
.
vms
[
'
VM.Backup
'
])
{
me
.
items
.
push
({
title
:
gettext
(
'
Backup
'
),
...
...
Write
Preview
Markdown
is supported
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