Describe the bug
Looks like the dns resolver used by github-actions is unable to look up certain addresses - googling looks like this is caused by srv type addresses.
Attempting to run mongodump with a command such as: mongodump --uri "mongodb+srv://user:[email protected]/dbname"
results in:
2020-07-09T10:21:18.498+0000 error parsing command line options: error parsing uri: lookup mydb-prod-8aaaa.gcp.mongodb.net on 127.0.0.53:53: cannot unmarshal DNS message
2020-07-09T10:21:18.498+0000 try 'mongodump --help' for more information
Area for Triage:
Question, Bug, or Feature?:
Bug
Virtual environments affected
Expected behavior
I would expect the address to be resolved as it is locally / on CircleCI from where I am migrating the job
Actual behavior
A description with steps to reproduce the issue. If your have a public example or repo to share,
please provide the link.
Hello, @antony
Could you please check output?
dig SRV _mongodb._tcp.mydb-prod-8aaaa.gcp.mongodb.net
Should be looks like:
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> SRV _mongodb._tcp.cluster0-jdtjt.mongodb.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54532
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 13, ADDITIONAL: 13
;; QUESTION SECTION:
;_mongodb._tcp.cluster0-jdtjt.mongodb.net. IN SRV
;; ANSWER SECTION:
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-02-jdtjt.mongodb.net.
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-00-jdtjt.mongodb.net.
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-01-jdtjt.mongodb.net.
Update pipeline to use external resolver the first step:
- name: Set dns
run: |
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
This bug is not related to an image - https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1886128.
Feel free to open the thread if you have any concerns.
Most helpful comment
Hello, @antony
Could you please check output?
dig SRV _mongodb._tcp.mydb-prod-8aaaa.gcp.mongodb.netShould be looks like:
Update pipeline to use external resolver the first step: