Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

  1. #1

    Default Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    Hi all,

    When VM is come back from suspend state then docker0 interface has no IPv4 address anymore.
    Before suspend VM:

    docker:~ # ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:7f:da:c0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.80.133/24 brd 192.168.80.255 scope global eth0
    valid_lft forever preferred_lft forever
    3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:a9:86:a2:d5 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
    valid_lft forever preferred_lft forever

    5: veth4081c84@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
    link/ether 66:7a:92:1b:25:b7 brd ff:ff:ff:ff:ff:ff link-netnsid 0


    Resumed suspend:

    docker:~ # ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:7f:da:c0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.80.133/24 brd 192.168.80.255 scope global eth0
    valid_lft forever preferred_lft forever
    3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:a9:86:a2:d5 brd ff:ff:ff:ff:ff:ff

    5: veth4081c84@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
    link/ether 66:7a:92:1b:25:b7 brd ff:ff:ff:ff:ff:ff link-netnsid 0

    I disabled IPv6 because I do not need it at all. With IPv6 the situation is the same. There is no IPv4 address after it came up from resumed mode. With Leap 42.3 this suspend/resume VM works fine.

    Best,
    Csaba

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,446
    Blog Entries
    2

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    First for two reasons,
    You should have posted in the Virtualization forum where both virtualization like VMware products and isolation like Docker containers are discussed, and your problem has to do with networking. There's not really any Applications Forum type content in your post. For whatever problem is posted, posting in the right place will always get you a better response, and sometimes answers can be found by searching previous posts in the correct forum.

    I'd recommend you start a new thread in the Virtualization forum and provide information likely relevant to your problem...

    Like
    Where did your container come from, is it your own creation or did you download from Docker Hub?
    How are you configuring your networking, by command parameters or in your docker file?
    Include the exact means you configure your networking

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    Hi,

    Ok, next time I'll ask these questions on the other forum. This was my first try because I did not find any solution for my problem...

    I use both local and downloaded docker containers. I defined IPv4 in /etc/sysconfig/docker file with DOCKER_OPTS="--bip=172.17.0.1/24". After resume I have to restart docker daemon but then I lose my running containers.

    My tip is that something went wrong with network package. There is not ifconfig command at all. Only "ip addr ..." exists. The same docker containers are working with Lead 42.3 and older. I build more VMs with the same config (VM and docker). Version Leap 15 and 15.1 this problem exists.

  4. #4
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    1,926

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    Quote Originally Posted by csikosc View Post
    There is not ifconfig command at all. Only "ip addr ..." exists.
    This is expected as ifconfig is deprecated. As you can see in the manual:
    https://doc.opensuse.org/documentati...a.network.html
    "The ifconfig and route tools are obsolete. Use ip instead. ifconfig, for example, limits interface names to 9 characters."
    Also for reference:
    https://lists.opensuse.org/opensuse/.../msg00802.html
    Best regards,
    Greg

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,446
    Blog Entries
    2

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    Besides ifconfig deprecated,
    I'd also question why your docker file is located in /etc/sysconfig,

    docker files should be unique to a particular instance, and usually a customized file specific only for your own use.
    On the HostOS, the /etc/sysconfig location is for HostOS configurations, not container instances... or at least unless someone can describe a logical reason to me for how this location is appropriate.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    I read in the past, when starts docker daemon (in case of OpenSUSE), its read configuration from /etc/sysconfig/docker
    https://www.suse.com/support/kb/doc/?id=7018811

  7. #7

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    I read in the past, when starts docker daemon (in case of OpenSUSE), its read configuration from /etc/sysconfig/docker
    https://www.suse.com/support/kb/doc/?id=7018811

    My problem is the docker0 interface forgot the defined IPv4 network and address when OpenSUSE come back from suspend.
    Settings from VMware player:

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,446
    Blog Entries
    2

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    Quote Originally Posted by csikosc View Post
    I read in the past, when starts docker daemon (in case of OpenSUSE), its read configuration from /etc/sysconfig/docker
    https://www.suse.com/support/kb/doc/?id=7018811

    My problem is the docker0 interface forgot the defined IPv4 network and address when OpenSUSE come back from suspend.
    Settings from VMware player:
    There is a big difference between the docker application and the individual containers which are stored in different locations...

    The location you're using is where the docker application configuration can be found,
    Each container's configuration is stored with the individual container.

    And, the recommended way that docker sets up its container networking is different than all other virtualization and isolation technologies, instead of using bridge devices, network forwarding is configured by command line, either when invoking the container or stored in the container's docker file.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    "The location you're using is where the docker application configuration can be found"

    I know that, this is what I'm talking about. The docker0 is the interface of docker application. This configured only when docker daemon is running. If this interface has no IP then you can not reach those container which are running below this docker host. This is my problem.

    As I wrote this is not docker application issue because it is working with Leap 42.3. I tried older docker version on Leap 15 but this problem also existence. So, this is absolutely OpenSuse problem.

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,446
    Blog Entries
    2

    Default Re: Docker forgot IPv4 in VMware Player 12 & 15 after resume from suspend

    Quote Originally Posted by csikosc View Post
    "The location you're using is where the docker application configuration can be found"

    I know that, this is what I'm talking about. The docker0 is the interface of docker application. This configured only when docker daemon is running. If this interface has no IP then you can not reach those container which are running below this docker host. This is my problem.

    As I wrote this is not docker application issue because it is working with Leap 42.3. I tried older docker version on Leap 15 but this problem also existence. So, this is absolutely OpenSuse problem.
    OK, I see now that you are using the "new" way to configure docker networking (everyone should prefer to do this instead of the older docker networking my older container networks still use).

    A general reference
    https://docs.docker.com/v17.09/engin...de/networking/

    AFAIK there is no way for a virtual bridge device like docker0 to go down by itself, even after a resume from hibernation (more on that in a moment). Bridge devices are associated (bound) to a physical interface, you should inspect state/status of your physical interfaces to make sure they are up. Seems to me from time to time people have posted in the Networking forum about their regular network interfaces not active when resuming from hibernation, you should look through those posts to see if any apply to you.

    As for hibernating a Guest and in this case there are likely similarities between a container and hypervisor Guests, I strongly discourage that practice. Successful hibernation depends on all processes ending properly before the HostOS can go into hibernation, and because of the "Guest"/container isolation, it's possible and in some cases likely that the HostOS can't be fully knowledgeable about the isolated processes, with uncertain results... maybe pre-mature termination resulting in corruption, maybe lost state, maybe hangs, the possibilities are endless.

    So, my strong recommendation is to either suspend or shutdown the Guest/container processes using their technologies own management before doing a HostOS hibernation.
    Who knows, maybe the very practice of resuming a container's networking before HostOS networking is available might be triggering your situation.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •