uba_user - cannot save avatar: "EOSError ("System error, (OS Code 18):\nCross-device link") at 0045A34F 0045A271 00007FE011BCA2F8"
Linux, docker container issue only.
Store is mounted at container to Docker Volume, which shall work ok, that is NOT a mount on Windows host directory. And I checked it on another entity, so that is NOT a specific of uba_user.avatar and its store.
Looks like we got a problems when document file is moved from temp store to permanent store.
I did some research on error text and it looks like the reason is that the error message is highly coupled with rename/move file operations.
This specific line make me worry if that is absolute path or relative to store?
ub-app_1 | 20180623 19542060 " debug temp file is written to /tmp/uba_user_avatar_10_10
It is an absolute path, that is the problem - it tries to rename /tmp/uba_user_avatar_10_10
file, which is inside container
(and probably shouldn't) to /var/lib/app/stores/avatars/...somewhere_deeper...
, which is inside a mounted docker volume.
Log:
ub-app_1 | 20180623 19542060 " + setDocument?attribute=avatar&entity=uba_user&filename=1.png&id=10&origName=1.png
ub-app_1 | 20180623 19542060 " http 172.19.0.1 -> POST setDocument?attribute=avatar&entity=uba_user&filename=1.png&id=10&origName=1.png
ub-app_1 | 20180623 19542060 " http !BIN(39993)
ub-app_1 | 20180623 19542060 " auth admin/28961335
ub-app_1 | 20180623 19542060 " call endpoint setDocument
ub-app_1 | 20180623 19542060 " debug temp file is written to /tmp/uba_user_avatar_10_10
ub-app_1 | 20180623 19542060 " http 172.19.0.1 <- 200
ub-app_1 | 20180623 19542060 " - 00.004.133
ub-app_1 | 20180623 19542061 " + getDocument?entity=uba_user&attribute=avatar&ID=10&store=avatars&origName=1.png&isDirty=true&filename=uba_user10avatar
ub-app_1 | 20180623 19542061 " http 172.19.0.1 -> GET getDocument?entity=uba_user&attribute=avatar&ID=10&store=avatars&origName=1.png&isDirty=true&filename=uba_user10avatar
ub-app_1 | 20180623 19542061 " auth admin/28961335
ub-app_1 | 20180623 19542061 " call endpoint getDocument
ub-app_1 | 20180623 19542061 " http 172.19.0.1 <- 200
ub-app_1 | 20180623 19542061 " - 00.001.139
ub-app_1 | 20180623 19542244 " + ubql
ub-app_1 | 20180623 19542244 " http 172.19.0.1 -> POST ubql
ub-app_1 | 20180623 19542244 " http [{"fieldList":["name","firstName","lastName","fullName","gender","email","phone","description","disabled","isPending","trustedIP","uData","avatar","ID","mi_modifyDate"],"entity":"uba_user","method":"update","alsNeed":false,"execParams":{"avatar":"{\"store\":\"avatars\",\"fName\":\"1.png\",\"origName\":\"1.png\",\"ct\":\"image/png\",\"size\":39993,\"md5\":\"\",\"isDirty\":true}","ID":10,"mi_modifyDate":"2018-06-23T19:50:25.000Z"}}]
ub-app_1 | 20180623 19542244 " auth admin/28961335
ub-app_1 | 20180623 19542244 " call endpoint ubql
ub-app_1 | 20180623 19542244 " + ubMixinClasses.TubStorageMixin(00007FE013396C40).MixinMethod
ub-app_1 | 20180623 19542244 " debug uba_user.beforeupdate(TubStorageMixin)
ub-app_1 | 20180623 19542244 " + ubMixinClasses.TubStorageMixin(00007FE013396C40).MixinMethod
ub-app_1 | 20180623 19542244 " debug uba_user.select(TubStorageMixin)
ub-app_1 | 20180623 19542244 " + ubApp.TubDataStore(00007FDFFED233E0).Init
ub-app_1 | 20180623 19542244 " + ubApp.TubApp(00007FE0133B8CE0).DBExecute
ub-app_1 | 20180623 19542244 " + ubApp.TubApp(00007FE0133B8CE0).TubApp.InternalDBExecute
ub-app_1 | 20180623 19542244 " debug P1: Int64 10
ub-app_1 | 20180623 19542244 " SQL ubDBSQLite3ThreadSafe.TubSQLite3Statement(00007FE00EF1E860) SELECT A01.ID,A01.name,A01.firstName,A01.lastName,A01.fullName,A01.gender,A01.email,A01.phone,A01.avatar,A01.description,A01.uData,A01.disabled,A01.isPending,A01.trustedIP,A01.uPasswordHashHexa,A01.lastPasswordChangeDate,A01.mi_owner,A01.mi_createDate,A01.mi_createUser,A01.mi_modifyDate,A01.mi_modifyUser,A01.ID AS ID2 FROM uba_user A01 WHERE A01.ID=?
ub-app_1 | 20180623 19542244 " - 00.000.094
ub-app_1 | 20180623 19542244 " - 00.000.127
ub-app_1 | 20180623 19542244 " debug Query result for entity "uba_user" into data name "selectBeforeUpdate": row count=1
ub-app_1 | 20180623 19542244 " - 00.000.163
ub-app_1 | 20180623 19542244 " - 00.000.451
ub-app_1 | 20180623 19542244 " - 00.000.550
ub-app_1 | 20180623 19542244 " + ubMixinClasses.TubStorageMixin(00007FE013396C40).MixinMethod
ub-app_1 | 20180623 19542244 " debug uba_user.update(TubStorageMixin)
ub-app_1 | 20180623 19542244 " debug Start processing documents for entity uba_user
ub-app_1 | 20180623 19542244 " EXC EOSError ("System error, (OS Code 18):\nCross-device link") at 0045A34F 0045A271 00007FE011BCA2F8
ub-app_1 | 20180623 19542244 " EXC fs.js:340\n\nError: System error, (OS Code 18):\nCross-device link\n```