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

Do not call failure to destroy a mounted FS an INTERNAL_ERROR #1160

Closed
tasleson opened this issue Sep 7, 2018 · 14 comments
Closed

Do not call failure to destroy a mounted FS an INTERNAL_ERROR #1160

tasleson opened this issue Sep 7, 2018 · 14 comments
Assignees
Milestone

Comments

@tasleson
Copy link
Contributor

tasleson commented Sep 7, 2018

What we get when we try to destroy a mounted FS

# bin/stratis filesystem destroy testing fs1
Execution failure caused by:
INTERNAL ERROR: low-level ioctl error

I think we should be a little more helpful to the user.

@tasleson
Copy link
Contributor Author

tasleson commented Sep 7, 2018

Kudos on keeping the state consistent now 😃

@mulkieran
Copy link
Member

Related: #1141. There are two problems here, both very deep. The first is the problem that engine errors are often mapped to D-Bus INTERNAL error when they are not actually internal errors. That whole system needs a complete overhaul. The second is that stratis just converts the low-level DM errors to Stratis errors and returns them. That needs chaining to handle properly. There are very many of these examples. I suggest filing a super-issue and putting all these related problems in a single issue (because they cannot be fixed separately).

@agrover
Copy link
Contributor

agrover commented Sep 8, 2018

That's not going to happen for 1.0, but we need to do something for the present. Right now we're getting a EngineError(DmError(NixError(EBUSY))) or something like that, resulting in the INTERNAL ERROR, but we should be able to catch and convert this to a StratisError with a useful "device is busy" error message, that is a Dbus::ERROR, not a Dbus::INTERNAL_ERROR.

@agrover
Copy link
Contributor

agrover commented Sep 8, 2018

Use of error-chain in dm-rs causes some complications to what I was thinking in previous comment. Getting through the IoctlError to the underlying chained io:Error is unpleasant and I can't get it to compile ☹️. Instead I propose stratis-storage/devicemapper-rs#373, and circle back for a permanent solution after 1.0.

We also may want to not use DbusErrorEnum::INTERNAL_ERROR in the case of this... well maybe in all cases. What is it other than a scarier version of ERROR? (actually, for the current issue, DbusErrorEnum::BUSY would be ideal but I don't see how to easily have that happen.)

@mulkieran
Copy link
Member

Do something for the present to solve what problem?

@agrover
Copy link
Contributor

agrover commented Sep 10, 2018

Do something for the present to solve what problem?

The non-helpful error message.

@mulkieran
Copy link
Member

mulkieran commented Sep 12, 2018

The thing that will fix our problem seems to have been merged into Rust nightly 11 days ago: https://doc.rust-lang.org/nightly/std/error/trait.Error.html. Also: rust-lang/rfcs#2504, and rust-lang/rust#53533.

@mulkieran
Copy link
Member

There is more than one non-helpful message...I would stake my life on it.

@mulkieran
Copy link
Member

So, at what point will something that was merged into nightly 11 days ago start to do us any good?

@agrover
Copy link
Contributor

agrover commented Sep 12, 2018

Included in a Rust stable release around March 2019, and then however long for it to get packaged for distros we care about.

@mulkieran
Copy link
Member

This whole situation is most dispiriting.

@agrover
Copy link
Contributor

agrover commented Sep 18, 2018

will be fixed by #1179 and #1167

@mulkieran mulkieran self-assigned this Sep 18, 2018
@mulkieran
Copy link
Member

Seems like I'm working on this.

@agrover agrover changed the title Not helpful message when trying to destroy a mounted FS Do not call failure to destroy a mounted FS an INTERNAL_ERROR Sep 24, 2018
@agrover agrover self-assigned this Sep 24, 2018
@agrover
Copy link
Contributor

agrover commented Sep 26, 2018

fixed by #1167

@agrover agrover closed this as completed Sep 26, 2018
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 a pull request may close this issue.

3 participants