Description
For system packs, and for any images in st2.packs.images
, we copy packs and virtualenvs into /opt/stackstorm.
Before #199, the packs volumes were always emptyDir
, so using /bin/cp -aR
was just fine.
In #160 (comment), it was noted that the st2packs
image does not have rsync
so we have continued with /bin/cp
even though rsync could be a bit better.
After #199, the underlying volume's filesystem might not support preserving ownership, timestamps or other attributes, as reported in #238. In #238, the NFS exports were setup with root_squash
which prevented ownership preservation. Debugging that was quite annoying.
So, it would be better to handle different filesystems more gracefully. If we can preserve ownership and file permissions, great. But we should only fail if the file contents do not get copied. We might also need to fail if executable files are not executable after copy.
rsync
is probably the best tool to do this -> We need to add it to the st2packs
image.
But, we do not want to force everyone to rebuild their st2packs
images, especially if they are not and do not intend to use the new st2.packs.volumes
feature. So, if rsync
is not available, we need to fall back to using cp
.
See comments:
- a description of where we need to adjust the chart
- nfs export options
- adding rsync to
st2packs
- reply to adding rsync to
st2packs
We should probably do this before prod/GA to have minimal impact on GA adopters.
- add
rsync
tost2packs
image Install rsync in st2packs images st2packs-dockerfiles#26 - update chart Use rsync to copy pack contents #415