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

Update gophercloud client to v2 #951

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

hebelsan
Copy link
Contributor

How to categorize this PR?

/area quality
/kind enhancement
/platform openstack

What this PR does / why we need it:
This PR updates the gophercloud client to v2.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Updates gophercloud client to v2

@hebelsan hebelsan requested review from a team as code owners January 13, 2025 09:27
@gardener-robot gardener-robot added needs/review Needs review area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension platform/openstack OpenStack platform/infrastructure size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Jan 13, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 13, 2025
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jan 13, 2025
@hebelsan
Copy link
Contributor Author

/test

@testmachinery
Copy link

testmachinery bot commented Jan 13, 2025

Testrun: e2e-cxfk4
Workflow: e2e-cxfk4-wf
Phase: Failed

+---------------------+-----------------------------+--------+----------+
|        NAME         |            STEP             | PHASE  | DURATION |
+---------------------+-----------------------------+--------+----------+
| infrastructure-test | infrastructure-test         | Failed | 8m15s    |
| infrastructure-test | infrastructure-test-flow    | Failed | 8m15s    |
| infrastructure-test | infrastructure-test-migrate | Failed | 8m15s    |
| infrastructure-test | infrastructure-test-recover | Failed | 8m14s    |
| bastion-test        | bastion-test                | Failed | 8m11s    |
+---------------------+-----------------------------+--------+----------+

@gardener-robot gardener-robot added the needs/rebase Needs git rebase label Jan 13, 2025
@gardener-robot
Copy link

@hebelsan You need rebase this pull request with latest master branch. Please check.

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 13, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 13, 2025
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jan 14, 2025
@hebelsan hebelsan force-pushed the feature/os-clientv2 branch from 11fa368 to 339ce0d Compare January 14, 2025 11:32
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 14, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 14, 2025
@hebelsan
Copy link
Contributor Author

/test

@testmachinery
Copy link

testmachinery bot commented Jan 14, 2025

Testrun: e2e-c7n5l
Workflow: e2e-c7n5l-wf
Phase: Failed

+---------------------+-----------------------------+--------+----------+
|        NAME         |            STEP             | PHASE  | DURATION |
+---------------------+-----------------------------+--------+----------+
| infrastructure-test | infrastructure-test         | Failed | 10m57s   |
| infrastructure-test | infrastructure-test-flow    | Failed | 10m57s   |
| infrastructure-test | infrastructure-test-migrate | Failed | 10m56s   |
| infrastructure-test | infrastructure-test-recover | Failed | 10m57s   |
| bastion-test        | bastion-test                | Failed | 10m51s   |
+---------------------+-----------------------------+--------+----------+

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 14, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jan 14, 2025
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 14, 2025
@hebelsan
Copy link
Contributor Author

the infra test work with basic credentials, but something is still missing to make the client working with app credentials (what the tm is using).

provider.HTTPClient = *opts.HTTPClient

err = openstack.Authenticate(provider, *authOpts)
err = openstack.Authenticate(ctx, provider, authOpts)
Copy link

@Bobi-Wan Bobi-Wan Jan 30, 2025

Choose a reason for hiding this comment

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

FYI openstack.Authenticate() is called in config.NewProviderClient() as well.
I managed to get a working client without the extra Authenticate for my usecase. Though I didn't explicitly set TLSConfig, HTTPClient like you are.

@hebelsan hebelsan force-pushed the feature/os-clientv2 branch from fc0bf80 to 26e652c Compare March 4, 2025 12:27
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Mar 4, 2025
@hebelsan
Copy link
Contributor Author

hebelsan commented Mar 4, 2025

/test

@testmachinery
Copy link

testmachinery bot commented Mar 4, 2025

Testrun: e2e-q4rhj
Workflow: e2e-q4rhj-wf
Phase: Failed

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| infrastructure-test | infrastructure-test-flow    | Succeeded | 12m52s   |
| infrastructure-test | infrastructure-test-migrate | Failed    | 9m43s    |
| infrastructure-test | infrastructure-test-recover | Failed    | 9m43s    |
| bastion-test        | bastion-test                | Succeeded | 11m35s   |
| infrastructure-test | infrastructure-test         | Succeeded | 12m42s   |
+---------------------+-----------------------------+-----------+----------+

@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 4, 2025
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 4, 2025
@hebelsan
Copy link
Contributor Author

hebelsan commented Mar 4, 2025

/test

@testmachinery
Copy link

testmachinery bot commented Mar 4, 2025

Testrun: e2e-vk8pl
Workflow: e2e-vk8pl-wf
Phase: Succeeded

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| infrastructure-test | infrastructure-test         | Succeeded | 13m51s   |
| infrastructure-test | infrastructure-test-flow    | Succeeded | 14m51s   |
| infrastructure-test | infrastructure-test-migrate | Succeeded | 12m47s   |
| infrastructure-test | infrastructure-test-recover | Succeeded | 15m12s   |
| bastion-test        | bastion-test                | Succeeded | 11m20s   |
+---------------------+-----------------------------+-----------+----------+

@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Mar 5, 2025
@hebelsan
Copy link
Contributor Author

hebelsan commented Mar 5, 2025

/test

@testmachinery
Copy link

testmachinery bot commented Mar 5, 2025

Testrun: e2e-rbpl8
Workflow: e2e-rbpl8-wf
Phase: Succeeded

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| infrastructure-test | infrastructure-test-migrate | Succeeded | 11m18s   |
| infrastructure-test | infrastructure-test-recover | Succeeded | 14m30s   |
| bastion-test        | bastion-test                | Succeeded | 10m50s   |
| infrastructure-test | infrastructure-test         | Succeeded | 12m59s   |
| infrastructure-test | infrastructure-test-flow    | Succeeded | 11m57s   |
+---------------------+-----------------------------+-----------+----------+

Comment on lines +369 to +373
if fip.Status != "ACTIVE" || instance.Status != "ACTIVE" {
return fmt.Errorf("instance or floating ip address not ready yet")
}

return networkClient.UpdateFIPWithPort(ctx, floatingIP.ID, instancePort.ID)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure I understand this part. You already associate the fip if it's not already. Why do you make a second update call ?

return nil
}

if fip.Status != "ACTIVE" || instance.Status != "ACTIVE" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe something to doublecheck, but I believe the FIP should already be active upon successful creation, and well, likewise for the instance. Is assigning the IP to the instance actually changing the instance status or the FIP status ? I would also argue that if not then there could be a wait introduced but not in this place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/rebase Needs git rebase needs/review Needs review needs/second-opinion Needs second review by someone else platform/openstack OpenStack platform/infrastructure size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants