openstax / accounts

OpenStax centralized authentication and accounts service

Home Page:https://accounts.openstax.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No users are returned when searching accounts-qa

amberwebb opened this issue · comments

I am testing dev.cnx.org. I am trying to add a user as an author in page meta data. I am searching for Ed Woodward or Rich Hart but no users are returned. @karenc has verified that there are only 7 users in the database.

I had a look at the accounts_qa database on accounts-qa1:

There are 22135 application users for application 1 (OpenStax Exercises) instead of Openstax CNX.

accounts_qa=> select application_id, count(*) from application_users group by application_id;
 application_id | count
----------------+-------
              5 |     7
              6 |     2
              1 | 22135
(3 rows)

accounts_qa=> select id, name from oauth_applications;
 id |        name        
----+--------------------
  1 | OpenStax Exercises
  2 | OpenStax Tutor
  3 | OpenStax Exchange
  4 | OpenStax BigLearn
  5 | Openstax CNX
  6 | Local cnx
(6 rows)

May be when we imported the users, the app_id was set to 1 instead of 5. Should we re-import the users or just fix it in the database?

@cnuber has fixed this in the database.

I checked dev.cnx.org, user search is working again.

Might have to re-import the users. This count is wrong, should be slightly more than 40,000 users. Probably only imported some of them due to the instance running out of memory and crashing (Chris has since upgraded their memory)