-
Notifications
You must be signed in to change notification settings - Fork 132
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
Dictionary index was missing in checking idle users #1592
base: master
Are you sure you want to change the base?
Dictionary index was missing in checking idle users #1592
Conversation
I need some time to review the whole userdb logic, but reading the code on the fly the error should require that the Please let me know your steps to replicate the problem. Even after dropping all the collections I can click on "Pending users" without problems. |
Thank you for trying to reproduce this error. I was using Python 3.10.7 on Ubuntu 22.10. I first logged in as user00 and changed the password, then logged out, then created a new user maximmasiutin, then logged in as user00 in another tab and approved the new user maximmasiutin, then was idle for about 5 minutes, then visited "Users - Pending & Idle" (as user00) and the error appeared. Similar error is when creating a new run but did not setup a Github token. Github denies the request after a few attempts (e.g. specify improper signature a few times) but Fishtest does not report that but fails (internal server error) due to a missing directory index. The error is in the line
it tells that the string index must be integer it stops giving "internal server error" in this line if I change it to
to reproduce this error, delete Github token or use invalid token. (however, it then gives similar error in another place. |
Also, the script creates 10 users, but there is no userdb API function to delete a user - might have been useful. |
Please mind that MongoDB Community Edition supports only Ubuntu LTS, and until a couple of months ago Ubuntu 22.04 was not supported (I need to test the fishtest setup script on Ubuntu 22.04) https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/ Deleting an user will corrupt the relations between the data/collections. |
If the user is just created (never authenticated) than there is no action done by this user yet so it is safe to delete that user. I installed MongoDB Community Edition on Ubuntu 22.10 using the setup script for 22.04. |
The never active user is deleted automatically by the scheduled script. |
The server setup script works on a clean Ubuntu 22.04 VM, no errors during the install and all the services are up and running, but I have a forbidden access to all the static content. eg http://172.17.195.40/favicon.ico The setup on Ubuntu 18.04 is fine (and on Ubuntu 20.04 when tested some months ago). |
I also installed some time ago Fishtest on 22.04. I recall that there were some issues with file or directory permissions. I don't remember how I fixed this. |
Thank you, so this is a general problem, and we need to fix the setup script. |
Be sure that the script # initialize idle with all the users
for u in request.userdb.get_users():
idle[u["username"]] = u
# remove the active users
for u in request.userdb.user_cache.find():
del idle[u["username"]] |
mongosh << EOF
use fishtest_new
db.users.find()
db.user_cache.find()
EOF run: ${VENV}/bin/python3 fishtest/server/utils/delta_update_users.py all |
Here is my crontab:
Probably, the error appeared before the task run. |
The
|
Wiki server setup script update to Ubuntu 22.04, usermod -aG ${user_name} www-data https://stackoverflow.com/questions/16808813/nginx-serve-static-file-and-got-403-forbidden |
There was an exception that the key was not found when opening the /pending URL