Open nickyruggs opened 1 year ago
Thanks for the report!
Here's the juicy part:
File "/root/.local/pipx/venvs/isilon-hadoop-tools/lib/python3.8/site-packages/isilon_hadoop_tools/identities.py", line 259, in create_user
uid = self.onefs.uid_of_user(
File "/root/.local/pipx/venvs/isilon-hadoop-tools/lib/python3.8/site-packages/isilon_hadoop_tools/onefs.py", line 572, in _decorated
return func(self, *args, **kwargs)
File "/root/.local/pipx/venvs/isilon-hadoop-tools/lib/python3.8/site-packages/isilon_hadoop_tools/onefs.py", line 1277, in uid_of_user
return int(auth_users.users[0].uid.id.split(":")[1])
AttributeError: 'NoneType' object has no attribute 'id'
The first line tells us the IHT correctly figured out that we got a "user already exists" error and tried to get the UID of the existing user (so that it could put the same UID into the client-side user-creation script).
While trying to get the UID, though, this line raised an AttributeError
(because auth_users.users[0].uid
is unexpectedly None
):
https://github.com/Isilon/isilon_hadoop_tools/blob/65347f5c0715f50aab9110fbc33e99ef2b004ce3/src/isilon_hadoop_tools/onefs.py#L1277
That line has been there since the Python port was created.
Given that:
isi_sdk_8_2_2
is being used, andisi-sdk-8-2-2
has not been updated since 2021I wonder if this is due to a change in a more recent version of OneFS 🤔
We do have a test for this, though, and it would have run against recent OneFS versions in the testing for #109. That may suggest this is a racy issue. The documentation does say uid
is optional... Perhaps we should be looking at auth_users.users[0].id
instead.
@nickyruggs,
This was a physical cluster running 9.4 reproduced 3 times so far most recent version. and using python 3 and (the one above 3.8)
update: I knew it was hue related....there is a user called hue in AD and AD was added to that zone when i ran the script. So of course hue already existed. Just re-ran without AD joined and it worked just fine. Maybe make a note in the documentation to run beofore adding AD or LDAP to the AZ.
Even though its a new access zone the script is failing with an error that user Hue exists. Some kind of a race condition? Please review
Evidence: