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

Clear /etc/resolv.conf before building image #12592

Merged
merged 5 commits into from
Nov 10, 2022
Merged

Clear /etc/resolv.conf before building image #12592

merged 5 commits into from
Nov 10, 2022

Conversation

devpatha
Copy link
Contributor

@devpatha devpatha commented Nov 3, 2022

Why I did it

nameserver and domain entries from build system fsroot gets into sonic image.

How I did it

Clear /etc/resolv.conf before building image

How to verify it

Built image with it and verified with install that /etc/resolv.conf is empty

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

devpatha and others added 4 commits September 13, 2022 15:25
If config_db.json is missing hostname entry, hostname-config.sh ends
up deleting existing entry too and hostname changes to default 'localhost'
build_debian.sh Outdated Show resolved Hide resolved
@devpatha devpatha requested review from Blueve and removed request for lguohan November 8, 2022 15:30
@Blueve Blueve requested review from yxieca and qiluo-msft November 8, 2022 16:58
@saiarcot895
Copy link
Contributor

Do we currently have a way of configuring the DNS settings through minigraph or CLI?

Also, there are test cases in sonic-mgmt that assume that DNS is properly configured and available. That will need updating.

@yxieca
Copy link
Contributor

yxieca commented Nov 10, 2022

Why I did it
nameserver and domain entries from build system fsroot gets into sonic image.

How I did it
Clear /etc/resolv.conf before building image

How to verify it
Built image with it and verified with install that /etc/resolv.conf is empty

@yxieca yxieca merged commit 0ea4f4d into sonic-net:master Nov 10, 2022
yxieca pushed a commit that referenced this pull request Nov 10, 2022
Why I did it
nameserver and domain entries from build system fsroot gets into sonic image.

How I did it
Clear /etc/resolv.conf before building image

How to verify it
Built image with it and verified with install that /etc/resolv.conf is empty
@qiluo-msft
Copy link
Collaborator

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

@devpatha
Copy link
Contributor Author

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

I created #12686 for 202012.

@kevinskwang
Copy link
Contributor

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

I created #12686 for 202012.

Merged

@yejianquan yejianquan added the Request for 202111 Branch For PRs being requested for 202111 branch label May 17, 2023
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request May 17, 2023
Why I did it
nameserver and domain entries from build system fsroot gets into sonic image.

How I did it
Clear /etc/resolv.conf before building image

How to verify it
Built image with it and verified with install that /etc/resolv.conf is empty
lguohan pushed a commit that referenced this pull request May 18, 2023
Cherry pick PR#12592

Why I did it
nameserver and domain entries from build system fsroot gets into sonic image.

How I did it
Clear /etc/resolv.conf before building image

How to verify it
Built image with it and verified with install that /etc/resolv.conf is empty

Co-authored-by: Devesh Pathak <54966909+devpatha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants