Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-ISC-DHCPd CPAN distribution.

Report information
The Basics
Id: 58391
Status: resolved
Priority: 0/
Queue: Net-ISC-DHCPd

People
Owner: Nobody in particular
Requestors: zidanej [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Regarding Net-ISC-DHCPd bug
Date: Mon, 14 Jun 2010 19:14:31 -0700
To: bug-Net-ISC-DHCPd [...] rt.cpan.org
From: jeff bair <zidanej [...] gmail.com>
Distribution: Net-ISC-DHCPd-0.05 Perl version: 5.10 Operating System: FreeBSD 8.0 So I'm trying to use OMAPI to edit and search through a lease file on a test DHCP server by using the Net-ISC-DHCPd-0.05 distribution but I've run into some issues. I'm able to query the lease file with an IP address and get the lease information for that lease associated with that IP but I'm trying to query it with state = active but I get an error "can't open object: not implemented" I notice that state has actions: examine and lookup which I think should allow for the read action to work since that's the only requirement I believe for read to work. Thank you for any feedback! - Jeff
Subject: Re: [rt.cpan.org #58391] Regarding Net-ISC-DHCPd bug
Date: Wed, 16 Jun 2010 00:39:39 +0200
To: bug-Net-ISC-DHCPd [...] rt.cpan.org
From: Jan Henning Thorsen <jhthorsen [...] cpan.org>
Hi, There's at least a bug in the documentation: The "state" is indeed read-only. Will investigate it more closely tomorrow. Maybe I need to rewrite that bit now when I know Moose better... What do you mean about "but I'm trying to query it with state = active". Do you mean you're trying to set it? Or using it as a lookup? Could you attach the code you're working on? ___ .jht On Tue, Jun 15, 2010 at 4:14 AM, jeff bair via RT <bug-Net-ISC-DHCPd@rt.cpan.org> wrote: Show quoted text
> Mon Jun 14 22:14:40 2010: Request 58391 was acted upon. > Transaction: Ticket created by zidanej@gmail.com >       Queue: Net-ISC-DHCPd >     Subject: Regarding Net-ISC-DHCPd bug >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: zidanej@gmail.com >      Status: new >  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=58391 > > > > Distribution: Net-ISC-DHCPd-0.05 > Perl version: 5.10 > Operating System: FreeBSD 8.0 > > So I'm trying to use OMAPI to edit and search through a lease file on a > test DHCP server by using the Net-ISC-DHCPd-0.05 distribution but I've > run into some issues.  I'm able to query the lease file with an IP > address and get the lease information for that lease associated with that IP >  but I'm trying to query it with state = active but I get an error "can't > open > object: not implemented" I notice that state has actions: examine and > lookup which I think should allow for the read action to work since that's > the only requirement I believe for read to work.  Thank you for any > feedback! > > - Jeff > >
Subject: Re: [rt.cpan.org #58391] Regarding Net-ISC-DHCPd bug
Date: Tue, 15 Jun 2010 18:26:21 -0700
To: bug-Net-ISC-DHCPd [...] rt.cpan.org
From: jeff bair <zidanej [...] gmail.com>
Hi Jan, Yes, I'm trying to use state = active as a lookup. This is what I have so far basically: $omapi->connect; print "\n\nconnected!\n\n\n"; $lease = $omapi->new_object("lease"); $lease->ip_address("169.229.7.12"); $lease->read; This works fine so I can lookup by ip_address. What I want to do is get a list of leases with states = active. So what I was trying was this: $omapi->connect; print "\n\nconnected!\n\n\n"; $lease = $omapi->new_object("lease"); $lease->ip_address("169.229.7.12"); $lease->state("active"); print "lease created...\n\n"; $lease->read; which gave me the error I noted in my first message. This is the exact set of errors I get: connected! lease created... $ new lease $ set state = 2 obj: lease $ open obj: lease state = 2 $ close can't open object: not implemented obj: lease state = 2 Show quoted text
> obj: <null>
Thanks for the help! Really appreciate it! - Jeff On Tue, Jun 15, 2010 at 3:40 PM, Jan Henning Thorsen via RT < bug-Net-ISC-DHCPd@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=58391 > > > Hi, > > There's at least a bug in the documentation: The "state" is indeed > read-only. Will investigate it more closely tomorrow. Maybe I need to > rewrite that bit now when I know Moose better... > > What do you mean about "but I'm trying to query it with state = > active". Do you mean you're trying to set it? Or using it as a lookup? > Could you attach the code you're working on? > > ___ > .jht > > On Tue, Jun 15, 2010 at 4:14 AM, jeff bair via RT > <bug-Net-ISC-DHCPd@rt.cpan.org> wrote:
> > Mon Jun 14 22:14:40 2010: Request 58391 was acted upon. > > Transaction: Ticket created by zidanej@gmail.com > > Queue: Net-ISC-DHCPd > > Subject: Regarding Net-ISC-DHCPd bug > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: zidanej@gmail.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=58391 > > > > > > > Distribution: Net-ISC-DHCPd-0.05 > > Perl version: 5.10 > > Operating System: FreeBSD 8.0 > > > > So I'm trying to use OMAPI to edit and search through a lease file on a > > test DHCP server by using the Net-ISC-DHCPd-0.05 distribution but I've > > run into some issues. I'm able to query the lease file with an IP > > address and get the lease information for that lease associated with that
> IP
> > but I'm trying to query it with state = active but I get an error "can't > > open > > object: not implemented" I notice that state has actions: examine and > > lookup which I think should allow for the read action to work since
> that's
> > the only requirement I believe for read to work. Thank you for any > > feedback! > > > > - Jeff > > > >
> >
Subject: Re: [rt.cpan.org #58391] Regarding Net-ISC-DHCPd bug
Date: Tue, 15 Jun 2010 19:26:53 -0700
To: bug-Net-ISC-DHCPd [...] rt.cpan.org
From: jeff bair <zidanej [...] gmail.com>
Hi Jan, Also we're trying to do lookup via mac address using this: $omapi->connect; print "\n\nconnected!\n\n\n"; $lease = $omapi->new_object("lease"); $lease->hardware_address("00:e0:81:30:27:d4"); $lease->read; We can do lookups with omshell using a specified mac address but we can't using this perl module. Is there any particular reason for that? Thanks! - Jeff On Tue, Jun 15, 2010 at 6:26 PM, jeff bair <zidanej@gmail.com> wrote: Show quoted text
> Hi Jan, > > Yes, I'm trying to use state = active as a lookup. This is what I have so > far basically: > > $omapi->connect; > print "\n\nconnected!\n\n\n"; > $lease = $omapi->new_object("lease"); > $lease->ip_address("169.229.7.12"); > $lease->read; > > This works fine so I can lookup by ip_address. What I want to do is get a > list of leases with states = active. So what I was trying was this: > > $omapi->connect; > print "\n\nconnected!\n\n\n"; > $lease = $omapi->new_object("lease"); > $lease->ip_address("169.229.7.12"); > $lease->state("active"); > print "lease created...\n\n"; > $lease->read; > > which gave me the error I noted in my first message. This is the exact set > of errors I get: > > connected! > > > lease created... > > $ new lease > $ set state = 2 > obj: lease > $ open > obj: lease > state = 2 > $ close > > can't open object: not implemented > obj: lease > state = 2
> > obj: <null>
> > Thanks for the help! Really appreciate it! > > - Jeff > > > > On Tue, Jun 15, 2010 at 3:40 PM, Jan Henning Thorsen via RT < > bug-Net-ISC-DHCPd@rt.cpan.org> wrote: >
>> <URL: http://rt.cpan.org/Ticket/Display.html?id=58391 > >> >> Hi, >> >> There's at least a bug in the documentation: The "state" is indeed >> read-only. Will investigate it more closely tomorrow. Maybe I need to >> rewrite that bit now when I know Moose better... >> >> What do you mean about "but I'm trying to query it with state = >> active". Do you mean you're trying to set it? Or using it as a lookup? >> Could you attach the code you're working on? >> >> ___ >> .jht >> >> On Tue, Jun 15, 2010 at 4:14 AM, jeff bair via RT >> <bug-Net-ISC-DHCPd@rt.cpan.org> wrote:
>> > Mon Jun 14 22:14:40 2010: Request 58391 was acted upon. >> > Transaction: Ticket created by zidanej@gmail.com >> > Queue: Net-ISC-DHCPd >> > Subject: Regarding Net-ISC-DHCPd bug >> > Broken in: (no value) >> > Severity: (no value) >> > Owner: Nobody >> > Requestors: zidanej@gmail.com >> > Status: new >> > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=58391 > >> > >> > >> > Distribution: Net-ISC-DHCPd-0.05 >> > Perl version: 5.10 >> > Operating System: FreeBSD 8.0 >> > >> > So I'm trying to use OMAPI to edit and search through a lease file on a >> > test DHCP server by using the Net-ISC-DHCPd-0.05 distribution but I've >> > run into some issues. I'm able to query the lease file with an IP >> > address and get the lease information for that lease associated with
>> that IP
>> > but I'm trying to query it with state = active but I get an error
>> "can't
>> > open >> > object: not implemented" I notice that state has actions: examine and >> > lookup which I think should allow for the read action to work since
>> that's
>> > the only requirement I believe for read to work. Thank you for any >> > feedback! >> > >> > - Jeff >> > >> >
>> >>
>
On Tue Jun 15 22:27:02 2010, zidanej@gmail.com wrote: Show quoted text
> Hi Jan, > > Also we're trying to do lookup via mac address using this: > > $omapi->connect; > print "\n\nconnected!\n\n\n"; > $lease = $omapi->new_object("lease"); > $lease->hardware_address("00:e0:81:30:27:d4"); > $lease->read; > We can do lookups with omshell using a specified mac address but we > can't > using this perl module. Is there any particular reason for that? > Thanks! > > - Jeff
This will be fixed in 0.07. The reason for this is that it was not documented as "lookup" from http://linux.die.net/man/8/dhcpd Got a better source of documentation? :) Anyway. I did add it. Could you also have a look at the source code and see if any other attributes are lacking the "lookup" action? http://cpansearch.perl.org/src/JHTHORSEN/Net-ISC-DHCPd- 0.05_02/lib/Net/ISC/DHCPd/OMAPI/Lease.pm # please look for all the lines with "omapi_attr ... => (". Show quoted text
> > On Tue, Jun 15, 2010 at 6:26 PM, jeff bair <zidanej@gmail.com> wrote: >
> > Hi Jan, > > > > Yes, I'm trying to use state = active as a lookup. This is what I
> have so
> > far basically: > > > > $omapi->connect; > > print "\n\nconnected!\n\n\n"; > > $lease = $omapi->new_object("lease"); > > $lease->ip_address("169.229.7.12"); > > $lease->read; > >
I've been testing and googling this issue and it seems like the omshell and/or omapi simply ignores the attribute. What we can do (since this is an abstraction layer:)) is simply to add a post-filter on the retrieved data and force "read()" to return false when the retrieved "state" don't match the requested "state()". I'm not quite sure I like the solution, but I will implement it on request... I will release 0.07 when I get your reply - unless you want more to be included. Fork me at github if you like: http://github.com/jhthorsen/net-isc-dhcpd
Subject: Re: [rt.cpan.org #58391] Regarding Net-ISC-DHCPd bug
Date: Thu, 17 Jun 2010 15:22:35 -0700
To: bug-Net-ISC-DHCPd [...] rt.cpan.org
From: jeff bair <zidanej [...] gmail.com>
The post-filter implementation would be great if possible. It looks like the lookup attributes are fine and thanks for the changes! - Jeff Bair On Thu, Jun 17, 2010 at 11:58 AM, Jan Henning Thorsen via RT < bug-Net-ISC-DHCPd@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=58391 > > > On Tue Jun 15 22:27:02 2010, zidanej@gmail.com wrote:
> > Hi Jan, > > > > Also we're trying to do lookup via mac address using this: > > > > $omapi->connect; > > print "\n\nconnected!\n\n\n"; > > $lease = $omapi->new_object("lease"); > > $lease->hardware_address("00:e0:81:30:27:d4"); > > $lease->read; > > We can do lookups with omshell using a specified mac address but we > > can't > > using this perl module. Is there any particular reason for that? > > Thanks! > > > > - Jeff
> > > This will be fixed in 0.07. The reason for this is that it was not > documented as "lookup" from http://linux.die.net/man/8/dhcpd > Got a better source of documentation? :) Anyway. I did add it. Could you > also have a look at the source code and see if any other attributes are > lacking the "lookup" action? > > http://cpansearch.perl.org/src/JHTHORSEN/Net-ISC-DHCPd- > 0.05_02/lib/Net/ISC/DHCPd/OMAPI/Lease.pm # please look for all the lines > with "omapi_attr ... => (". > >
> > > > On Tue, Jun 15, 2010 at 6:26 PM, jeff bair <zidanej@gmail.com> wrote: > >
> > > Hi Jan, > > > > > > Yes, I'm trying to use state = active as a lookup. This is what I
> > have so
> > > far basically: > > > > > > $omapi->connect; > > > print "\n\nconnected!\n\n\n"; > > > $lease = $omapi->new_object("lease"); > > > $lease->ip_address("169.229.7.12"); > > > $lease->read; > > >
> > I've been testing and googling this issue and it seems like the omshell > and/or omapi simply ignores the attribute. What we can do (since this is > an abstraction layer:)) is simply to add a post-filter on the retrieved > data and force "read()" to return false when the retrieved "state" don't > match the requested "state()". I'm not quite sure I like the solution, > but I will implement it on request... > > I will release 0.07 when I get your reply - unless you want more to be > included. Fork me at github if you like: > http://github.com/jhthorsen/net-isc-dhcpd > >
Subject: Re: [rt.cpan.org #58391] Regarding Net-ISC-DHCPd bug
Date: Fri, 18 Jun 2010 01:30:57 +0200
To: bug-Net-ISC-DHCPd [...] rt.cpan.org
From: Jan Henning Thorsen <jhthorsen [...] cpan.org>
Done: 0.07 is uploaded to CPAN. On Fri, Jun 18, 2010 at 12:22 AM, jeff bair via RT <bug-Net-ISC-DHCPd@rt.cpan.org> wrote: Show quoted text
>       Queue: Net-ISC-DHCPd >  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=58391 > > > The post-filter implementation would be great if possible.  It looks like > the lookup attributes are fine and thanks for the changes! > > - Jeff Bair > > On Thu, Jun 17, 2010 at 11:58 AM, Jan Henning Thorsen via RT < > bug-Net-ISC-DHCPd@rt.cpan.org> wrote: >
0.07 Fri Jun 18 01:30:15 CEST 2010 - Add (RT58391) OMAPI lookup by hardware_address, even though it does not appear to described in the dhcpd manual (?) Contributor: Jeff Bair - Add (RT58391) post check after OMAPI read() to see if lookup attributes match retrieved data. This is because omapi/omshell seem to have a bug where lease lookup with "state" is ignored. This is subject for change! Contributor: Jeff Bair