Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Killall script should not unmount /var/lib/rancher/k3s/(server|agent) #8527

Closed
brandond opened this issue Oct 3, 2023 · 2 comments
Closed
Assignees
Milestone

Comments

@brandond
Copy link
Member

brandond commented Oct 3, 2023

The best practices docs at https://docs.k3s.io/reference/resource-profiling#preventing-agents-and-workloads-from-interfering-with-the-cluster-datastore recommend putting the server and agent dirs on different filesystems. However, the killall script unmounts everything under /var/lib/rancher/k3s

We should figure out what specifically under /var/lib/rancher/k3s needs to be unmounted, and do that, instead of unmounting everything.

Internal Ref: SURE-7006

@brandond brandond moved this from New to Next Up in K3s Development Oct 3, 2023
@brandond brandond added this to the v1.28.3+k3s1 milestone Oct 3, 2023
@brandond brandond moved this from Next Up to Backlog in K3s Development Oct 12, 2023
@brandond brandond removed this from the v1.28.3+k3s1 milestone Oct 12, 2023
@brandond brandond moved this from Backlog to Accepted in K3s Development Oct 12, 2023
@brandond
Copy link
Member Author

brandond commented Dec 1, 2023

@caroline-suse-rancher I believe this was an internal ask, not sure if there is a Jira for it or not.

@endawkins
Copy link

endawkins commented Aug 21, 2024

Validated on branch master with commit 98262b5 / version 1.30

Environment Details

Infrastructure

  • Cloud
  • Hosted

Node(s) CPU architecture, OS, and Version:

Linux ip-172-31-3-48 5.14.21-150500.55.44-default #1 SMP PREEMPT_DYNAMIC Mon Jan 15 10:03:40 UTC 2024 (cc7d8b6) x86_64 x86_64 x86_64 GNU/Linux
NAME="SLES"
VERSION="15-SP5"
VERSION_ID="15.5"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp5"
DOCUMENTATION_URL="https://documentation.suse.com/"

Cluster Configuration:

1 server

Config.yaml:

N/A

Additional files

N/A

Testing Steps

  1. Copy config.yaml
$ sudo mkdir -p /etc/rancher/k3s && sudo cp config.yaml /etc/rancher/k3s
  1. Install k3s
  2. Mount server and agent
sudo mount --bind /var/lib/rancher/k3s/server /var/lib/rancher/k3s/server; sudo mount --bind /var/lib/rancher/k3s/agent /var/lib/rancher/k3s/agent
  1. Run killall.sh
  2. $ cat /proc/mounts /var/lib/rancher/k3s/server; cat /proc/mounts /var/lib/rancher/k3s/agent
  3. Validate that server and agent are present in the mounted filesystems

Replication Results:

  • k3s version used for replication:
k3s -v
k3s version v1.30.3+k3s1 (f6466040)
go version go1.22.5
cat /proc/mounts | grep /var/lib/rancher/k3s/agent
cat /proc/mounts | grep /var/lib/rancher/k3s/server

No results display even after having run the mount command to mount both server and agent using the command in the steps.

Validation Results:

  • k3s version used for validation:
k3s -v
k3s version v1.30.4-rc1+k3s1 (98262b5d)
go version go1.22.5
ec2-user@ip-[IP_ADDRESS]:~> cat /proc/mounts | grep /var/lib/rancher/k3s/server
/dev/nvme0n1p3 /var/lib/rancher/k3s/server xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
ec2-user@ip-[IP_ADDRESS]:~> cat /proc/mounts | grep /var/lib/rancher/k3s/agent
/dev/nvme0n1p3 /var/lib/rancher/k3s/agent xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0

Additional context / logs:

  • Scenario 2: Custom data dir /opt/customdir/agent, /opt/customdir/server
Observations
ubuntu@ip-[IP_ADDRESS]:~$ cat /proc/mounts | grep /opt/customdir/server
/dev/root /opt/customdir/server ext4 rw,relatime,discard,errors=remount-ro,commit=30 0 0
ubuntu@ip-1[IP_ADDRESS]:~$ cat /proc/mounts | grep /opt/customdir/agent
/dev/root /opt/customdir/agent ext4 rw,relatime,discard,errors=remount-ro,commit=30 0 0

@github-project-automation github-project-automation bot moved this from To Test to Done Issue in K3s Development Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants