Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

cache volumes: volume leaks when node CreateVolumeResponse is lost #507

Closed
pohly opened this issue Jan 10, 2020 · 3 comments
Closed

cache volumes: volume leaks when node CreateVolumeResponse is lost #507

pohly opened this issue Jan 10, 2020 · 3 comments
Labels
future needs to be fixed in some future release

Comments

@pohly
Copy link
Contributor

pohly commented Jan 10, 2020

Suppose the following happens:

  • Controller CreateVolume calls CreateVolume on several nodes for a cache volume
  • all nodes create the volume, but one CreateVolumeResponse back to the controller is lost

I suspect we currently leak that volume here:

klog.Warningf("failed to create volume name:%s id:%s on %s: %s", node, req.Name, volumeID, err.Error())

It prints a warning (but who will read it?) and then proceeds, leading to an overall success for CreateVolume.

When DeleteVolume is called, it will not be called for the node where the response was lost -> volume leak.

@avalluri: does that sound right?

@avalluri
Copy link
Contributor

The current code treats error response from node controllers as a failure(not just this case, same for all calls to nod controller), and we continue as if no volume was created on that node, hence we do not decrease the cache volume count.

We might look into the error if its transport error. But I am not sure what are the options we have in this case.

@pohly
Copy link
Contributor Author

pohly commented Jan 10, 2020

We might look into the error if its transport error. But I am not sure what are the options we have in this case.

We would have to assume that a volume might have been created. It's not going to be pretty. One more reason to remove cache volume support.

@pohly pohly added the future needs to be fixed in some future release label May 18, 2020
@pohly
Copy link
Contributor Author

pohly commented Jan 20, 2021

Fixed by PR #838

@pohly pohly closed this as completed Jan 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
future needs to be fixed in some future release
Projects
None yet
Development

No branches or pull requests

2 participants