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

hostname does not match /etc/hosts #4204

Closed
lguohan opened this issue Feb 28, 2020 · 1 comment
Closed

hostname does not match /etc/hosts #4204

lguohan opened this issue Feb 28, 2020 · 1 comment

Comments

@lguohan
Copy link
Collaborator

lguohan commented Feb 28, 2020

Description

After merging PR 1ef7403, there are lots of vsimage test failures.

https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image-pr/2685/console
https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image-pr/2686/
https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image-pr/2687/console

TASK [saved original minigraph file in SONiC DUT(ignore errors when file doesnot exist)] ***
Friday 28 February 2020  04:13:41 +0000 (0:00:00.057)       0:00:16.348 ******* 
fatal: [vlab-01]: FAILED! => {"msg": "Timeout (12s) waiting for privilege escalation prompt: "}
...ignoring

TASK [create new minigraph file for SONiC device] ******************************
Friday 28 February 2020  04:13:53 +0000 (0:00:12.267)       0:00:28.615 ******* 
fatal: [vlab-01]: FAILED! => {"msg": "Timeout (12s) waiting for privilege escalation prompt: "}

It looks like the root cause the hostname is not changed, but /etc/hosts is changed.

root@sonic:/home/admin# cat /etc/hosts
127.0.0.1       localhost
127.0.0.1 vlab-01
root@sonic:/home/admin# cat /etc/hostname
sonic

I think this is related to your PR because I suspect this PR trigger some race condition that cause the hostname to be set back to sonic. As there is possibility to change the host OS hostname inside the container now.

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@lguohan
Copy link
Collaborator Author

lguohan commented Apr 2, 2020

resolved by #4206

@lguohan lguohan closed this as completed Apr 2, 2020
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

No branches or pull requests

1 participant