Closed noelmcloughlin closed 5 years ago
Can you try to check the dns settings on the minion ? resolv.conf
in specfic
I think your hunch is good - feels like name resolution issue.
The vagrant Centos:7
image has this-
[vagrant@localhost ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
search home
nameserver 10.0.2.3
nameserver 192.168.1.1
Then resolver-formula
updates to this-
[vagrant@localhost ~]$ cat /etc/resolv.conf
# THIS FILE IS MANAGED BY SALTSTACK
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
domain example.com
nameserver 8.8.8.8
nameserver 64.6.64.6
options attempts:5 rotate timeout:1
[vagrant@localhost ~]$ ping mirrorlist.centos.org
PING mirrorlist.centos.org (85.236.43.108) 56(84) bytes of data.
64 bytes from 108-43-236-85.rev.customer-net.de (85.236.43.108): icmp_seq=1 ttl=63 time=67.6 ms
Maybe I need to add 192.168.1.1
(home router) as name server too?
[vagrant@localhost ~]$ nslookup mirrorlist.centos.org
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: mirrorlist.centos.org
Address: 212.69.166.138
Name: mirrorlist.centos.org
Address: 216.176.179.218
Name: mirrorlist.centos.org
Address: 67.219.148.138
Name: mirrorlist.centos.org
Address: 85.236.43.108
[vagrant@localhost ~]$ dig mirrorlist.centos.org
; <<>> DiG 9.9.4-RedHat-9.9.4-73.el7_6 <<>> mirrorlist.centos.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42174
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;mirrorlist.centos.org. IN A
;; ANSWER SECTION:
mirrorlist.centos.org. 55 IN A 216.176.179.218
mirrorlist.centos.org. 55 IN A 67.219.148.138
mirrorlist.centos.org. 55 IN A 85.236.43.108
mirrorlist.centos.org. 55 IN A 212.69.166.138
;; Query time: 78 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Feb 17 11:34:28 MST 2019
;; MSG SIZE rcvd: 114
Hmm works if I do this manually.
[vagrant@localhost ~]$ curl 'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container'
http://ftp.heanet.ie/pub/centos/7.6.1810/os/x86_64/
http://mirror.strencom.net/centos/7.6.1810/os/x86_64/
http://mirror.bytemark.co.uk/centos/7.6.1810/os/x86_64/
http://mirrors.melbourne.co.uk/sites/ftp.centos.org/centos/7.6.1810/os/x86_64/
http://mirror.sax.uk.as61049.net/centos/7.6.1810/os/x86_64/
http://mirror.mhd.uk.as44574.net/mirror.centos.org/7.6.1810/os/x86_64/
http://mozart.ee.ic.ac.uk/CentOS/7.6.1810/os/x86_64/
http://mirror.econdc.com/centos/7.6.1810/os/x86_64/
http://www.mirrorservice.org/sites/mirror.centos.org/7.6.1810/os/x86_64/
http://mirrors.ukfast.co.uk/sites/ftp.centos.org/7.6.1810/os/x86_64/
What about from within the container ? check the following issue from docker's repo. I would suggest you to create a docker container then ensure that the issue is exist and try to fix it or just try the suggested solution in that thread
Hi @mostafahussein thanks for suggestions. I connected to a few docker containers and name resolution worked. Timeout is not set in yum repos - default to 30seconds.
Anyway I found a solution: I added following stanza to blockbox docker-compose.yml.
services:
dns:
- 8.8.8.8
- 192.168.1.1
Now the docker compose is working.
+ yum install -y --setopt=skip_missing_names_on_install=False git patch redhat-lsb-core sudo python python-virtualenv
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: ftp.heanet.ie
* extras: ftp.heanet.ie
* updates: mozart.ee.ic.ac.uk
I'm wondering if blockbox compose file should have this by default?
If this solves the issue for you then you might go with the solution where you modify DOCKER_OPTS
and restart the daemon. By default docker-compose does not contain the dns settings and you don't need it unless there is a specific dns server you want to resolve from it or you have similar issues.
I raised blockbox issue. I'll try your suggestion - maybe I can pass DOCKER_OPTS into the make blockbox
environment.
In this case I will close this issue, if you have any other questions you can update the thread!
Updated investigation.
--dns
as build argumentsSolution is daemon.json
file
[root@localhost vagrant]# cat /etc/docker/daemon.json
{
"dns": ["8.8.8.8", "8.8.4.4"],
"dns-search": ["example.com"]
}
[root@localhost vagrant]# systemctl restart docker
I add commit to PR #73 to fix the formula.
Testing shows positive results (command takes long time) but error has gone away.
root 17907 0.0 0.6 420416 45144 pts/0 Sl+ 17:04 0:00 docker build https://git.openstack.org/openstack/loci.git --build-arg PROJECT=cinder --build-arg FROM=centos:7 --build-arg PROJECT_REF=master --build-arg PROFILES=lvm --tag lvm-debian-cinder:latest
root 18035 0.0 0.0 10720 5668 ? Sl 17:04 0:00 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/d52fec3b77d38231f500828950804c9303eb62cec6e36a8e79837c4d6eaf5062 -address /run/containerd/containerd.sock -containerd-binary /usr/bin/containerd -runtime-root /var/run/docker/runtime-runc
root 18052 0.0 0.0 11684 1512 ? Ss 17:04 0:00 /bin/bash /opt/loci/scripts/install.sh
root 18854 0.0 0.0 11684 1396 ? S 17:09 0:00 /bin/bash /opt/loci/scripts/clone_project.sh
root 18855 0.0 0.1 19380 7920 ? S 17:09 0:00 git clone https://git.openstack.org/openstack/cinder /tmp/cinder
root 18856 2.3 0.2 182316 17668 ? S 17:09 0:01 git-remote-https origin https://git.openstack.org/openstack/cinder
root 18922 0.5 0.2 34152 14228 ? Sl 17:09 0:00 git fetch-pack --stateless-rpc --stdin --lock-pack --thin --no-progress https://git.openstack.org/openstack/cinder/
root 18928 1.7 0.1 30184 7780 ? S 17:09 0:00 git index-pack --stdin --fix-thin --keep=fetch-pack 443 on d52fec3b77d3 --pack_header=2,180703
Summary - Problem is resolved by /etc/docker/daemon.json.
Complete!
?[91m+ yum clean all
?[0mLoaded plugins: fastestmirror, ovl
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors
?[91m+ rm /var/lib/openstack/lib/python2.7/no-global-site-packages.txt
?[0m?[91m+ rm -rf /tmp/cinder /tmp/ks-script-h2MyUP /tmp/wheels /tmp/wheels.tar.gz /tmp/yum.log /root/.cache /etc/machine-id
?[0m?[91m+ find /usr/ /var/ '(' -name '*.pyc' -o -name __pycache__ ')' -delete
?[0mRemoving intermediate container d52fec3b77d3
---> b989ce5b1c62
Successfully built b989ce5b1c62
Successfully tagged lvm-debian-cinder:latest
Closed by #73
Make blockbox fails. My internet connection is okay; name resolution works?