crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.25k stars 236 forks source link

[BUG] Doesn't work when first name server is IPv6 #1426

Closed f-w closed 3 years ago

f-w commented 4 years ago

General information

CRC version

# Put `crc version` output here
$ crc version
CodeReady Containers version: 1.13.0+8070bae
OpenShift version: 4.5.1 (embedded in binary)

CRC status

# Put `crc status --log-level debug` output here
$ crc status --log-level debug
DEBU CodeReady Containers version: 1.13.0+8070bae
DEBU OpenShift version: 4.5.1 (embedded in binary)
DEBU Running 'C:\Users\x\.crc\bin\oc\oc.exe get co -ojson --kubeconfig C:\Users\x\.crc\machines\crc\kubeconfig --context admin --cluster crc'
DEBU image-registry operator is degraded, Reason: ImagePrunerJobFailed
DEBU About to run SSH command:
df -B1 --output=size,used,target /sysroot | tail -1
DEBU SSH command results: err: <nil>, output: 32720793600 12126367744 /sysroot 
CRC VM:          Running
OpenShift:       Running (v4.5.1)
Disk Usage:      12.13GB of 32.72GB (Inside the CRC VM)
Cache Usage:     14.95GB
Cache Directory: C:\Users\x\.crc\cache

CRC config

# Put `crc config view` output here
<empty>

Host Operating System

# Put the output of `cat /etc/os-release` in case of Linux
# put the output of `sw_vers` in case of Mac
# Put the output of `systeminfo` in case of Windows
$ systeminfo
Host Name:                 LAPTOP
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.18362 N/A Build 18362
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          x
Registered Organization:
Product ID:                00330-80126-65211-AA023
Original Install Date:     8/7/2019, 7:22:04 PM
System Boot Time:          7/28/2020, 4:08:53 PM
System Manufacturer:       Acer
System Model:              Aspire E5-574T
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 78 Stepping 3 GenuineIntel ~2400 Mhz
BIOS Version:              Insyde Corp. V1.03, 8/28/2015
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume2
System Locale:             zh-cn;Chinese (China)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC-08:00) Pacific Time (US & Canada)
Total Physical Memory:     16,251 MB
Available Physical Memory: 3,222 MB
Virtual Memory: Max Size:  18,683 MB
Virtual Memory: Available: 4,771 MB
Virtual Memory: In Use:    13,912 MB
Page File Location(s):     D:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\LAPTOP
Hotfix(s):                 18 Hotfix(s) Installed.
                           [01]: KB4565633
                           [02]: KB4497165
                           [03]: KB4503308
                           [04]: KB4508433
                           [05]: KB4515383
                           [06]: KB4516115
                           [07]: KB4521863
                           [08]: KB4524244
                           [09]: KB4524569
                           [10]: KB4528759
                           [11]: KB4537759
                           [12]: KB4538674
                           [13]: KB4541338
                           [14]: KB4552152
                           [15]: KB4560959
                           [16]: KB4561600
                           [17]: KB4565554
                           [18]: KB4565483
Network Card(s):           5 NIC(s) Installed.
                           [01]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (Default Switch)   
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 172.17.118.1
                                 [02]: fe80::6104:ff7f:8373:46a5
                           [02]: Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
                                 Connection Name: Ethernet 2
                                 Status:          Hardware not present
                           [03]: Realtek PCIe GbE Family Controller
                                 Connection Name: Ethernet
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.1.254
                                 IP address(es)
                                 [01]: 192.168.1.71
                                 [02]: fe80::690e:f213:eb3c:b8a6
                                 [03]: 2001:569:beb1:b600:48b0:1fbf:4d4a:5f82
                                 [04]: 2001:569:beb1:b600:690e:f213:eb3c:b8a6  
                           [04]: Qualcomm Atheros QCA9377 Wireless Network Adapter
                                 Connection Name: Wi-Fi
                                 Status:          Media disconnected
                           [05]: Bluetooth Device (Personal Area Network)      
                                 Connection Name: Bluetooth Network Connection 
                                 Status:          Media disconnected
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Steps to reproduce

After crc start and crc console

  1. login as developer
  2. In developer view, create an empty project
  3. add MongoDB from catalog (ephemeral or persistent)
  4. In administrator view, go to Workloads > Pods > mongodb-1-deploy > Events

Expected

No error

Actual

Got following reproducible errors

Error: ImagePullBackOff
Back-off pulling image "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ba1c6776795c8f5582c09b223e5a841072db04a4eabf50e37486a3b38494a6e7"
Failed to pull image "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ba1c6776795c8f5582c09b223e5a841072db04a4eabf50e37486a3b38494a6e7": rpc error: code = Unknown desc = error pinging docker registry quay.io: Get https://quay.io/v2/: dial tcp: lookup quay.io on 172.17.118.1:53: read udp 172.17.118.8:38568->172.17.118.1:53: i/o timeout

Same operations work on OpenShift Online.

Note crc start doesn't give any error on DNS query

...
INFO Check internal and public DNS query ...
INFO Check DNS query from host ...
...

Other information

C:\Users\x>nslookup
Default Server:  node-1w7jr9n24twqrzrke3a0v8lzn.ipv6.telus.net
Address:  2001:568:ff09:10a::53
>
C:\Users\x>ipconfig /all
...
   DNS Servers . . . . . . . . . . . : 2001:568:ff09:10a::53
                                       2001:568:ff09:10a::114
                                       192.168.1.254
                                       75.153.171.114
                                       2001:568:ff09:10a::53
                                       2001:568:ff09:10a::114
...
f-w commented 4 years ago

crc.log

gbraad commented 4 years ago

Make sure you are not on VPN when testing this (currently a known issue) Try to override the nameserver in the VM with -n [nameserver] on start.

f-w commented 4 years ago

Not on vpn. Set to what nameserver?

gbraad commented 4 years ago

Set to what nameserver?

I don't know how your network is configured. Something local (if router caches/forwards), your ISPs, or a public one if possible?

f-w commented 4 years ago

My network uses name server provided by my ISP. The name server resolves to only IPV6 address. I think that's the root cause. Works when I run crc start -n 8.8.8.8. If crc only supports IPV4 name server, then it should be documented as a prerequisite.

gbraad commented 4 years ago

The name server resolves to only IPV6 address. I think that's the root cause

crc is not IPv4 only, but might experience issues with IPv6 as this is not fully tested.

On Wed, Jul 29, 2020 at 10:01 PM Fred notifications@github.com wrote:

My network uses name server provided by my ISP. The name server resolves to only IPV6 address. I think that's the root cause. Works when I run crc start -n 8.8.8.8. If crc only supports IPV4 name server, then it should be documented as a prerequisite.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

--

Gerard Braad | http://gbraad.nl

STEM is the source, but BUILD is how you develop! [ Better Understanding Involves Learning and Doing ]

gbraad commented 4 years ago

@praveenkumar this is an interesting one to look at: 'when name server resolves only to IPV6'.

praveenkumar commented 4 years ago

@gbraad Agree, I think in the past also we experienced same issue.

f-w commented 4 years ago

Just to clarify, it's the first name server that is IPv6. I still have IPv4 name servers.

C:\Users\x>nslookup
Default Server:  node-1w7jr9n24twqrzrke3a0v8lzn.ipv6.telus.net
Address:  2001:568:ff09:10a::53
>
C:\Users\x>ipconfig /all
...
   DNS Servers . . . . . . . . . . . : 2001:568:ff09:10a::53
                                       2001:568:ff09:10a::114
                                       192.168.1.254
                                       75.153.171.114
                                       2001:568:ff09:10a::53
                                       2001:568:ff09:10a::114
...
praveenkumar commented 4 years ago

@gbraad should we add this as known issue.

gbraad commented 4 years ago

For now, yes... Until we have a clearer answer.

We need to run more tests with IPv6

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kowen-rh commented 3 years ago

@gbraad Does this issue apply to all platforms? Getting this documented.

kowen-rh commented 3 years ago

Just noticed that this was never closed. We have this documented as a known issue in the release notes downstream. :)