Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #1172 - proxy should return leases and reservations #437

Conversation

pikelly
Copy link
Member

@pikelly pikelly commented Jun 17, 2016

This is my second attempt to get this code included. The last attempt was some time ago :-) You may want to read the earlier pull request or just judge it on its own merits.

This modification has been working in my organisation for some time and seems to separate out the leases and reservations correctly.

logger.debug opts.inspect
if opts.include? :hostname
to_return << Proxy::DHCP::Reservation.new(opts.merge(:deleteable => true))
if kind == 'D' && expire !~ /^INACTIVE|^NEVER/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about kind == 'D' bit? I'm seeing 'N' for clients that support both bootp and dhcp? I think this flag is an "or" of various options and netsh isn't very good at parsing those...

My understanding is that we can treat any client without expiration date on its address as a "reserved ip".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may well be right on this point. This logic works for my organisation but this may not be generally true.
I will update the push to remove the "D" clause as just using the INACTIVE|NEVER test would return the same host list.

@domcleal
Copy link
Contributor

Admin bits: I sent you an invite to the GitHub org @pikelly, which will enable Jenkins to automatically test your PRs when you file or update them. Just accept it and set your membership to public on this page and it should take effect on future git pushes. Cheers!

@dmitri-d
Copy link
Member

[test]

@pikelly
Copy link
Member Author

pikelly commented Jun 21, 2016

If I wish to resubmit this pull request without the "D" then what is the right procedure? Do I close this PR and open another? Do I push another commit onto this branch? I expect that creating a new commit with a commit amend and then doing a forced push will break the PR as the commit's hash will change.

@dmitri-d
Copy link
Member

@pikelly: you can make the change, squash the commits and force-push the changeset (what I'd do, as it's fastest). Or you can close this PR and open a new one, up to you really.

@ohadlevy
Copy link
Member

IMHO better to push, as you dont need to spam redmine with the new pr number

On Tue, Jun 21, 2016 at 5:18 PM, Dmitri Dolguikh notifications@github.com
wrote:

@pikelly https://github.com/pikelly: you can make the change, squash
the commits and force-push the changeset (what I'd do, as it's fastest). Or
you can close this PR and open a new one, up to you really.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#437 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AABOx33B_ArS2AZwvdezzAHQOxIeq6XYks5qN_LGgaJpZM4I4Txb
.

@pikelly
Copy link
Member Author

pikelly commented Jun 21, 2016

I have force pushed the commit minus the "D" check.

@dmitri-d
Copy link
Member

merged as a832ac2. Thanks, @pikelly.

@dmitri-d dmitri-d closed this Jun 28, 2016
@pikelly pikelly deleted the feature/1172-return-leases-and-reservations branch June 29, 2016 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants