sillsdev / web-languageforge

Language Forge: Online Collaborative Dictionary Building on the Web and Phone.
https://languageforge.org
MIT License
44 stars 29 forks source link

implement send-receive lfmerge persistent volume and test that it functions on QA #966

Closed megahirt closed 3 years ago

megahirt commented 3 years ago

app container persistent volume mount: /var/lib/languageforge

longrunningprocess commented 3 years ago

from some external team discussions:

/var/lib/languageforge has just one subdirectory, lexicon, and lexicon has just one subdirectory, sendreceive. But that's the current state. It used to be that there was a second subdirectory under languageforge, called semdomtrans (for "Semantic Domain Translator"), and we might bring that back, or create another app in the languageforge site, at some point. So putting the mount point at /var/lib/languageforge is the simplest setup that allows for flexibility down the road.

In the interest of giving the persistent volume a more specific name as well as building toward what we know today, I'm going to map the volume to /var/lib/languageforge/lexicon/sendreceive. I do this fully recognizing there may be a day when the semdomtrans might come into play and if/when it does, we'll see if moving the volume up a couple of directories is still appropriate.

longrunningprocess commented 3 years ago

testing locally

positive test

  1. "join" a project
  2. enter prod creds for LD
  3. pick project (must a mgr of the project)
  4. choose the project from dropdown
  5. wait
  6. upon success, contents will be loaded into /var/lib/languageforge/lexicon/sendreceive/webwork under the project name
  7. restart app container, i.e., make clean then make
  8. project should still be listed
  9. head into settings cog next to project name and "Synchronize"
  10. you should not see "Creating initial data" and theoretically the sync should be faster than the initial load

negative test

  1. make clean to shut the app down
  2. docker volume rm docker_lfmerge-sendreceive-data to remove the persistent volume
  3. make to start the app again (with db still in tact)
  4. "Synchronize" and you should see a message about creating initial data
longrunningprocess commented 3 years ago

test in QA

  1. joined project
  2. sync to LD currently failing, need to troubleshoot
rmunn commented 3 years ago

@longrunningprocess -

2. sync to LD currently failing, need to troubleshoot

I recently discovered that the sync to Language Depot needs ping installed or it will fail quietly without a log message. (When the sync process was built it was assumed that ping would always be available since it's part of the minimal set on Debian). Try adding apt-get install iputils-ping to the Dockerfile and see if that helps.

longrunningprocess commented 3 years ago

@rmunn as suspected, I'm still seeing a broken comm issue in the LD db container after installing ping in our base image, publishing it to Docker Hub and redeploying it to staging.

longrunningprocess commented 3 years ago

the current failures look like they might've been there all along, unrelated to the volume work so I opened https://github.com/sillsdev/web-languageforge/issues/981 to address it but as far as the persistent volume goes, it is working just fine.