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
Bug 2100033: Fetch VM IP from DHCP server to set NodeInternalIP #22
Conversation
|
@Karthik-K-N: This pull request references Bugzilla bug 2100033, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@mkumatag @dharaneeshvrd @Prajyot-Parab Please review. |
|
@Karthik-K-N there is an already cache library written here in the https://github.com/kubernetes/client-go/blob/master/tools/cache/expiration_cache.go package which supports the TTL as well, wondering if we can use that here directly. This one in particular https://github.com/kubernetes/client-go/blob/8dfe88aeffaac2cd6aba895db8fccfb51baf770d/tools/cache/expiration_cache.go#L203 |
Sure, Will check that out |
|
@Karthik-K-N: This pull request references Bugzilla bug 2100033, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (pdsilva@redhat.com), skipping review request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Updated with changes to use cache functions from client-go. This PR is ready for PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add some unit tests around this as well?
pkg/actuators/machine/reconciler.go
Outdated
| @@ -20,6 +21,8 @@ const ( | |||
| requeueAfterSeconds = 20 | |||
| requeueAfterFatalSeconds = 180 | |||
| masterLabel = "node-role.kubernetes.io/master" | |||
| // CacheTTL is duration of time to store the vm ip in cache | |||
| CacheTTL = time.Duration(15) * time.Minute | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this 15mins? we need to understand what's the lease period for the dhcp IP address and set the tll accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this can be moved to that new file caching.go
pkg/actuators/machine/reconciler.go
Outdated
| klog.Infof("found DHCP server with ID %s for network ID %s", *server.Network.ID, *networkID) | ||
| dhcpServerDetails, err = r.powerVSClient.GetDHCPServerByID(*server.ID) | ||
| if err != nil || dhcpServerDetails == nil { | ||
| errStr := fmt.Errorf("failed to get DHCP server details for with DHCP server ID: %s error: %v ", *server.Network.ID, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is chance of NPE exception when err == nil and dhcpServerDetails == nil
|
@Karthik-K-N: This pull request references Bugzilla bug 2100033, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (pdsilva@redhat.com), skipping review request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor nit, otherwise lgtm
|
@Karthik-K-N: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Karthik-K-N, mkumatag 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 |
|
@Karthik-K-N: All pull requests linked via external trackers have merged: Bugzilla bug 2100033 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Main intention of this PR is to set the NodeInternalIP for machine so that the cluster auto approver will approve the server csr requests