Package indexing not happening unless py-server docker image is restarted
rchevalier-brainchip opened this issue · comments
Hi,
I am currently using v1.5.1 docker image.
Image is started with the following script:
#!/bin/bash
pyserver_port=81
py_server_up(){
echo -n "Stopping previously running pyserver instances... "
stoppev=$(docker stop py-server 2>&1)
if [ "$stopped" = "py-server" ] ; then
docker rm $stopped
fi
echo "DONE"
echo "Starting new python package server instance..."
docker run \
--volume=/home/brainchip/pip-packages/linux:/data/packages/linux \
--volume=/home/brainchip/pip-packages/manylinux:/data/packages/manylinux \
--volume=/home/brainchip/pip-packages/windows:/data/packages/win \
--publish=$pyserver_port:8080 \
--restart=always \
--detach=true \
--name=py-server \
pypiserver/pypiserver:v1.5.0
}
#####
py_server_up
and python packages are uploaded to /home/brainchip/pip-packages
using scp.
Uploading new packages, they are not seen through the server web interface unless I restart the docker image (just like if there was no indexing refresh).
Could you help me letting me know if a known issue and the additional data I could collect if not?
Thanks,
RC
We are running version 1.5.0 in a docker container and I see the same sort of behavior except a container restart doesn't update the package list for me. I can get a console into the container and see the whl file in the packages directory with all the same permissions as other files but it still doesn't show in the /packages
or /simple
URLs.
I replaced the v1.5.0 container with one running v1.5.1 and I still can't see the whl file. The web UI lists 13 other whl and gz files from the packages directory but not the one that was placed there programmatically. This is very strange all the file permissions are identical.
Thanks a lot for reporting this @rchevalier-brainchip and @kevinbull! I think that this might be related to #449 under the hood, but I will still need to start a thorough investigation. Thank you very much for reporting the reproducible configurations where the issues are faced! 👌 I hope we will be able to resolve it rather soon.
Thanks @dee-me-tree-or-love, I will try the suggested w/a (#449 (comment)) and let you know (we added a cron job to periodically restart the server meanwhile)
Great @rchevalier-brainchip, thanks a lot for trying this out! Indeed, if you could share any insights it would be super helpful! Thanks for sharing the workaround for the time being and sorry for the encountered challenges 🙏
Hi @dee-me-tree-or-love I have just restarted the docker image adding the following:
docker run \
--volume=/home/brainchip/pip-packages/linux:/data/packages/linux \
--volume=/home/brainchip/pip-packages/manylinux:/data/packages/manylinux \
--volume=/home/brainchip/pip-packages/windows:/data/packages/win \
--publish=81:8080 \
--restart=always \
--detach=true \
--name=py-server \
pypiserver/pypiserver:v1.5.0 run -p 8080 --server gunicorn --backend simple-dir
I will let you know if suggested w/a works as soon as a new package is uploaded by out continuous integration
I confirm that the above w/a works for us.
I can confirm the w/a also works with 1.5.1
Just to mention that I have setup a new server with 2.0.1 and that this issue is still there ... I had to apply the same wokraround again: #455 (comment)
I have been going through this bug for some time on my docker ....many thanks for the work around!!