Project

General

Profile

Bug #622

crushtool useless parse error

Added by John Leach almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

I can't decide whether this is a bug in crushtool or a bug in my crushmap but whichever it is, the error message isn't helpful.

Attached is my human readable crushmap. When I compile this with crushtool, I get an error:

root@srv-an56n:~# crushtool -c /tmp/crush.txt -o /tmp/crush.new
/tmp/crush.txt:28 error: parse error at '# regions'

If I delete that comment line I get:

/tmp/crush.txt:27 error: parse error at ''

I'm certain I successfully compiled a very similar crushmap with 0.23.1

This is with 78a14622438addcd5c337c4924cce1f67d053ee9 from the rc branch.

crushmap.txt View (601 Bytes) John Leach, 12/02/2010 03:07 AM

History

#1 Updated by Sage Weil almost 10 years ago

  • Assignee set to Colin McCabe

#2 Updated by Sage Weil almost 10 years ago

  • Target version set to v0.24

#3 Updated by Colin McCabe almost 10 years ago

I was able to get the crushmap.txt to work by deleting the word "domain" in the gb1 region.

We should definitely have some kind of better error message here. I'll take a quick look at whether Sprite has any obvious way of improving this. (Just letting the user know that the problem was with region gb1 would be a plus.)

--- crushmap.txt.1 2010-12-02 11:38:43.816441440 0800
++ crushmap.txt 2010-12-02 11:38:32.696350797 -0800
@ -30,8 +30,8 @
id -3
alg straw
hash 0
item domain gb1a weight 4.000
- item domain gb1b weight 4.000
item gb1a weight 4.000
+ item gb1b weight 4.000
}

#4 Updated by Colin McCabe almost 10 years ago

Reposting the diff; hopefully clearer this time.

--- crushmap.txt.1      2010-12-02 11:38:43.816441440 -0800
+++ crushmap.txt 2010-12-02 11:38:32.696350797 -0800
@ -30,8 +30,8 @
id -3
alg straw
hash 0
- item domain gb1a weight 4.000
- item domain gb1b weight 4.000
+ item gb1a weight 4.000
+ item gb1b weight 4.000
}

#5 Updated by Colin McCabe almost 10 years ago

There is a more advanced error handling API for spirit described at:
http://www.boost.org/doc/libs/1_41_0/libs/spirit/classic/doc/error_handling.html

Using this, we could give the user more information about errors than just a line number.

#6 Updated by Colin McCabe almost 10 years ago

  • Status changed from New to Resolved

Resolved-- the crushmap.txt was bad.

I created #628 for getting better error messages from crushtool.

Also available in: Atom PDF