Ezka77 / xen-orchestra-ce

:whale: Docker & docker-compose files to deploy Xen Orchestra Community Edition (ie: from sources)
GNU General Public License v3.0
94 stars 33 forks source link

missing plugins in tag latest #10

Closed christianuhlmann closed 5 years ago

christianuhlmann commented 5 years ago

hi, in the latest version the plugins are missing. upto tag 5.30 all plugins are available regards christian

Ezka77 commented 5 years ago

Hi,

Yes, I've notice that, I'll look for it asap. It work on a local build but not on a docker hub service. That's annoying. I've tag a 5.30 version in sync with their 5.30, we are still ahead of the official version.

Slugger commented 5 years ago

Would there be a workaround available to get plugins into a running container of the latest image?

Ezka77 commented 5 years ago

Don't see one for now, I need to make the links in the build image and they seems to not be copied by the COPY command when I build the running image. But I need to check what's going on in the file system, the issue is caused by COPY or yarn link command or a combination of both.

For now daily build are stopped and latest is bind on the last tagged version I build.

mhoffmann75 commented 5 years ago

Same here. It seems that yarn linking has strange paths in the final image:

/home/node/xen-orchestra/packages/xo-server/node_modules: xo-server-auth-github -> ../../../../../../usr/local/share/.config/yarn/link/xo-server-auth-github xo-server-auth-google -> ../../../../../../usr/local/share/.config/yarn/link/xo-server-auth-google xo-server-auth-ldap -> ../../../../../../usr/local/share/.config/yarn/link/xo-server-auth-ldap

Path /usr/local/share/.config does not even exist and node_modules for each plugin is empty - so either plugins are not build or not copied. Hope this helps.

Besides that current link-script might not even work at all because of typo - see my pull request. https://github.com/Ezka77/xen-orchestra-ce/pull/11

But that does not fix the underlying problem of modules not linked.

mhoffmann75 commented 5 years ago

Update: the plugins are there - just the paths mentioned above are wrong. So @Slugger for me the following temporary workaround brings up the plugins for a already build xo container:

  1. Get the ID from your xo container via docker ps - example: 0123456789ab
  2. Bash into the running XO container: sudo docker exec -ti 0123456789ab bash
  3. change to path where broken links are: cd /home/node/xen-orchestra/packages/xo-server/node_modules
  4. Recreate links with correct path: ln -f -s ../../xo-server-auth-ldap
  5. Repeat step 4 for further modules you need
  6. exit
  7. Restart container to reflect changes sudo docker restart 0123456789ab

Every time you recreate the container via build you have to recreate the links. Hope the container image gets fixes soon.

Slugger commented 5 years ago

Confirming that this workaround works for me.

Ezka77 commented 5 years ago

Great ! I've made some updates: the 5.32 docker tag is locally build with a new link_plugins.sh, I've start a build on docker-hub for the latest tag, and the plugins are loaded in both cases.

Thanks @mhoffmann75 for checking the file system and testing if a simple ln do the trick =)