OpenNebula / one-deploy

Apache License 2.0
25 stars 12 forks source link

frontend does not load after update (403 on main.js) #55

Open bjoern-r opened 6 months ago

bjoern-r commented 6 months ago

Description Something is wrong with the deployment of the sunstone directory rights. After an initial deployment everything works, however after the installation of updates (apt upgrade) on the frontend the sunstone gui does not load after login. In the network -console of chrome i do see that main.js cannot be loaded because of an 403 error. the apache error.log shows the following error:

[core:error] [pid 962:tid 139710705915456] [client 10.147.78.61:60188] AH00037: Symbolic link not allowed or link target not accessible: /usr/lib/one/sunstone/public/dist/main.js,

and file rights of the two mentiond files are:

lrwxrwxrwx 1 root     root          29 Apr 21 16:35 /usr/lib/one/sunstone/public/dist/main.js -> /var/lib/one/sunstone/main.js
-rw-r--r-- 1 oneadmin oneadmin 7878794 Apr 22 13:57 /var/lib/one/sunstone/main.js

Last time i happen to have this issue i just redeployed with one-deploy but this time i tried to fix the issue without reinstallation.

To Reproduce

Expected behavior frontend shoud still work after an upgrade

Details

Additional context after running the following snipped it worked again:

chgrp oneadmin /etc/one/sunstone-server.conf
chgrp oneadmin /etc/one/sunstone-plugins.yaml
chgrp oneadmin /var/lib/one/.one/sunstone_auth
chmod a+x /var/lib/one
chmod a+x /var/lib/one/.one
chmod a+x /var/lib/one/sunstone
chgrp oneadmin /var/log/one/sunstone*
chmod g+w /var/log/one/sunstone*

Progress Status

sk4zuzu commented 6 months ago

Hi @bjoern-r

The ansible code doesn't currently handle upgrades, what it tries to do is to deploy fresh OpenNebula environments in minimal number of steps. I believe this is not the correct place to report this problem, that's because we currently cannot do anything about it in ansible scripts. If the manually executed command apt upgrade breaks filesystem permissions then the problem is in the DEB package itself. :thinking:

bjoern-r commented 6 months ago

Hi @sk4zuzu Thanks for clarifying.

bjoern-r commented 6 months ago

are there any plans to make this playbooks idempotent so it does not break on a second execution?

sk4zuzu commented 6 months ago

I believe so, but only when we implement upgrades. For the time being we'll try to reproduce your issue and take a look at the DEB package itself. :thinking: