Closed dgolovin closed 7 months ago
Could you provide the --log-level debug
output for this command? There is too little information to determine the actual problem. What about the distro/version of Linux? which steps shows an issue or do all steps succeed but however still return an error?
Fedora 38
I've update description.
Libvirtd related:
INFO Checking if libvirt daemon is running
DEBU Checking if libvirtd service is running
DEBU Running 'systemctl status virtqemud.socket'
DEBU Command failed: exit status 3
DEBU stdout: * virtqemud.socket - Libvirt qemu local socket
Loaded: loaded (/usr/lib/systemd/system/virtqemud.socket; disabled; preset: disabled)
Active: inactive (dead)
Triggers: * virtqemud.service
Listen: /run/libvirt/virtqemud-sock (Stream)
DEBU stderr:
DEBU virtqemud.socket is neither running nor listening
DEBU Running 'systemctl status libvirtd.socket'
DEBU libvirtd.socket is running
I believe this got fixed in the upstream. Please make sure you are running a fully updated Fedora installation.
/cc: @cfergeau
I updates everything, it looks like latest release to me, am I wrong?
$ sudo dnf upgrade
Last metadata expiration check: 0:15:37 ago on Mon 30 Oct 2023 09:26:58 PM PDT.
Dependencies resolved.
Nothing to do.
Complete!
[eskimo@localhost ~]$ dnf check-update
Copr repo for PyCharm owned by phracek 86 kB/s | 45 kB 00:00
Docker CE Stable - x86_64 61 kB/s | 15 kB 00:00
Fedora 38 - x86_64 19 MB/s | 83 MB 00:04
Fedora 38 openh264 (From Cisco) - x86_64 2.4 kB/s | 2.5 kB 00:01
Fedora Modular 38 - x86_64 1.5 MB/s | 2.8 MB 00:01
Fedora 38 - x86_64 - Updates 13 MB/s | 34 MB 00:02
Fedora Modular 38 - x86_64 - Updates 1.5 MB/s | 2.1 MB 00:01
google-chrome 14 kB/s | 3.6 kB 00:00
RPM Fusion for Fedora 38 - Free 1.4 MB/s | 693 kB 00:00
RPM Fusion for Fedora 38 - Free - Updates 418 kB/s | 319 kB 00:00
RPM Fusion for Fedora 38 - Nonfree - NVIDIA Driver 22 kB/s | 14 kB 00:00
RPM Fusion for Fedora 38 - Nonfree - Steam 2.0 kB/s | 2.2 kB 00:01
slack 8.4 kB/s | 6.4 kB 00:00
[eskimo@localhost ~]$ dnf updateinfo list
Last metadata expiration check: 0:00:17 ago on Mon 30 Oct 2023 09:47:41 PM PDT.
[eskimo@localhost ~]$ dnf upgrade
Error: This command has to be run with superuser privileges (under the root user on most systems).
[eskimo@localhost ~]$ sudo dnf upgrade
[sudo] password for eskimo:
Last metadata expiration check: 0:21:37 ago on Mon 30 Oct 2023 09:26:58 PM PDT.
Dependencies resolved.
Nothing to do.
Complete!
[eskimo@localhost ~]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 38 (Thirty Eight)
Release: 38
Codename: ThirtyEight
[eskimo@localhost ~]$
The overall preflight check is not failing, below is just failure of virtqemud
socket activation which might not be active by default. https://libvirt.org/daemons.html#modular-driver-daemons check the all modular daemon/socket. I am hoping that after crc setup --check-only
you have exit code 0
.
INFO Checking if active user/process is currently part of the libvirt group
INFO Checking if libvirt daemon is running
DEBU Checking if libvirtd service is running
DEBU Running 'systemctl status virtqemud.socket'
DEBU Command failed: exit status 3
DEBU stdout: * virtqemud.socket - Libvirt qemu local socket
Loaded: loaded (/usr/lib/systemd/system/virtqemud.socket; disabled; preset: disabled)
Active: inactive (dead)
Triggers: * virtqemud.service
Listen: /run/libvirt/virtqemud-sock (Stream)
DEBU stderr:
DEBU virtqemud.socket is neither running nor listening
DEBU Running 'systemctl status libvirtd.socket'
DEBU libvirtd.socket is running
INFO Checking if a supported libvirt version is installed
I have exit code 2 when crc instance is not running and 0 when it is running.
In recent version of Fedora this uses socket activation, which might explain the initial error, but when it is running it shows 0. Our preflight is wrong in that case...
An error occurred during the checks, which is reported and the exit code is set to 2.
The problem is the error reporting/logging, as the error is crc-daemon.service is running
.
If you run without --check-only
, the next message will be DEBU Stopping crc-daemon.service
https://github.com/crc-org/crc/blob/9e31bb05f123b44904afd11a1033f3a1ea65e614/pkg/crc/preflight/preflight_checks_linux.go#L357-L362 or https://github.com/crc-org/crc/blob/9e31bb05f123b44904afd11a1033f3a1ea65e614/pkg/crc/preflight/preflight_checks_linux.go#L334-L336 can be reworked to make the error explicit.
We have this preflight check to ensure the daemon is restarted on upgrades.
Steps to reproduce
run crc setup run crc setup --check-only run echo $?
I can't reproduce with these steps on linux with 2.29.0, an intermediate step is missing I believe:
$ crc setup
# do something which will start the daemon, can be `crc start`, or just `curl --unix-socket ~/.crc/crc-http.sock http://local/api/version`
$ crc setup --check-only
$ echo $?
Can you describe your high level usecase/requirement for --check-only
? It's useful to have it in mind while we work on crc.
We need a consistent way to check that setup was executed and crc is ready to be started with 'crc start'. Right now 'crc setup' returns error code, but I still can do crc start without issues. So --check-only option gives false result in my case.
General information
CRC version
CRC status
CRC config
N/A
Steps to reproduce
crc setup
crc setup --check-only
echo $?
Expected
step 3 prints 0
Actual
step 3 prints 2 on linux
Logs