Skip to content

Use gophercloud/v2 to support OpenStack 2026.1 - #163

Open
elelaysh wants to merge 1 commit into
hashicorp:mainfrom
stackhpc:update-gophercloud-v2
Open

Use gophercloud/v2 to support OpenStack 2026.1#163
elelaysh wants to merge 1 commit into
hashicorp:mainfrom
stackhpc:update-gophercloud-v2

Conversation

@elelaysh

Copy link
Copy Markdown

Description

The gophercloud dependency has been updated to latest version v2.14.0.
This is necessary to get versioned endpoint discovery (gophercloud/gophercloud#3435), introduced in v2.8.0.

It fixes this error seen when interacting with an OpenStack 2026.1 cloud:

Error initializing block storage client: No suitable endpoint could be found in the service catalog.

Changes are:

  1. Adapting to packaging changes (modules merged or renamed) in gophercloud v2;
  2. Passing a context.Context to all operations;
  3. Adapting to how block devices are passed to servers.Create() in step_run_source_server.go.

Regarding passing a context.Context,

  • AccessConfig.Authenticate() has been split out of AccessConfig.Prepare() to be able to pass the Context from
    Builder.Run() but it could also be using a context.Background()
  • Cleanup functions sometimes need a Context. I've used context.TODO() but it could be changed to context.Background() if need be. Maybe storing the context in the state would also be a valid option.

Rest of the code has been changed as little as possible and seem to be working well.

One error remains to be fixed: the StepRunSourceServer.Cleanup() will show an error if the server has already been deleted (by StepDeleteServer). I would like to handle this case by catching the 404 in Server.DeleteServer.
This has been proposed as #140 by @nilsherzig.

Resolved Issues

Closes #162

Rollback Plan

If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

There are no changes to security controls.

to support OpenStack 2026.1.
Fixes hashicorp#162
@elelaysh
elelaysh requested a review from a team as a code owner August 26, 2026 07:28
@hashicorp-cla-app

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error initializing block storage client with Openstack 2026.1

1 participant