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

Allow subnet allocator to mark assigned subnet dynamically #18999

Merged

Conversation

pravisankar
Copy link

@pravisankar pravisankar commented Mar 15, 2018

  • Moved subnet allocator from pkg/util/netutils to pkg/network/master
    Subnet allocator is specific to SDN master and not used anywhere.

  • Currently, we need to pass all allocated subnets during
    subnet allocator creation time (inUse arg to NewSubnetAllocator()).
    This means we need to know all existing subnets beforehand.

  • This change exposes additional method so that we can mark a
    specific subnet as already allocated dynamically (after the subnet
    allocator is created).

Precursor for #18911

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 15, 2018
@pravisankar
Copy link
Author

@openshift/sig-networking PTAL

@danwinship
Copy link
Contributor

We should just move subnet_allocator.go into pkg/network/master. It's more an implementation detail of the SDN master than it is a general "utility".

In particular, I was going to say that you should drop the inUse argument from NewSubnetAllocator, since after #18911 it will be unused. But you can't do that in this PR because the SDN doesn't have the code to make it not need that yet.

@pravisankar pravisankar force-pushed the expose-marking-suballocator branch from 23bbe1f to fe6f105 Compare March 16, 2018 20:13
@pravisankar
Copy link
Author

@openshift/sig-networking @danwinship Updated, PTAL

@smarterclayton @deads2k @liggitt @mfojtik @soltysh can one of you approve pkg/util changes?

Ravi Sankar Penta added 2 commits March 16, 2018 14:20
- Subnet allocator is specific to SDN master and not used anywhere.
- Currently, we need to pass all allocated subnets during
subnet allocator creation time (inUse arg to NewSubnetAllocator()).
This means we need to know all existing subnets beforehand.

- This change exposes additional method so that we can mark a
specific subnet as already allocated dynamically (after the subnet
allocator is created).

Precursor for openshift#18911
@pravisankar pravisankar force-pushed the expose-marking-suballocator branch from fe6f105 to 9f5339f Compare March 16, 2018 21:21
@pravisankar
Copy link
Author

/retest

@smarterclayton
Copy link
Contributor

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2018
@danwinship
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, pravisankar, smarterclayton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@pravisankar
Copy link
Author

/test gcp

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 18999, 18543).

@openshift-merge-robot openshift-merge-robot merged commit 3caa07e into openshift:master Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. sig/networking size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants