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

[BUG] Invalid setting etcd-snapshot-schedule-cron #639

Closed
jinjianming opened this issue Oct 19, 2023 · 5 comments
Closed

[BUG] Invalid setting etcd-snapshot-schedule-cron #639

jinjianming opened this issue Oct 19, 2023 · 5 comments
Assignees
Labels
bug Something isn't working to test Need to test
Milestone

Comments

@jinjianming
Copy link

This is my complete boot command, and you can see that I have set 'etcd-snapshot-schedule-cron' to execute backup logic every minute

k3s master command: INSTALL_K3S_EXEC='server --advertise-address=192.168.0.248 --cluster-cidr=10.42.0.0/16 --cluster-init --node-external-ip=192.168.0.248 --tls-san=192.168.0.248 --disable traefik,metrics-server --data-dir /work/lib/rancher/k3s --etcd-snapshot-schedule-cron * * * * * --etcd-snapshot-retention 15 --service-node-port-range 1-65535 --kubelet-arg container-log-max-files=3 --kubelet-arg container-log-max-size=50Mi --kubelet-arg root-dir=/work/lib/rancher/k3s/kubelet --default-local-storage-path /work/lib/rancher/k3s/local-storage ' INSTALL_K3S_SKIP_DOWNLOAD='true' K3S_TOKEN='23bb4389eee724dbd5615e2331e81733' install.sh"

But it did not take effect. After analysis, it was found that Autok3s will configure line breaks

ExecStart=/usr/local/bin/k3s \
    server \
        ...... \
        '--etcd-snapshot-schedule-cron' \
        '*' \
        '*' \
        '*' \
        '*' \
        '*' \

I tried to manually modify it to the following format and it works properly

ExecStart=/usr/local/bin/k3s \
    server \
        ...... \
        '--etcd-snapshot-schedule-cron' \
        '* * * * *'

CC @JacieChao @orangedeng

@jinjianming jinjianming added the bug Something isn't working label Oct 19, 2023
@JacieChao
Copy link
Collaborator

Passing a quoted string inside another quoted string is hard to get right. Maybe we need to refactor the installation parameters by K3s configuration file for advanced installation rather than the only setting with INSTALL_K3S_EXEC env.
Should consider with #638

@JacieChao JacieChao added this to the v0.9.2 milestone Oct 19, 2023
@JacieChao JacieChao self-assigned this Oct 19, 2023
@JacieChao JacieChao modified the milestones: v0.9.2, v0.9.3 Jan 5, 2024
@goolzerg
Copy link

goolzerg commented Jul 3, 2024

any news?

@JacieChao
Copy link
Collaborator

@goolzerg This feature is already working in progress and doing the final test.
We will release v0.9.3 as soon as this feature is tested. Thanks for your patience.

@JacieChao
Copy link
Collaborator

The K3s server/agent configuration can be set from the Server Config File/Agent Config File which is hidden by default from UI.

For users who use the CLI, use the parameter --server-config-file /my/server-config.yaml --agent-config-file /my/agent-config.yaml

@JacieChao JacieChao added the to test Need to test label Jul 17, 2024
@JacieChao
Copy link
Collaborator

Tested with v0.9.3-rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to test Need to test
Development

No branches or pull requests

3 participants