Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to reconfigure : Unhandled exception: 'dict_keys' object is not subscriptable #88

Closed
Vascko opened this issue May 24, 2019 · 1 comment · Fixed by #91
Closed

Comments

@Vascko
Copy link

Vascko commented May 24, 2019

Hey guys,

my environment is the same as in #87 so this is a follow up (but separate issue).
I'm seeing the following error when trying to change a value in gwcli (or through CURL -X PUT) on a target:

/iscsi-target...-gw:iscsi-igw> reconfigure cmdsn_depth 512
Issuing reconfigure request: controls={"cmdsn_depth": "512"}
Failed to reconfigure : Unhandled exception: 'dict_keys' object is not subscriptable
/iscsi-target...-gw:iscsi-igw>

As mentioned in #87, I'm using Fedora 30 which ships with Python 3.7.
The error seems to hint at the attempt to access an index of a dictionary's keys() method return value which, in Python 3, returns an iterable and no indexable object anymore as it did in Python 2.

#2 seems to be adding Python3 support. What's the test coverage on Python 3?
I can see that there is a fix for an occurrence of what I mentioned above at https://github.com/ceph/ceph-iscsi/pull/2/files#diff-b97b10799eed7439f92d29f3e043232eL1309

I tried looking through the code if I can find more instances of what I described but I got lost pretty quick as I'm not really familiar with the code structure.

Thanks!

ricardoasmarques added a commit to ricardoasmarques/ceph-iscsi that referenced this issue May 24, 2019
Fixes: ceph#88

Signed-off-by: Ricardo Marques <rimarques@suse.com>
@ricardoasmarques
Copy link
Contributor

ricardoasmarques commented May 24, 2019

@Vascko I've created PR #91 that fixes an issue when running the reconfigure command on a python3 environment.

If this PR does not fix your issue, please paste the full Traceback from the /var/log/rbd-target-api/rbd-target-api.log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants