This message was deleted.
# rke2
a
This message was deleted.
c
… what exactly are you trying to do with that dir that you can’t do with the
/var/lib/rancher/rke2/bin/
symlink that points into the current data dir? If you need to figure out whats current you can always get at it from
bin/..
Copy code
root@rke2-server-1:/# ls -la /var/lib/rancher/rke2
total 24
drwxr-xr-x 5 root root 4096 Oct  3 18:36 .
drwxr-xr-x 3 root root 4096 Oct  2 23:21 ..
drwxr-xr-x 7 root root 4096 Oct  3 18:36 agent
lrwxrwxrwx 1 root root   64 Oct  3 18:36 bin -> /var/lib/rancher/rke2/data/v1.29.9-dev.afd0d41e-09750b336315/bin
drwxr-xr-x 3 root root 4096 Oct  3 18:36 data
drwx------ 7 root root 4096 Oct  3 18:36 server
root@rke2-server-1:/# ls -la /var/lib/rancher/rke2/bin/..
total 16
drwxr-xr-x 4 root root 4096 Oct  3 18:36 .
drwxr-xr-x 3 root root 4096 Oct  3 18:36 ..
drwxr-xr-x 2 root root 4096 Oct  3 18:36 bin
drwxr-xr-x 2 root root 4096 Oct  3 18:36 charts
s
sorry should have been more clear, is there a way to find that SHA prior to installing RKE2?
c
kind of…
but again why
s
so that I can prep our automation scripts with the directory
ie - add paths to fapolicyd
and other things we need to pre-populate our automation with
c
why not just add all of /var/lib/rancher/rke2/data instead of trying to do something that is going to be version-specific?
The code that calculates it is here but I think you’re trying to do something that is unnecessarily specific https://github.com/rancher/rke2/blob/bf1bcfdcbe0d37b8a6f64c25b47b7e096e6efedb/pkg/bootstrap/bootstrap.go#L198-L215
s
ah ok I figured maybe it was based on a git sha, thanks!
c
no its based on the rke2-runtime image name and tag or digest
👍 1
still if your’re adding rules for some reason I’d probalby just do
Copy code
allow perm=any all : dir=/var/lib/rancher/rke2/data
allow perm=any all : dir=/var/lib/rancher/rke2/bin
We recently started adding rules for all of /var/lib/rancher though so even that should be unnecessary if you’re using the install script https://github.com/rancher/rke2/blob/bf1bcfdcbe0d37b8a6f64c25b47b7e096e6efedb/install.sh#L658-L661
s
ah ok, we've been running an older install version of RKE2 so I'll take a look at the latest, esp given that we're working on ARM64 which looks like was just started 3 weeks ago
I didn't realize ARM builds were so recent
c
we’ve been building arm for a while, but hadn’t got around to providing RPMs yet.