Ask Your Question
0

Limitations applied to swift zones values

asked 2013-04-29 14:13:35 -0500

Hello,

I'm currently writing a logic for distributing nodes among swift zones. I'm wondering if there any limitation for swift zone value except that it should be integer. Some manuals claims that it should be continuous list of integers starting for 1(one). Some states that it should start from 0. Looking at the swift sources I can't see any limitation regarding whether to start from or some other except it should be integer. As for me this is just an integer and nothing more.

I'd appreciate if someone can clarify this. Thanks.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2013-04-29 20:25:45 -0500

Thanks Samuel Merritt, that solved my question.

edit flag offensive delete link more
0

answered 2013-04-29 19:09:24 -0500

torgomatic gravatar image

Yep, it's just an integer. To the best of my knowledge, Swift doesn't do any arithmetic on zone numbers, so you can use whatever integers you feel like.

However, I think there is some parsing code in bin/swift-ring-builder that restricts you to non-negative integers, so having a zone -17 probably won't work.

edit flag offensive delete link more
0

answered 2013-04-29 20:25:33 -0500

Thanks Samuel.

Indeed, it is impossible to set zone to -17 due to parsing algorithm limitation.

So, to summarizing the knowledge: swift zone can be any non-negative integer, swift zones for a cluster could be a sparse set of non-negative integers and it is not required to keep them as continuous set. This is all due to a semantic of swift zone value - it is only an ID of zone and nothing else. At least for Folsom and Grizzly releases.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-04-29 14:13:35 -0500

Seen: 5 times

Last updated: Apr 29 '13