Comments (4)
The iSCSI spec says the name is not case sensitive. The kernel and rtslib will take the capital letters and just convert it to lower case. The user space tools are ignoring the normalized name that rtslib returns and will use the name with capital letters. On deletion we then later mismatch and think we already deleted it.
We should be using the name returned from rtslib.normalize_wwn.
I will make a patch and link it here.
from ceph-iscsi-cli.
Here are some patches which should fix the issue:
For your existing setup with the bad name, I think you are stuck. You can manually delete everything by doing
rados -p rbd rm gateway.conf
then rebooting the iscsi gateways. When they come up it will be with a empty config and no objects.
from ceph-iscsi-cli.
thanks. but I found another issue.
1: I make a image in command rbd create iotest/datest --size 10G
,
2: and then I use gwcli to create an iqn, create iqn.1994-05.com.redhat:75c3d5efde0
3: and create a disk create pool=iotest image=datest size=10G
which is the same name as i created in command rbd create iotest/datest --size 10G
.
4: i add the disk to my iqn in command disk add iotest.datest
5: after all success, i remove the disk, in curl --insecure --user admin:admin -d disk=iotest.datest -X DELETE https://192.168.122.69:5000/api/clientlun/iqn.2017-08.org.ceph:iscsi-gw0
,
6: and remove the iqn curl --insecure --user admin:admin -X DELETE https://192.168.122.69:5000/api/client/iqn.1994-05.com.redhat:myhost4
7: then I remove my image in ceph, by doing rbd rm iotest/datest
it seems ok for all I done, but when I try to come in gwcli again, it shows
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 765, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/site-packages/gwcli/storage.py", line 76, in _get_disk_size
with rbd.Image(ioctx, image) as rbd_image:
File "rbd.pyx", line 1397, in rbd.Image.__init__ (/home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/12.2.10/rpm/el7/BUILD/ceph-12.2.10/build/src/pybind/rbd/pyrex/rbd.c:11876)
ImageNotFound: [errno 2] error opening image datest at snapshot None
KeyError: u'iotest.datest'
and gwcli cannot work again!
I find in log that the image ``` datest`` is still in config file:
"disks": {
"iotest.datest": {
"created": "2019/01/17 01:10:09",
"image": "datest",
"owner": "node3",
"pool": "iotest",
"pool_id": 7,
"updated": "2019/01/17 01:10:09",
"wwn": "f0b79a61-3470-4b2a-b9e9-f8574410fb13"
}
}
i use targetcli and it shows that the image I created iotest.datest
is still there
/> ls
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
| o- block .................................................................................................. [Storage Objects: 0]
| o- fileio ................................................................................................. [Storage Objects: 0]
| o- pscsi .................................................................................................. [Storage Objects: 0]
| o- ramdisk ................................................................................................ [Storage Objects: 0]
| o- user:glfs .............................................................................................. [Storage Objects: 0]
| o- user:qcow .............................................................................................. [Storage Objects: 0]
| o- user:rbd ............................................................................................... [Storage Objects: 2]
| o- iotest.rbd-01 ...................................................... [iotest/rbd-01;osd_op_timeout=30 (500.0GiB) activated]
| | o- alua ................................................................................................... [ALUA Groups: 4]
| | o- ano2 ............................................................................... [ALUA state: Active/non-optimized]
| | o- ano3 ............................................................................... [ALUA state: Active/non-optimized]
| | o- ao ..................................................................................... [ALUA state: Active/optimized]
| | o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
| o- iotest.datest ........................................................... [iotest/datest;osd_op_timeout=30 (10.0GiB) activated]
| o- alua ................................................................................................... [ALUA Groups: 4]
| o- ano1 ............................................................................... [ALUA state: Active/non-optimized]
| o- ano3 ............................................................................... [ALUA state: Active/non-optimized]
| o- ao ..................................................................................... [ALUA state: Active/optimized]
| o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
I have suffered from this issue for a while.
I think I cannot delete any ceph image if this image ever map to an iqn in case of gwcli goes wrong.
from ceph-iscsi-cli.
It's not supported to mix different methods.
from ceph-iscsi-cli.
Related Issues (20)
- Create disk in Erasure Pool (--data-pool)
- create disk is too slow HOT 16
- ceph mimic iscsi issue HOT 4
- create Failed : 500 INTERNAL SERVER ERROR HOT 4
- error on rbd-target-gw restart affects second gateway HOT 1
- rollback of snapshot:LUN deactivate failure - in-use HOT 1
- gwcli fails on creating disk HOT 4
- About multipath gateway down someone
- API with authentication response is very slow HOT 1
- gwcli KeyError: 'groups' HOT 4
- gwcli: KeyError rbd_name.split HOT 1
- gwcli: Gateway status UNKNOWN HOT 2
- AttributeError: 'module' object has no attribute 'WriteOpCtx' HOT 2
- Unable to access the configuration object : REST API failure, code : 500 HOT 1
- " KeyError: 'targets' " when adding second gateway on ceph-iscsi on ubuntu - BUG
- Trouble: gwcli.utils.GatewayAPIError: Unknown error connecting to http://localhost:5001/api/config
- Help! The rbd-target-api service of iSCSI gw cannot be started HOT 1
- rbd-target-gw.service: Failed with result 'exit-code'.
- Cannot remove a non-existent gatway by confirm=true HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ceph-iscsi-cli.