CIAB: Fixed the method of obtaining IP#3281
Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
this won't fix the problem of trafficvault not being available for trafficops use -- it does not enforce startup order, only build dependencies.
That conflicts with one of the goals we had: ability to build and test trafficops in isolation.
There was a problem hiding this comment.
Sorry that I didn't know it need the ability to build and test trafficops in isolation
I can remove it to meet this requirement.
But on the other hand, It does guarantee startup order of container.
Do you mean that this is not enough?
Should I add more steps in set-to-ips-from-dns.sh to guarantee that trafficvault registered its DNS record before set-to-ips-from-dns.sh add trafficvault IP to trafficcontrol/infrastructure/cdn-in-a-box/traffic_ops_data/servers/040-trafficvault_server.json?
There was a problem hiding this comment.
adding TV as a dependency of TO guarantees that it will be started before TO, but that doesn't guarantee it will be done starting by the time TO needs it. "starting" the container is an instantaneous action that spins off the container's CMD as an asynchronous procedure. Ordering within that cannot be guaranteed. I think your idea about using the enroller could work, if I understand you right.
There was a problem hiding this comment.
@ocket8888 You are right. that what I want to say.
@dangogh Since it need more work, I'll remove this line first and then send it in another PR.
There was a problem hiding this comment.
Please refer to #3287 for this dependency problem
The sequence of setting DNS record is shown as follows:
1. Set /etc/resolv.conf (infrastructure/cdn-in-a-box/dns/set-dns.sh)
2. Obtaining IP by "dig +short ${my_host}" (infrastructure/cdn-in-a-box/dns/insert-self-into-dns.sh)
3. Set DNS record (infrastructure/cdn-in-a-box/dns/insert-self-into-dns.sh)
It can not obtain IP after the /etc/resolv.conf changed.
This commit provide one way to fix it by changing the method of obtaining IP.
It uses parsing the ifconfig result instead of dig.
This commit also deletes insert-db-into-dns.sh.
DB should use insert-self-into-dns.sh instead of insert-db-into-dns.sh as well.
9ac7967 to
e9a31e8
Compare
|
ok to test |
|
Refer to this link for build results (access rights to CI server needed): |
|
Hi @Shihta, Thanks for submitting this PR: I tested this PR and it appears some of the servers are still being added with the wrong subnet: Problems I found:
My suggestion is to delete all the files at Wait for CiaB to fully start up and then get servers list from Traffic Ops API: |
|
@JBevillC thanks for helping me review it! The 2 problems you found are not caused by this commit. In fact, I have sent a PR #3264 trying to solve these 2 problems. Should we just fix them by the PR #3264? It seems like the option 2 is better than 1. Back to this PR
as you can see, it shows forward host lookup failed: Unknown host
as you can see, there is no ip addr That why I sent this PR |
|
@Shihta Thanks for the follow up. I'm going to re-test PRs #3264 and #3281 together (merged) against the latest master branch. Testing them both together seems like a better approach since they are highly related to the same area of CiaB DNS IP discovery and assignment. Thanks again for your contribution. |
rob05c
left a comment
There was a problem hiding this comment.
Looks great, thanks!
Tested, CiaB comes up as expected, requesting the CiaB DS works as expected.
What does this PR do?
The sequence of setting DNS record is shown as follows:
It can not obtain IP after the /etc/resolv.conf changed.
This commit provide one way to fix it by changing the method of obtaining IP.
It uses parsing the ifconfig result instead of dig.
This commit also deletes insert-db-into-dns.sh.
DB should use insert-self-into-dns.sh instead of insert-db-into-dns.sh as well.
Beyond that, add trafficvault into the trafficops-perl dependency.
That could avoid the failure of obtaining trafficvault IP when trafficops-perl run set-to-ips-from-dns.sh.
Fixes #(issue_number)
Which TC components are affected by this PR?
What is the best way to verify this PR?
This is a bug fix, so just simply start CIAB and then check if
http://video.demo1.mycdn.siab.testis available.Check all that apply