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

k0s stop fails on OpenRC #4212

Open
4 tasks done
twz123 opened this issue Mar 28, 2024 · 3 comments
Open
4 tasks done

k0s stop fails on OpenRC #4212

twz123 opened this issue Mar 28, 2024 · 3 comments
Assignees
Labels
area/cli bug Something isn't working

Comments

@twz123
Copy link
Member

twz123 commented Mar 28, 2024

Before creating an issue, make sure you've checked the following:

  • You are running the latest released version of k0s
  • Make sure you've searched for existing issues, both open and closed
  • Make sure you've searched for PRs too, a fix might've been merged already
  • You're looking at docs for the released version, "main" branch docs are usually ahead of released versions.

Platform

Linux 6.6.16-0-virt #1-Alpine SMP PREEMPT_DYNAMIC Wed, 07 Feb 2024 18:00:38 +0000 x86_64 GNU/Linux
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.19.1
PRETTY_NAME="Alpine Linux v3.19"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Version

v1.29.2+k0s.0

Sysinfo

`k0s sysinfo`
Machine ID: "520d83367cc66044c489015b45f9521468fddab97f63b214793b664725c67a84" (from machine) (pass)
Total memory: 975.5 MiB (warning: 1.0 GiB recommended)
Disk space available for /var/lib/k0s: 6.1 GiB (pass)
Name resolution: localhost: [127.0.0.1] (pass)
Operating system: Linux (pass)
  Linux kernel release: 6.6.16-0-virt (pass)
  Max. file descriptors per process: current: 4096 / max: 4096 (warning: < 65536)
  AppArmor: unavailable (pass)
  Executable in PATH: modprobe: /sbin/modprobe (pass)
  Executable in PATH: mount: /bin/mount (pass)
  Executable in PATH: umount: /bin/umount (pass)
  /proc file system: mounted (0x9fa0) (pass)
  Control Groups: version 2 (pass)
    cgroup controller "cpu": available (is a listed root controller) (pass)
    cgroup controller "cpuacct": available (via cpu in version 2) (pass)
    cgroup controller "cpuset": available (is a listed root controller) (pass)
    cgroup controller "memory": available (is a listed root controller) (pass)
    cgroup controller "devices": available (device filters attachable) (pass)
    cgroup controller "freezer": available (cgroup.freeze exists) (pass)
    cgroup controller "pids": available (is a listed root controller) (pass)
    cgroup controller "hugetlb": available (is a listed root controller) (pass)
    cgroup controller "blkio": available (via io in version 2) (pass)
  CONFIG_CGROUPS: Control Group support: no kernel config found (warning)
  CONFIG_NAMESPACES: Namespaces support: no kernel config found (warning)
  CONFIG_NET: Networking support: no kernel config found (warning)
  CONFIG_EXT4_FS: The Extended 4 (ext4) filesystem: no kernel config found (warning)
  CONFIG_PROC_FS: /proc file system support: no kernel config found (warning)

What happened?

On OpenRC, sudo k0s stop fails with Error: exit status 1.

Steps to reproduce

demo-worker-0:~$ sudo k0s reset
FATA[2024-03-28 09:10:28] k0s seems to be running! please stop k0s before reset.
demo-worker-0:~$ sudo k0s stop
Error: exit status 1
demo-worker-0:~$ echo $?
1
demo-worker-0:~$ sudo /etc/init.d/k0sworker stop
 * Stopping k0s ...                                                                             [ ok ]
demo-worker-0:~$ sudo k0s reset
W0328 09:15:34.659826    4211 logging.go:59] [core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {Addr: "/run/k0s/containerd.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, }. Err: connection error: desc = "transport: Error while dialing: dial unix /run/k0s/containerd.sock: connect: no such file or directory"
WARN[2024-03-28 09:15:36] To ensure a full reset, a node reboot is recommended.

Expected behavior

It works ¯\(ツ)

Actual behavior

Needs to be stopped manually.

Screenshots and logs

No response

Additional context

There's some log statement in the k0s reset output which probably shouldn't be there, as well.

@twz123 twz123 added bug Something isn't working area/cli labels Mar 28, 2024
@ncopa ncopa self-assigned this Mar 28, 2024
Copy link
Contributor

The issue is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Apr 27, 2024
@twz123 twz123 removed the Stale label Apr 28, 2024
Copy link
Contributor

The issue is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label May 28, 2024
@kke kke removed the Stale label May 29, 2024
@twz123
Copy link
Member Author

twz123 commented May 29, 2024

I can reproduce this in the inttests as well:

$ make check-singlenode K0S_KEEP_AFTER_TESTS=always
[ ... ]
--- PASS: TestSingleNodeSuite (75.33s)
    --- PASS: TestSingleNodeSuite/TestK0sGetsUp (71.71s)
        --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify (12.26s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/kineIsDefaultStorage (0.05s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/noControllerJoinTokens (0.09s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/noWorkerJoinTokens (0.09s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/leader_election_disabled_for_scheduler (0.00s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/leader_election_disabled_for_controller_manager (0.00s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/killK0s (5.21s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/etcdIsRunning (0.01s)
            --- PASS: TestSingleNodeSuite/TestK0sGetsUp/verify/no_kube-bridge_address_in_default_config (0.09s)
PASS
ok      github.com/k0sproject/k0s/inttest/singlenode    75.351s

$ docker exec -ti TestSingleNodeSuite-controller0 k0s reset
FATA[2024-05-29 15:17:01] k0s seems to be running! please stop k0s before reset.

$ docker exec -ti TestSingleNodeSuite-controller0 k0s stop
Error: exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants