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

Colima 0.6.4+: Start fails with "dependency problems - leaving unconfigured" (workaround colima prune) #888

Closed
1 of 5 tasks
rpkoller opened this issue Nov 18, 2023 · 13 comments

Comments

@rpkoller
Copy link

rpkoller commented Nov 18, 2023

Description

Work around until this issue is fixed: run colima prune before the first start

I've upgraded to 0.6.4. when i'Ve started i'Ve noticed that all the images are downloaded again. then i thought hey if i start fresh why dont i directly create a new profile with 0.6.4 (that brought in a few changes with docker ce and alike as far as i understood) before i pull over potential problems with the old vm. so i stopped the download, then colima stopthen colima delete removing the current profile and then i tried to create a new profile with 0.6.4 and got the following:

$> colima start --cpu 4 --memory 8 --disk 100 --vm-type=vz --mount-type=virtiofs --dns=1.1.1.1
INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0001] creating and starting ...                     context=vm
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  dnsutils
>  htop
>  iptables
>  vim
>  vim : Depends: vim-common (= 2:9.0.1672-1ubuntu2.1) but it is not going to be installed
>        Depends: vim-runtime (= 2:9.0.1672-1ubuntu2.1) but it is not going to be installed
>        Depends: libgpm2 (>= 1.20.7) but it is not going to be installed
>        Depends: libpython3.11 (>= 3.11.5) but it is not going to be installed
>        Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
> E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
FATA[0047] error starting vm: error at 'creating and starting': error at 'starting': error installing packages using mantic-debs: exit status 100 

Version

$> colima version && limactl --version && qemu-img --version
colima version 0.6.4
git commit: 0f4b7f694514d1bb6b4ae0e33f2d56deb0e7b1b5
limactl version 0.18.0
qemu-img version 8.1.2
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

$> colima status
FATA[0000] error retrieving current runtime: empty value 

Reproduction Steps

  1. upgrade to 0.6.4
  2. have no old colima profiles anymore
  3. create a new default profile in 0.6.4 with colima start --cpu 4 --memory 8 --disk 100 --vm-type=vz --mount-type=virtiofs --dns=1.1.1.1

Expected behaviour

I would expect that the vm gets properly created on the first start

Additional context

when i tried to delete the profile i gotthe following now:

$> colima delete                                                                              
are you sure you want to delete colima and all settings? [y/N] y
INFO[0001] deleting colima                              
WARN[0002] error retrieving runtimes: error retrieving current runtime: empty value 
INFO[0002] done
@rfay
Copy link
Contributor

rfay commented Nov 18, 2023

I get the same result creating a new profile with colima start tester --cpu 4 --memory 8 --disk 100 --vm-type=vz --mount-type=virtiofs --dns=1.1.1.1

A colima restart with existing profile worked OK though.

I get the same failure with just colima start junker99 to create a new profile. It doesn't require any extra arguments.

@rpkoller
Copy link
Author

rpkoller commented Nov 18, 2023

I'Ve also tried now with qemu in the hopes it might be due to some problems with vz but for quemu the same result:

$> colima start --cpu 4 --memory 8 --disk 20 --vm-type=qemu --mount-type=sshfs --dns=1.1.1.1
INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0000] preparing network ...                         context=vm
INFO[0001] creating and starting ...                     context=vm
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  dnsutils
>  htop
>  iptables
>  vim
>  vim : Depends: vim-common (= 2:9.0.1672-1ubuntu2.1) but it is not going to be installed
>        Depends: vim-runtime (= 2:9.0.1672-1ubuntu2.1) but it is not going to be installed
>        Depends: libgpm2 (>= 1.20.7) but it is not going to be installed
>        Depends: libpython3.11 (>= 3.11.5) but it is not going to be installed
>        Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
> E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
FATA[0039] error starting vm: error at 'creating and starting': error at 'starting': error installing packages using mantic-debs: exit status 100 

@singlemancombat
Copy link

I'm having the same issue on M1 macbook

@stask
Copy link

stask commented Nov 19, 2023

similar issue on Intel macbook with following command: colima start --cpu 8 --disk 200 --memory 32 --vm-type vz --mount-type virtiofs

@abiosoft
Copy link
Owner

Thanks for reporting, looking into it.

In the meantime, does running colima prune before restarting resolve it?

@Noksa
Copy link

Noksa commented Nov 19, 2023

@abiosoft Looks like it doesn't fix it:

❯ colima prune
'/Users/alexandr/Library/Caches/colima' will be emptied, are you sure? [y/N] y
INFO[0001] Pruning "/Users/alexandr/Library/Caches/colima"

     ~ ·········································································································································································································
❯ colima restart
INFO[0000] stopping colima
WARN[0000] error retrieving runtimes: error retrieving current runtime: empty value
INFO[0000] stopping ...                                  context=vm
INFO[0001] done
INFO[0004] starting colima
INFO[0004] runtime: docker
INFO[0004] preparing network ...                         context=vm
INFO[0004] starting ...                                  context=vm
WARN[0017] preinstall check failed for docker-ce: error running [lima sh -c sudo apt purge -y docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc], output: "", err: "exit status 100"  context=vm
>   Package iptables is not configured yet.
>
> dpkg: error processing package docker-ce (--install):
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  docker-ce
WARN[0041] error installing packages using docker-ce: exit status 1  context=vm
WARN[0041] falling back to normal package install        context=vm
>
> You may press Ctrl+C now to abort this script.
> + sleep 20
> + sh -c apt-get update -qq >/dev/null
> + sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null
> E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
FATA[0063] error starting vm: error at 'starting': error installing packages using docker-ce: exit status 100

@stask
Copy link

stask commented Nov 19, 2023

doing colima delete && colima prune before running colima start --cpu 8 --disk 200 --memory 32 --vm-type vz --mount-type virtiofs helped

@rpkoller
Copy link
Author

Thanks for reporting, looking into it.

In the meantime, does running colima prune before restarting resolve it?

colima prune fixed it for now. but i made a few observations.

  • I have setup brew services start colima since colima 0.6.0 . That way because i've deleted the failing partially created profile outlined in the issue summary this morning before i went to bed on restart a new profile was created with the defaults values since no profile was available. I think there should be a follow up, and not sure if it is possible, but to check if colima is started during the automated login process and if that is the case prevent the creation of a profile if there are no profiles available. or may be alter the approach that colima start is only responsible for the start and that in case you try to start without profile you have to run another command first? there are several approaches? because after the restart it looked like the following
$> colima list 
PROFILE    STATUS     ARCH       CPUS    MEMORY    DISK     RUNTIME    ADDRESS
default    Stopped    aarch64    2       2GiB      60GiB       
  • i am not sure if i was not really awake yet, but due to the fact that i had auto started colima i tried a colima delete. but it hasnt properly worked. it looks like i had to first run colima stop and then colima delete. solely colima delete seemed not enough and caused problems. but as i said not sure because i was still half sleeping after waking up.

  • and one detail after the stop, prune and start with colima start --cpu 4 --memory 8 --disk 100 --vm-type=vz --mount-type=virtiofs --dns=1.1.1.1i got this:

colimastart.mp4

i wasnt fast enough the process was already running for a few seconds and several lines were already cleared. also i havent had enough time to adjust the recording area properly was quickly done to catch and record anything at all. but that way already 5 to 10 lines were cleared as the process was going upwards. probably also require a follow up?

@rfay
Copy link
Contributor

rfay commented Nov 19, 2023

colima prune got me going. Now running DDEV tests with this release in ddev/ddev#5549, test in https://github.com/ddev/ddev/actions/runs/6921161585/job/18826439165?pr=5549

@abiosoft
Copy link
Owner

i wasnt fast enough the process was already running for a few seconds and several lines were already cleared. also i havent had enough time to adjust the recording area properly was quickly done to catch and record anything at all. but that way already 5 to 10 lines were cleared as the process was going upwards. probably also require a follow up?

The line being cleared wrongly was addressed in v0.6.5. It was a bug in v0.6.4.

@lexsoft00
Copy link

I've had same issue and doing a colima delete && colima prune helped.

─  colima delete && colima prune                                                                                                           ─╯
are you sure you want to delete colima and all settings? [y/N] y
INFO[0001] deleting colima
WARN[0001] error retrieving runtimes: error retrieving current runtime: empty value
INFO[0001] done
'/Users/MyUserExample/Library/Caches/colima' will be emptied, are you sure? [y/N] y
INFO[0001] Pruning "/Users/MyUserExample/Library/Caches/colima"
──────────────────────────────────────────────────────
╰─ colima start --cpu 6 --memory 12 --disk 100 --vm-type=qemu --mount-type=sshfs --dns=1.1.1.1                                              ─╯
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0001] creating and starting ...                     context=vm
INFO[0058] provisioning ...                              context=docker
INFO[0058] starting ...                                  context=docker
INFO[0058] done


@rpkoller rpkoller changed the title Error on the first start initializing a new profile with 0.6.4 Colima 0.6.4+: Start fails with "dependency problems - leaving unconfigured", fixed with colima prune Nov 24, 2023
@rpkoller rpkoller changed the title Colima 0.6.4+: Start fails with "dependency problems - leaving unconfigured", fixed with colima prune Colima 0.6.4+: Start fails with "dependency problems - leaving unconfigured", worked around with colima prune Nov 24, 2023
@rpkoller rpkoller changed the title Colima 0.6.4+: Start fails with "dependency problems - leaving unconfigured", worked around with colima prune Colima 0.6.4+: Start fails with "dependency problems - leaving unconfigured" (workaround colima prune) Nov 24, 2023
@AndreasA
Copy link

However, needing delete/prune from 0.6.1 to 0.6.6 or similar is still a bit annoying but I think now that the switch to docker-ce with 0.6.4 is done, it should not re-occur.

@abiosoft
Copy link
Owner

This should be fixed in v0.6.7.

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

8 participants