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
crush: fix the problem can not find the define item below the bucket #8141
Conversation
When we define the item below the bucket in the map.txt.Then we compile the map,txt to the map.bin.It will error for cannnot find the item. It is very amazing for usr that who have define it,but the ceph told him than can not find it.SO slove it! |
Can you add a test case that demonstrates the bug? We aren't follwoing what the problem is. Thanks! |
@liewegas Ok,SIr. I will add it later. |
90a47eb
to
afbd15b
Compare
@liewegas :Hello.Sir. I have add the test.Thank you! |
@liewegas The unit test error as below looks like the Jenkins bug. And somebody have report this error to Jenkins as below. |
return -1; } | ||
else { | ||
std::iter_swap(bucket_itrer[buckets[i]],bucket_itrer[buckets[j]]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clean up upt eh whitespace:
- for ( not for(
- if ( not if(
- } else { not {\nelse {
- avoid long lines > 80 chars
- please include { } on the outer for loop
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liewegas Thank you sir.Done it. I will remember this!:smile:
for (unsigned q=3; q < p->children.size()-1; q++) { | ||
iter_t sub = p->children.begin() + q; | ||
string tag = string_node(sub->children[0]); | ||
if (tag == "item") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you compare the id().to_long()
with _bucket_item
also, instead of hardwiring it to "item"?
and you need to revise your commit message,
|
a50b572
to
2c62f56
Compare
@tchaikov Thank you sir! Done it! 👍 👍 👍 🍵 🍻 |
@@ -816,6 +816,49 @@ void CrushCompiler::dump(iter_t const& i, int ind) | |||
} | |||
|
|||
|
|||
//Sometimes when defined the bucket above the item which the bucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, i don't follow you. could you put an example here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov : OK sir.How about the example like below?
before adjust "root default{item localhost }" " host localhost"
after adjust "host localhost" "root default{item localhost }"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oic.
so the case is:
rack using_foo { item foo }
host foo { ... }
if an item being used by a bucket is defined after that bucket. CRUSH compiler will create a map by which we can not identify that item when selecting in that bucket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov Yes sir.Thank you!
- export CEPH_MON="127.0.0.1:17109" + export CEPH_MON="127.0.0.1:17119" (must be a unique port in the test!) |
…cket Fixes: http://tracker.ceph.com/issues/15154 Signed-off-by: song baisen <song.baisen@zte.com.cn>
@liewegas Thank you sir! Learn it. The mon must have unique port here is the reason that when begin unit test we will run a lot of unit script.And may be each script may be set up a mon. Is that right? If so where we can known which port we have used.Should we define a file let people know the max port have used. |
They are all in a similar range.. you can 'git grep CEPH_MON= test' to see them all
|
@liewegas Oh Thank you sir! Learn it! |
crush: fix the problem can not find the define item below the bucket
Fixes: #15154
Signed-off-by: song baisen song.baisen@zte.com.cn