ceph / ceph-iscsi-cli

NOTICE: moved to https://github.com/ceph/ceph-iscsi
GNU General Public License v3.0
25 stars 25 forks source link

Error on removing hosts/disks #78

Open fe-ax opened 6 years ago

fe-ax commented 6 years ago

on command:

curl --insecure --user admin:admin -d "ip_address=10.0.36.21" -X DELETE http://127.0.0.1:5000/api/client/iqn.1998-01.com.vmware:internal-appliances-hv-01-4b798644 > test.html

Array ( [language] => pytb [code] => Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/flask/app.py", line 1836, in call return self.wsgi_app(environ, start_response) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "/usr/bin/rbd-target-api", line 94, in decorated return f(*args, **kwargs) File "/usr/bin/rbd-target-api", line 961, in client gateways.remove(local_gw) ValueError: list.remove(x): x not in list ) failed 2

I had problems with the server being messed up after multiple compiles and tests, now I want to remove all old gateways that do not exist anymore. Before I can do that I have to remove those disks and hosts, but then this error came.

fe-ax commented 6 years ago

When I changed my ip and hostname to the old server I can get past this error

adding all ips to the allowed ips in the iscsi-gateway.cfg helped somewhat extra

mikechristie commented 6 years ago

Just a FYI, removal of many components is not supported yet. For example, you could not remove a gateway while images are mapped to LUNs.

As a temp workaround you can do the following:

// remove gateway config rados -p rbd rm gateway.conf

// reboot all iscsi target nodes.

// delete images rbd rm image_name

You should then have a clean setup.