mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-07-26 23:43:58 +00:00
add new environment type 'ha'
We use this to mark tasks started by HA manager (rgmanager agents).
This commit is contained in:
parent
dcfaabd7ca
commit
e42eedbca4
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.0
|
||||
|
||||
VERSION=1.0
|
||||
PACKAGE=libpve-access-control
|
||||
PKGREL=3
|
||||
PKGREL=4
|
||||
|
||||
DESTDIR=
|
||||
PREFIX=/usr
|
||||
|
@ -180,7 +180,7 @@ sub init {
|
||||
|
||||
die "already initialized" if $pve_env;
|
||||
|
||||
die "unknown environment type" if !$type || $type !~ m/^(cli|pub|priv)$/;
|
||||
die "unknown environment type" if !$type || $type !~ m/^(cli|pub|priv|ha)$/;
|
||||
|
||||
$SIG{CHLD} = $worker_reaper;
|
||||
|
||||
@ -188,6 +188,7 @@ sub init {
|
||||
# cli ... command started fron command line
|
||||
# pub ... access from public server (apache)
|
||||
# priv ... access from private server (pvedaemon)
|
||||
# ha ... access from HA resource manager agent (rgmanager)
|
||||
|
||||
my $self = {
|
||||
user_cfg => {},
|
||||
@ -637,6 +638,9 @@ sub fork_worker {
|
||||
POSIX::read($csync[0], $readbuf, 4096);
|
||||
die "parent setup error\n" if $readbuf ne 'OK';
|
||||
|
||||
if ($self->{type} eq 'ha') {
|
||||
print "task started by HA resource agent\n";
|
||||
}
|
||||
eval { &$function($upid); };
|
||||
my $err = $@;
|
||||
if ($err) {
|
||||
|
@ -1,3 +1,9 @@
|
||||
libpve-access-control (1.0-4) unstable; urgency=low
|
||||
|
||||
* new environment type for ha agents
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 13 Dec 2011 10:08:53 +0100
|
||||
|
||||
libpve-access-control (1.0-3) unstable; urgency=low
|
||||
|
||||
* add support for delayed parameter parsing - We need that to disable
|
||||
|
Loading…
Reference in New Issue
Block a user