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

tcmu: call close when OpenTCMUDevice returns error #417

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

tcmu: call close when OpenTCMUDevice returns error #417

wants to merge 1 commit into from

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Dec 3, 2016

No description provided.

@nak3
Copy link
Contributor Author

nak3 commented Dec 3, 2016

This patch needs to wait for upstream (go-tcmu)'s fix, since OpenTCMUDevice() doesn't return device currently. (c.f device.go)

@lpabon
Copy link

lpabon commented Dec 9, 2016

Why is this patch needed? What is it resolving? Normally you do not want to close something which was not created. Some functions return nil, so this could would panic in that situation.

@nak3
Copy link
Contributor Author

nak3 commented Dec 10, 2016

This fix needs to wait for go-tcmu's fix https://github.com/coreos/go-tcmu/pull/8/files (I commented it above.). And it will never return nil nor cause panic.

The reason why this patch needed is that preEnableTcmu() in go-tcmu creates the device directories. So, if preEnableTcmu() was called but Close() was not called, the directories would remain. Then, restart process will fail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants