EBMS Tickets

Issue Number 503
Summary [Drupal Core Testing] Error uploading document to EBMS
Created 2019-02-06 10:12:12
Issue Type Bug
Submitted By Juthe, Robin (NIH/NCI) [E]
Assigned To
Status Closed
Resolved 2019-08-01 14:23:42
Resolution Fixed
Path /home/bkline/backups/jira/oceebms/issue.239766
Description

This is another sporadic error message received upon uploading a document on the "Upload Document" page in the EBMS. I'll attach the file (a portion of a summary) and a screenshot of the error message.

Comment entered 2019-02-06 10:14:21 by Juthe, Robin (NIH/NCI) [E]

I was able to upload it with a different EBMS name. Maybe it's just a duplicate?

Comment entered 2019-02-10 16:38:46 by Kline, Bob (NIH/NCI) [C]

An attempt to refresh QA using Jenkins last fall appears to have corrupted the site, and the database doesn't match what's in the file system. So …

  1. a user tries to post a file

  2. Drupal extracts the file name from the request

  3. Drupal checks the file system to see if the file is already present

  4. the file isn’t there, so Drupal doesn’t bother to create a distinguished unique name for the URI

  5. a SQL INSERT query is submitted to add a row to the file_managed table

  6. the uri column of that table has a `UNIQUE` constraint on it, so the query throws an exception

There are many thousands of files in the database (over 16K) on QA which aren’t in the file system, and testers user whatever files they have lying around on their computers, or they download files from the production system when testing on the lower tiers, so it’s not a big surprise that they’d run into such conflicts on a system that’s as badly corrupted as QA is.

The solution will be to get CBIIT to provide backups of the database and the file system from the production site and use them to get QA back to a sane state, then apply the Drupal core upgrade and the patch for the citation queue problem fixed a week or two ago, and then have the users test again.

Comment entered 2019-02-11 15:02:20 by Kline, Bob (NIH/NCI) [C]

and : I'll be taking down the EBMS QA web server to correct the problem described in the previous comment. Will let you know when it's back up.

Comment entered 2019-02-11 15:08:01 by Juthe, Robin (NIH/NCI) [E]

Got it. Thank you!

Comment entered 2019-02-11 16:36:31 by Kline, Bob (NIH/NCI) [C]

QA has been refreshed from PROD. Please try this again.

Comment entered 2019-02-11 16:41:32 by Kline, Bob (NIH/NCI) [C]

Sorry, I need to upgrade Drupal core first. Stay tuned.

Comment entered 2019-02-11 16:43:53 by Juthe, Robin (NIH/NCI) [E]

Oh whoops, I just tested. Will stay tuned 🙂

Comment entered 2019-02-11 17:17:53 by Kline, Bob (NIH/NCI) [C]

Done. Should be ready to test now.

Comment entered 2019-02-11 17:18:10 by Kline, Bob (NIH/NCI) [C]

No harm done. It's ready now.

Comment entered 2019-02-12 16:35:05 by Juthe, Robin (NIH/NCI) [E]

Verified on QA. Thanks!

Attachments
File Name Posted User
EBMS doc upload error.png 2019-02-06 10:12:21 Juthe, Robin (NIH/NCI) [E]
Soy section 092218.docx 2019-02-06 10:12:57 Juthe, Robin (NIH/NCI) [E]

Elapsed: 0:00:00.000779