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

(maint) Docker dig names prior to running host #2940

Merged
merged 1 commit into from
May 4, 2019

Conversation

Iristyle
Copy link
Contributor

@Iristyle Iristyle commented May 4, 2019

@Iristyle Iristyle requested a review from a team as a code owner May 4, 2019 00:27
@Iristyle
Copy link
Contributor Author

Iristyle commented May 4, 2019

Interestingly, a failure occurred in Travis this time, so the hope is that this workaround removes this problem - see https://travis-ci.com/puppetlabs/pupperware/builds/110593664#L1363-L1383

2019-05-03T23:55:21.053594047Z  wtfc.sh: waiting 30 seconds for host postgres.internal
2019-05-03T23:55:51.011479403Z  Terminated
2019-05-03T23:55:51.012047345Z  wtfc.sh: timeout occurred after waiting 30 seconds for host postgres.internal to return status: 0 (was status: 143)
2019-05-03T23:55:51.023320720Z  .............................
2019-05-03T23:55:51.023346839Z  ; <<>> DiG 9.12.4-P1 <<>> postgres.internal
2019-05-03T23:55:51.023352684Z  ;; global options: +cmd
2019-05-03T23:55:51.023981084Z  ;; Got answer:
2019-05-03T23:55:51.023995755Z  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22197
2019-05-03T23:55:51.024000561Z  ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
2019-05-03T23:55:51.024004264Z  
2019-05-03T23:55:51.024007415Z  ;; QUESTION SECTION:
2019-05-03T23:55:51.024010745Z  ;postgres.internal.		IN	A
2019-05-03T23:55:51.024014327Z  
2019-05-03T23:55:51.024017537Z  ;; ANSWER SECTION:
2019-05-03T23:55:51.024021080Z  postgres.internal.	600	IN	A	172.18.0.3
2019-05-03T23:55:51.024025089Z  
2019-05-03T23:55:51.024028172Z  ;; Query time: 3 msec
2019-05-03T23:55:51.024031533Z  ;; SERVER: 127.0.0.11#53(127.0.0.11)
2019-05-03T23:55:51.024034890Z  ;; WHEN: Fri May 03 23:55:51 UTC 2019
2019-05-03T23:55:51.024038187Z  ;; MSG SIZE  rcvd: 68
2019-05-03T23:55:51.024041514Z  

@puppetlabs-jenkins
Copy link
Contributor

Test PASSed

@Iristyle Iristyle added the work in progress (...and please don't merge) label May 4, 2019
 - Unexpectedly, a Travis failure was also encountered where 30 seconds
   of running `host postgres.internal` failed, but the immediately
   subsequent call to `dig postgres.internal` succeeded.

   Running dig seems to prime a local cache, so perform a dig prior
   to host in an effort to help fix this problem, given the PDB
   container is based on Alpine

   microsoft/opengcs#303
@Iristyle Iristyle force-pushed the docker-prime-dns-cache branch from 19ff936 to 58c1789 Compare May 4, 2019 02:06
@Iristyle
Copy link
Contributor Author

Iristyle commented May 4, 2019

After a small error, looks like this is doing what I want now:

wtfc.sh: waiting 30 seconds for dig postgres && host postgres
wtfc.sh: dig postgres && host postgres finished with expected status 0 after 8 seconds

; <<>> DiG 9.12.4-P1 <<>> postgres
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58763
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;postgres.			IN	A

;; ANSWER SECTION:
postgres.		600	IN	A	172.19.11.139

;; Query time: 0 msec
;; SERVER: 172.19.0.1#53(172.19.0.1)
;; WHEN: Sat May 04 02:17:50 UTC 2019
;; MSG SIZE  rcvd: 50

@Iristyle Iristyle removed the work in progress (...and please don't merge) label May 4, 2019
@Iristyle Iristyle merged commit b85a71f into puppetlabs:master May 4, 2019
@Iristyle Iristyle deleted the docker-prime-dns-cache branch May 4, 2019 02:45
@puppetlabs-jenkins
Copy link
Contributor

Test PASSed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants