From: Dietmar Maurer Date: Tue, 13 Dec 2011 09:07:12 +0000 (+0100) Subject: add new environment type 'ha' X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=commitdiff_plain;h=e42eedbca470cfd545fa386820f0322a05e5e2b4 add new environment type 'ha' We use this to mark tasks started by HA manager (rgmanager agents). --- diff --git a/Makefile b/Makefile index 3ff3c55..c7c9e64 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ RELEASE=2.0 VERSION=1.0 PACKAGE=libpve-access-control -PKGREL=3 +PKGREL=4 DESTDIR= PREFIX=/usr diff --git a/PVE/RPCEnvironment.pm b/PVE/RPCEnvironment.pm index a0c0c33..71e2c43 100644 --- a/PVE/RPCEnvironment.pm +++ b/PVE/RPCEnvironment.pm @@ -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) { diff --git a/changelog.Debian b/changelog.Debian index 27b9f09..cda8557 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,3 +1,9 @@ +libpve-access-control (1.0-4) unstable; urgency=low + + * new environment type for ha agents + + -- Proxmox Support Team 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