Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-15 Thread Dietmar Maurer
> > Yes - that is exactly my point (it makes no sense to have Sys.PowerMgnt on > > node). > > It makes fully sense. They way this inteded to work is like: We have three > nodes > A, B, C. C is powered off. An user has the Sys.PowerMgmt permissions on only > Node > C. As it's powered off he

Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-15 Thread Thomas Lamprecht
On 1/16/19 7:02 AM, Dietmar Maurer wrote: > >>> check => ['perm', '/nodes/', [ 'Sys.PowerMgmt' ]], >>> >> >> No, this does not gets proxied to the {node}, > > Yes - that is exactly my point (it makes no sense to have Sys.PowerMgnt on > node). It makes fully sense. They way this inteded to

Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-15 Thread Dietmar Maurer
> > check => ['perm', '/nodes/', [ 'Sys.PowerMgmt' ]], > > > > No, this does not gets proxied to the {node}, Yes - that is exactly my point (it makes no sense to have Sys.PowerMgnt on node). ___ pve-devel mailing list pve-devel@pve.proxmox.com

Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-15 Thread Thomas Lamprecht
On 1/14/19 5:04 PM, Dietmar Maurer wrote: >> +permissions => { >> +check => ['perm', '/nodes/{node}', [ 'Sys.PowerMgmt' ]], >> +}, > > You can wake up and Host in the network? If so, we may want to > restrict that too: > > check => ['perm', '/nodes/', [ 'Sys.PowerMgmt' ]], > No,

Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-15 Thread Thomas Lamprecht
On 1/15/19 9:24 AM, Fabian Grünbichler wrote: > On Mon, Jan 14, 2019 at 04:24:55PM +0100, Thomas Lamprecht wrote: >>> + send($sock, $packet, 0, $to) or die "Unable to send wake on LAN magic >>> packet!\n"; >>> + close($sock); >>> + >>> + return undef; >>> +}}); >>> >>>

Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-15 Thread Fabian Grünbichler
On Mon, Jan 14, 2019 at 04:24:55PM +0100, Thomas Lamprecht wrote: > > + send($sock, $packet, 0, $to) or die "Unable to send wake on LAN magic > > packet!\n"; > > + close($sock); > > + > > + return undef; > > +}}); > > > > __PACKAGE__->register_method({ > > name => 'rrd', > >

Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-14 Thread Dietmar Maurer
> +permissions => { > + check => ['perm', '/nodes/{node}', [ 'Sys.PowerMgmt' ]], > +}, You can wake up and Host in the network? If so, we may want to restrict that too: check => ['perm', '/nodes/', [ 'Sys.PowerMgmt' ]], Not sure about that

Re: [pve-devel] [PATCH #1752 pve-manager 1/1] [PATCH #1752 pve-manager] Impl basic wake on LAN

2019-01-14 Thread Thomas Lamprecht
Thanks for the patch! some comments inline. On 1/14/19 3:05 PM, Christian Ebner wrote:> Provides the basic functionality to provide a wake on LAN feature implementation to start nodes in a cluster from other nodes. can you please break up long lines? 69 characters is a common used line length