Skip to content

Conversation

@sjenning
Copy link

Currently, this provider will not work on an Openstack platform without Cinder, even if nothing specifies a root volume, which is the only need for it.

This PR makes the failure to create a volumeClient fatal only if we actually need to create a volume.

@eparis @erich @rhowe

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sjenning
To complete the pull request process, please assign mandre
You can assign the PR to them by writing /assign @mandre in a comment when ready.

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

Details 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-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 15, 2019
@mandre
Copy link
Member

mandre commented Nov 19, 2019

/test e2e-openstack

@mandre
Copy link
Member

mandre commented Nov 19, 2019

/test e2e-openstack

Thanks for the PR, the change is reasonable and the code looks good, however the CI is failing for unrelated reasons. Hoping to see at least one green run before we merge this.

@mandre
Copy link
Member

mandre commented Dec 23, 2019

/test e2e-openstack

klog.Infof("Creating a bootable volume from image %v.", config.RootVolume.SourceUUID)

if is.volumeClient == nil {
return nil, fmt.Errorf("Volume requested but block storage service is not available")

Choose a reason for hiding this comment

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

Thanks! I like the change, but I'd prefer to display the original error when creating the client too. Would you be open to adding that?

Copy link
Member

Choose a reason for hiding this comment

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

This could be achieved with client lazy-loading, by storing volumeClient in InstanceService as a closure in NewInstanceServiceFromCloud.

	volumeClient := func() (*gophercloud.ServiceClient, error) {
		return openstack.NewBlockStorageV3(provider, gophercloud.EndpointOpts{
			Region: clientOpts.RegionName,
		})
	}

@sjenning sjenning closed this Mar 5, 2020
racheljpg pushed a commit to racheljpg/cluster-api-provider-openstack that referenced this pull request Dec 20, 2023
Depending on the arguments passed to kubeadm, it may or may not output
more data to stdout. Since we're shelling out and depending on the
kubeadm cli to generate the token, this commit fixes the token parsing
by splitting the output into lines and getting the very last one.

This is far from ideal, as in we should not be depending on kubeadm to
generate the token. Until that is fixed, this patch seems to be a good
compromise.

Closes openshift#74
pierreprinetti pushed a commit to shiftstack/cluster-api-provider-openstack that referenced this pull request Apr 22, 2024
Depending on the arguments passed to kubeadm, it may or may not output
more data to stdout. Since we're shelling out and depending on the
kubeadm cli to generate the token, this commit fixes the token parsing
by splitting the output into lines and getting the very last one.

This is far from ideal, as in we should not be depending on kubeadm to
generate the token. Until that is fixed, this patch seems to be a good
compromise.

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

Labels

size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants