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

Cannot start k3s systemd unit without environment file #2923

Closed
brandond opened this issue Feb 10, 2021 · 2 comments
Closed

Cannot start k3s systemd unit without environment file #2923

brandond opened this issue Feb 10, 2021 · 2 comments
Assignees
Milestone

Comments

@brandond
Copy link
Member

From @AkihiroSuda

Environmental Info:
K3s Version:
N/A

Node(s) CPU architecture, OS, and Version:
N/A

Cluster Configuration:
N/A

Describe the bug:
k3s.service was failing when the EnvironmentFile does not exist:

Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed to load environment files: No such file or directory
Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed to run 'start' task: No such file or directory
Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed with result 'resources'.
Feb 02 17:17:30 suda-ws01 systemd[1]: Failed to start Lightweight Kubernetes.

Steps To Reproduce:

  • Install K3s
  • Delete environment file at /etc/systemd/system/k3s.service.env
  • Restart k3s service

Expected behavior:
K3s starts/restarts

Actual behavior:
K3s fails with error above

Additional context / logs:

@ShylajaDevadiga
Copy link
Contributor

While validating using the latest commit, noticed the following

  1. The fix are not reflected in the k3s.service file as it is created by the install script. The changes are made to the static service file in the repo.
  2. The install script always creates the env file. Installation would not fail unless the file is deleted.
[INFO]  env: Creating environment file /etc/systemd/system/k3s.service.env
  1. By deleting the file I was able to reproduce the issue and updated the service file manually and validated the fix.

@ShylajaDevadiga
Copy link
Contributor

As discussed internally, closing the issue as example file would not be used in conjunction with the install script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants