Typhonragewind / meshcentral-docker

168 stars 46 forks source link

Upgrade error starting from official MC 1.0.38 #17

Closed walterzilla closed 2 years ago

walterzilla commented 2 years ago
Starting self upgrade to: 1.0.38
Update failed: Error: Command failed: /usr/bin/node /usr/bin/npm install meshcentral@1.0.38
npm ERR! code EISDIR
npm ERR! syscall copyfile
npm ERR! path /opt/meshcentral/node_modules/meshcentral
npm ERR! dest /opt/meshcentral/node_modules/.meshcentral-giqs0rxf
npm ERR! errno -21
npm ERR! EISDIR: illegal operation on a directory, copyfile '/opt/meshcentral/node_modules/meshcentral' -> '/opt/meshcentral/node_modules/.meshcentral-giqs0rxf'

Same upgrade in vanilla version (debian 11 + nodejs 12.22.12) runs flawless.

Hints? Thanks

Typhonragewind commented 2 years ago

Is this during container startup or you're trying to upgrade meshcentral from inside an already existing container? For the regular container or the MongoDb version?

walterzilla commented 2 years ago

It happens in brand new deployed regular container (even not the latest one, so in my blessed ignorance I guess has something to do with changes in MC code...?) with default settings (or custom settings as well), trying via WebUI command or via CLI command no matter.

Typhonragewind commented 2 years ago

Yeah, this seems weird. I'll fix it up soon, but i the meantime you can can grab an older version image (there should be a few older tags in dockerhub)

walterzilla commented 2 years ago

As stated before the bug still occurs using older version image (the next-to-last at least...), either way I reckon no one here is in a hurry, take your time...thanks!

Typhonragewind commented 2 years ago

@amenolo Versioning was implemented since MC version 1.0.25 and that one should work as no issues were brought up then 😅

walterzilla commented 2 years ago

Fresh deployment, tried update, still no luck... :skull:

MeshCentral v1.0.25, LAN mode, Production mode.
MeshCentral HTTPS server running on port 443.
Starting self upgrade to: 1.0.39
Update failed: Error: Command failed: /usr/bin/node /usr/bin/npm install meshcentral@1.0.39
npm ERR! code EISDIR
npm ERR! syscall copyfile
npm ERR! path /opt/meshcentral/node_modules/meshcentral
npm ERR! dest /opt/meshcentral/node_modules/.meshcentral-giqs0rxf
npm ERR! errno -21
npm ERR! EISDIR: illegal operation on a directory, copyfile '/opt/meshcentral/node_modules/meshcentral' -> '/opt/meshcentral/node_modules/.meshcentral-giqs0rxf'
Typhonragewind commented 2 years ago

Ah, so it seems that it was a problem during my implementation of the versioning system. Which is less worrisome than MC changing the way it is installed,

Thanks for trying it out and reporting!

Now, to find my idiocy in the code xD

Typhonragewind commented 2 years ago

@amenolo should be fixed on the lastest image i pushed to dockerhub. Would you mind trying it out, please ?

walterzilla commented 2 years ago

ASAP!

walterzilla commented 2 years ago

@Typhonragewind latest image runs flawless, I didn’t expect anything less, much appreciated your quick response 👌

BTW out of curiosity I downgraded MC to 1.0.36 (via CLI of course) and re-upgraded smoothly to 1.0.39 (GUI triggered, just for a change...).

See you at the next MC upgrade 😛

Typhonragewind commented 2 years ago

@amenolo Thanks for testing it out! I had never done a downgrade->upgrade cycle with it before, glad it worked out :D