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

Failed to get unit file state for nm-cloud-setup.service #4911

Closed
1 task
AlecKotovichSAM opened this issue Jan 11, 2022 · 6 comments
Closed
1 task

Failed to get unit file state for nm-cloud-setup.service #4911

AlecKotovichSAM opened this issue Jan 11, 2022 · 6 comments

Comments

@AlecKotovichSAM
Copy link

AlecKotovichSAM commented Jan 11, 2022

Environmental Info:

k3s version v1.22.5+k3s1 (405bf79)
go version go1.16.10

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

Linux master-public-1 5.11.0-1022-oracle #23~20.04.1-Ubuntu SMP Fri Nov 12 15:45:47 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Cluster Configuration:

OCI Ampere VM.Standard.A1.Flex with Ubuntu 20

Describe the bug:

During fresh install on an fresh system an error "Failed to get unit file state for nm-cloud-setup.service" occured after installation.

Steps To Reproduce:

curl -sfL https://get.k3s.io | sh -

Expected behavior:

k3s is installed

Actual behavior:

"Failed to get unit file state for nm-cloud-setup.service: No such file or directory" message during start after fresh install.

This file is missing, but exists in /etc/systemd/system/k3s.service, line 26:

ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service'

Also it may be helpful - it is hanging about 3 minutes before fails.

Additional context / logs:

-- > journalctl -xe
-- A start job for unit k3s.service has begun execution.
--
-- The job identifier is 742.
Jan 11 15:48:20 master-public-1 sh[1322]: Failed to get unit file state for nm-cloud-setup.service: No such file or directory
Jan 11 15:48:21 master-public-1 k3s[1325]: time="2022-01-11T15:48:21Z" level=info msg="Starting k3s v1.22.5+k3s1 (405bf79d)"
ubuntu@master-public-1:~$ systemctl status k3s.service
● k3s.service - Lightweight Kubernetes
     Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: enabled)
     Active: activating (start) since Tue 2022-01-11 15:41:34 UTC; 1min 10s ago
       Docs: https://k3s.io
    Process: 793 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service (code=exited, status=0/SUCCESS)
    Process: 829 ExecStartPre=/sbin/modprobe br_netfilter (code=exited, status=0/SUCCESS)
    Process: 830 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 857 (k3s-server)
      Tasks: 6
     Memory: 155.6M
     CGroup: /system.slice/k3s.service
             └─857 /usr/local/bin/k3s server

Jan 11 15:41:34 master-public-1 systemd[1]: Starting Lightweight Kubernetes...
Jan 11 15:41:34 master-public-1 sh[793]: + /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service
Jan 11 15:41:34 master-public-1 sh[808]: Failed to get unit file state for nm-cloud-setup.service: No such file or directory
Jan 11 15:41:39 master-public-1 k3s[857]: time="2022-01-11T15:41:39Z" level=info msg="Starting k3s v1.22.5+k3s1 (405bf79d)"

Backporting

  • Needs backporting to older releases
@brandond
Copy link
Member

brandond commented Jan 11, 2022

For the record, the check is there to ensure that the nm-cloud-setup.service is NOT running. K3s will fail to start if it is.

@davinkevin
Copy link

But if the nm-cloud-setup.service is not installed at all the pre start check is failing 🤔 .

@brandond
Copy link
Member

brandond commented Mar 14, 2022

No, it doesn't. It will log a message about not finding it, but the shell command will exit with a 0 return code due to the use of the ! operator.

@davinkevin
Copy link

Ok, I'll double check on that because I though it was the only error preventing k3s to start, but I'm maybe wrong. Thanks for the answer 👍

@johnmacdowall
Copy link

I got the same response. Running on Raspberry Pi 4 with Bullseye 64bit.

@k3s-io k3s-io locked as resolved and limited conversation to collaborators Apr 4, 2022
@brandond
Copy link
Member

brandond commented Apr 4, 2022

If k3s is failing and you see this message in your logs, look further - this is not the cause of your problem.

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

No branches or pull requests

4 participants