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

Fetch internal IP from dhcp server #748

Merged
merged 3 commits into from
Jul 12, 2022

Conversation

Karthik-K-N
Copy link
Contributor

What this PR does / why we need it:

This PR contains the changes to fetch the IP for a VM from DHCP+ server and store it in cache for maximum of 20 minutes to avoid frequent power cloud api calls.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes ##723

Special notes for your reviewer:

/area provider/ibmcloud

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


@k8s-ci-robot k8s-ci-robot added area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 8, 2022
@netlify
Copy link

netlify bot commented Jul 8, 2022

Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!

Name Link
🔨 Latest commit d274a54
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-ibmcloud/deploys/62cc234d0e552200080ff364
😎 Deploy Preview https://deploy-preview-748--kubernetes-sigs-cluster-api-ibmcloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 8, 2022
@Karthik-K-N
Copy link
Contributor Author

/cc @mkumatag

@k8s-ci-robot k8s-ci-robot requested a review from mkumatag July 8, 2022 09:02
@Karthik-K-N
Copy link
Contributor Author

yet to test the new change on a cluster but good for review and approach choosen

cloud/scope/powervs_machine_test.go Outdated Show resolved Hide resolved
controllers/ibmpowervsmachine_controller_test.go Outdated Show resolved Hide resolved
pkg/cloud/services/powervs/service.go Outdated Show resolved Hide resolved
pkg/cloud/services/powervs/service.go Outdated Show resolved Hide resolved
pkg/options/caching.go Outdated Show resolved Hide resolved
@Karthik-K-N
Copy link
Contributor Author

Tested on a hypershift cluster and works as expected, Able to see InternalIP set for machine

Status:
  Addresses:
    Address:  karthik-hyp-10-255dh
    Type:     InternalDNS
    Address:  karthik-hyp-10-255dh
    Type:     Hostname
    Address:  192.168.0.10
    Type:     InternalIP

Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 12, 2022
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2022
@k8s-ci-robot k8s-ci-robot merged commit c4c46a9 into kubernetes-sigs:main Jul 12, 2022
@Karthik-K-N Karthik-K-N deleted the set-internal-ip branch July 12, 2022 06:29
@mkumatag
Copy link
Member

/cherry-pick release-0.2

@k8s-infra-cherrypick-robot

@mkumatag: #748 failed to apply on top of branch "release-0.2":

Applying: Fetch internal IP from dhcp server
Using index info to reconstruct a base tree...
M	cloud/scope/powervs_machine.go
A	cloud/scope/powervs_machine_test.go
M	controllers/ibmpowervsmachine_controller.go
M	controllers/ibmpowervsmachine_controller_test.go
M	main.go
Falling back to patching base and 3-way merge...
Auto-merging main.go
CONFLICT (content): Merge conflict in main.go
Auto-merging controllers/ibmpowervsmachine_controller_test.go
CONFLICT (content): Merge conflict in controllers/ibmpowervsmachine_controller_test.go
Auto-merging controllers/ibmpowervsmachine_controller.go
CONFLICT (content): Merge conflict in controllers/ibmpowervsmachine_controller.go
CONFLICT (modify/delete): cloud/scope/powervs_machine_test.go deleted in HEAD and modified in Fetch internal IP from dhcp server. Version Fetch internal IP from dhcp server of cloud/scope/powervs_machine_test.go left in tree.
Auto-merging cloud/scope/powervs_machine.go
CONFLICT (content): Merge conflict in cloud/scope/powervs_machine.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fetch internal IP from dhcp server
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.2

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
Copy link
Member

@Karthik-K-N do you mind back porting this PR to release-0.2 branch as well?

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. area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants