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

hi,I found a problem, after install multipass, apt updaate in the docker container, dns resolution will be wrong #1435

Closed
jicvi opened this issue Mar 18, 2020 · 16 comments

Comments

@jicvi
Copy link

jicvi commented Mar 18, 2020

$ apt updaate
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease Could not resolve 'archive.ubuntu.com'

@Saviq
Copy link
Collaborator

Saviq commented Mar 18, 2020

Hi @jclivi can you please be a bit more clear about what you're trying to do?

Can you just post the commands you ran before apt update?

Multipass has no relation to docker, nor does it deal in containers…

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

@Saviq
Before I installed multipass, there was no error when running apt update in the docker container. After I installed multipass, I run apt update in the docker container. The prompt: Err: 1 http://archive.ubuntu.com/ubuntu bionic InRelease Could not resolve ' archive.ubuntu.com '

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

$ sudo apt install -y snapd core
$ sudo snap install core
$ sudo snap install multipass --classic
$ multipass launch -c 2 -m 2G -d 20G -n ubuntu
$ multipass mount /home/jclivi/data ubuntu:/home/ubuntu/data

@Saviq
Copy link
Collaborator

Saviq commented Mar 18, 2020

@jclivi this is still on Deepin Linux? With the default qemu driver of Multipass? And you run Docker next to it?

Both Multipass and Docker use separate (but similar) network stacks. They should not be influencing one another.

I'm sorry, but it's still unclear to me what "docker container" are you referencing.

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

“container” ubuntu 18.04

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

yes, Deepin Linux

@Saviq
Copy link
Collaborator

Saviq commented Mar 18, 2020

@jclivi where is the docker container you're referencing? Do you actually mean a Multipass instance? And there is no Docker (it's a completely different technology) in play here?

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

@Saviq
docker and Multipass installed in deepin

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

After apt update, I couldn't find the reason. I reinstalled the system. I encountered it twice in the same situation, but still couldn't find a solution.

@Saviq
Copy link
Collaborator

Saviq commented Mar 18, 2020

OK so let me try and summarize:

  • you had Docker installed
  • and a "Ubuntu 18.04" Docker container (can you please say how exactly you created it?)
  • you installed Multipass
  • DNS stopped working inside the Docker container
  • Multipass continues to work fine?

Did you try removing Multipass to see if that fixes it? Are new Docker containers affected as well?

Please post the commands you used to install Docker and create the container so we can try and reproduce locally.

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

@Saviq
“deepin linux”
"install docker"
$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/containerd.io_1.2.2-3_amd64.deb
$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce-cli_18.09.2~3-0~ubuntu-bionic_amd64.deb
$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_18.09.2~3-0~ubuntu-bionic_amd64.deb
$ dpkg -i *.deb
$ sudo usermod -aG docker ${USER}

"docker container"
$ docker pull ubuntu
$ docker run --name=ubuntu18 -it ubuntu:latest /bin/bash
$ apt update

is, ok

“deepin linux”
"install multipass"
$ sudo apt install -y snapd core
$ sudo snap install core
$ sudo snap install multipass --classic
$ multipass launch -c 2 -m 2G -d 20G -n ubuntu
$ multipass mount /home/jclivi/data ubuntu:/home/ubuntu/data
$ reboot

$ docker exec -it ubuntu18 /bin/bash
$ apt update

is, error

@Saviq
Copy link
Collaborator

Saviq commented Mar 18, 2020

Thanks @jclivi we'll try and repro this.

@jicvi
Copy link
Author

jicvi commented Mar 18, 2020

$ docker exec -it be805af58e79 /bin/bash
root@be805af58e79:/# uname -a
Linux be805af58e79 4.15.0-30deepin-generic #31 SMP Fri Nov 30 04:29:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

@julius-ziegler
Copy link

We have an issue that seems clearly related, and reproduction is even more fundamental (no name resolution involved, can't ping an ip address):

sudo docker run -it --rm alpine /bin/sh
/ # ping 1.1.1.1

works fine.

then on host system:
sudo snap install multipass

After that, the ping in the docker container stops working.

This error seems to have popped up relatively recently (ca. last week). We observed it first in a more complicated environment, where docker is used to run some CI, and multipass is run by snapcraft, but what I showed here is the minimal setup to reproduce it.

@Saviq
Copy link
Collaborator

Saviq commented Oct 27, 2021

This is solved now through #2183

@Saviq
Copy link
Collaborator

Saviq commented Oct 27, 2021

Duplicate of #2183

@Saviq Saviq marked this as a duplicate of #2183 Oct 27, 2021
@Saviq Saviq closed this as completed Oct 27, 2021
@Saviq Saviq added duplicate and removed question labels Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants