coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.77k stars 172 forks source link

torusblk aoe doesn't close resources and failed to restart #381

Closed nak3 closed 7 years ago

nak3 commented 7 years ago

description

version

steps to reproduce

1. Start and stop(ctrl+c) torusblk aoe

[vagrant@torus1 torus]$ sudo ./bin/torusblk aoe test lo 0 0 --debug

  ... Ctr+C ...

Received an interrupt, stopping services...
2016-11-05 14:06:10.134331 E | aoe: ReadFrom failed: bad file descriptor

2. Restart aoe server soon

[vagrant@torus1 torus]$ sudo ./bin/torusblk aoe test lo 0 0 --debug
2016-11-05 14:06:11.292182 I | torus: creating metadata service: etcd
2016-11-05 14:06:11.294079 N | ring: Using ring that requests replication level 2, but has only 1 peers. Add nodes to match replication.
2016-11-05 14:06:11.294252 I | torus: 39edec67-a31c-11e6-9541-5254007c7544: 1
2016-11-05 14:06:11.294585 I | torus: creating blockstore: temp
2016-11-05 14:06:11.295168 N | ring: Using ring that requests replication level 2, but has only 1 peers. Add nodes to match replication.
2016-11-05 14:06:11.295289 I | torus: 39edec67-a31c-11e6-9541-5254007c7544: 1
2016-11-05 14:06:11.295555 D | gc: creating blockvol gc
Failed to crate AoE server: torus: locked

As you can see, AoE server failed to start due to the locked status. (After a few minutes, it will be unlocked.)