Uploaded files not corresponding to the submitted app
Bug #1022697 reported by
Michael Hall
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Developer registration portal |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Sometimes the link to the uploaded file doesn't correspond to the submitted application.
Examples:
https:/
https:/
https:/
https:/
And there are more that we are noticing while processing the App Showdown submissions
All files are being uploaded as "Ubuntu- App-Showdown- Participation- Details. txt". Unfortunately we only found the issue on the last day of the competition, as an easy work-around would have been to ask people to upload the file as "$PACKAGE_ NAME_details. txt".
I've not investigated further yet, but my guess would be it's the ftpstorage race condition which we knew about but didn't yet prioritise as we thought we'd only hit it if people were uploading the same *package* at the same time, which is very unlikely. But this usage is quite different. So, I guess what is happening is:
1) Ubuntu- App-Showdown- Participation- Details. txt through Ubuntu- App-Showdown- Participation- Details_ 20.txt already exist in the dated directory (dated %Y/%m only) App-Showdown- Participation- Details. txt to be saved, Storage. get_available_ name() returns Ubuntu- App-Showdown- Participation- Details_ 21.txt get_available_ name() returning the same filename (_21.txt). arb/packages/ 2012/06/ Ubuntu- App-Showdown- Participation- Details_ 21.txt are served from the one app server (rangpur? whichever has the ftp server - achuni will know).
2) App server 1 has a request for Ubuntu-
3) Around the same time App server 2 gets a similar request, with Storage.
4) Both requests end with the file being saved both locally on the app server as well as via FTP to the ftp server, with the latest save winning on the ftp server.
5) All requests for /site_media/
This should mean that the files that were incorrectly overwritten on the ftp server, *should* still be available locally on the other app server (I think), so that someone with /admin/ access should be able to: NAME_details. txt perhaps) to the relevant app.
1) rename them (with losa help)
2) re-upload them via the /admin/ with their new names ($PACKAGE_