swift-ring-builder exit status confusing
Asked by
Mark Gius
I am very confused by the exit status of swift-ring-builder. According to the tool:
> Exit codes: 0 = ring changed, 1 = ring did not change, 2 = error
But when I run a successful "add" operation:
> ubuntu@proxy:~$ swift-ring-builder account.builder add z2-172.
> Device z2-172.
> ubuntu@proxy:~$ echo $?
> 1
This makes no sense to me. I've changed the ring, I just haven't rebalanced and distributed the ring. Why is the ring builder returning "ring not changed?"
Or more to the point, why is swift-ring-builder not conforming to the standard practice of 0 = success, not 0 = failure? This makes scripting swift-ring-builder far more painful than it should be.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Mark Gius
- Solved:
- Last query:
- Last reply:
To post a message you must log in.