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

Ability to revoke lease #356

Merged
merged 1 commit into from
Nov 11, 2015
Merged

Conversation

eyakubovich
Copy link
Contributor

This adds an ability to revoke a lease by deleting it
from etcd. A corresponding API for server case is also added.
Once the lease is revoked, flannel will just acquire a new
one. This has limited use today but is part of #280 to
add reservations. With reservations, there will be a mode
to not acquire a lease if a reservation was not found.

@eyakubovich
Copy link
Contributor Author

@MohdAhmad @jonboulle PTAL

@@ -209,6 +211,21 @@ func (esr *etcdSubnetRegistry) watchSubnets(ctx context.Context, network string,
return evt, e.Node.ModifiedIndex, err
}

func (esr *etcdSubnetRegistry) watchSubnet(ctx context.Context, network string, since uint64, sn ip.IP4Net) (Event, uint64, error) {
key := path.Join(esr.etcdCfg.Prefix, "subnets", network, sn.StringSep(".", "-"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to swap 'network' and 'subnets' here.

@dcbw
Copy link
Contributor

dcbw commented Nov 9, 2015

Overall LGTM

This adds an ability to revoke a lease by deleting it
from etcd. A corresponding API for server case is also added.
Once the lease is revoked, flannel will just acquire a new
one. This has limited use today but is part of flannel-io#280 to
add reservations. With reservations, there will be a mode
to not acquire a lease if a reservation was not found.
eyakubovich added a commit that referenced this pull request Nov 11, 2015
@eyakubovich eyakubovich merged commit 8c97e5b into flannel-io:master Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants