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

Add DHCP hook to set static hostname after getting from DHCP #230

Closed
wants to merge 1 commit into from

Conversation

taoyl-ms
Copy link
Contributor

@taoyl-ms taoyl-ms commented Feb 1, 2017

No description provided.

@lguohan
Copy link
Collaborator

lguohan commented Feb 1, 2017

does this work? can you test it?

@lguohan
Copy link
Collaborator

lguohan commented Feb 1, 2017

this make make the hostname into /etc/hostname, but who change the hostname in memory?

@@ -239,7 +239,8 @@ allow-hotplug eth0
iface eth0 inet dhcp
EOF

sudo cp files/dhcp/rfc3442-classless-routes $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d
sudo cp files/dhcp/hostname $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/rfc3442-classless-routes $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this line is also changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to add '/' at the end of target to specify it is a folder.

@taoyl-ms
Copy link
Contributor Author

taoyl-ms commented Feb 1, 2017

The current hostname needs to be localhost for this to work. When current hostname is localhost, dhclient will set the hostname in kernel, and this hook will set the /etc/hostname file according to kernel hostname. Current default hostname in base image seems to be sonic instead of localhost so it is not working.

@taoyl-ms
Copy link
Contributor Author

taoyl-ms commented Feb 1, 2017

On the other hand, #235 will explicitly set both kernel hostname and /etc/hostname upon every dhcpack. So the decision on which approach to apply really depends on our goal - if we want the hostname be set only once right after deployment, we should adopt this approach, and change hostname in baseimage into localhost instead of current sonic. If we want the hostname be able to be updated even after deployment, we should adopt #235.

@lguohan
Copy link
Collaborator

lguohan commented Feb 1, 2017

The idea is that when we done with dhcp, we'll disable dhcp and set static IP based on the minigraph, no longer use dhcp any more. so I think #235 fit our need.

@lguohan
Copy link
Collaborator

lguohan commented Feb 1, 2017

let's close this one and comment on #235.

@taoyl-ms taoyl-ms closed this Feb 1, 2017
Kalimuthu-Velappan pushed a commit to Kalimuthu-Velappan/sonic-buildimage that referenced this pull request Sep 12, 2019
dmytroxshevchuk pushed a commit to dmytroxshevchuk/sonic-buildimage that referenced this pull request Aug 31, 2020
* Update port and queue counters by Flex counter

* [stat counters sonic-net#230] added missing removing of empty instances
qiluo-msft added a commit that referenced this pull request Aug 6, 2021
Includes below commits:
```
43b5e1a 2021-08-04 | CPU Spike because of redundant and flooded keyspace notifis handled (#230) [Vivek Reddy]
4d6bb79 2021-08-02 | Non-block reading counters to tolerate corrupted/delayed counters in COUNTERS_DB (#229) [Qi Luo]
```
lguohan pushed a commit that referenced this pull request Aug 6, 2021
Include below commits

sonic-swss-common
```
83d3351 2021-04-22 | [swig] fix ConfigDBConnector.db_name (#483) [Qi Luo]
fdf296f 2021-04-09 | Fix: ConfigDBConnector call super init with proper parameter name (#470) [Qi Luo]
4f580e3 2021-03-26 | [swig] translate SonicV2Connector::keys return type from C++ vector<string> to Python list (#468) [Qi Luo]
```

sonic-snmpagent
```
c160c2b 2021-08-04 | CPU Spike because of redundant and flooded keyspace notifis handled (#230) [Vivek Reddy]
a4dd3bf 2021-08-03 | Non-block reading counters to tolerate corrupted/delayed counters in COUNTERS_DB (#231) [Qi Luo]
```
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Includes below commits:
```
43b5e1a 2021-08-04 | CPU Spike because of redundant and flooded keyspace notifis handled (sonic-net#230) [Vivek Reddy]
4d6bb79 2021-08-02 | Non-block reading counters to tolerate corrupted/delayed counters in COUNTERS_DB (sonic-net#229) [Qi Luo]
```
judyjoseph added a commit that referenced this pull request Nov 14, 2021
sonic-snmpagent
7e46eb1 [201911][RFC1213]: Initialize lag oid map in reinit_data (#234)
aa98ded CPU Spike because of redundant and flooded keyspace notifis handled (#230)

sonic-swss
bc4e334 [Mux orch] Handle setting unknown mux state (#1984)
bd3630b [tunnel decap] Change tunnel orch order (#1977)
87a673a Fix the option missing in kernel config issue (#1973)
57967a1 [orchagent] Fix group name of port-buffer-drop in flexcounterorch.cpp (#1967)

sonic-utilities
181e8b0 Fix the option missing in kernel config issue (#1888)
21c0cc0 [watermarkstat] Fix for error in processing empty array from couters db (#1810)
7f15755 [chassis][supervisor][show][interfaces]show interfaces command warning on Supervisor card (#1771)
vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Nov 18, 2021
6f198d0 (HEAD -> 202012, origin/202012) [Y-Cable][Broadcom] upgrade to support Broadcom Y-Cable API to release (sonic-net#230)
1c3e422 SSD Health: Retrieve SSD health and temperature values from generic SSD info (sonic-net#229)

Signed-off-by: vaibhav-dahiya <[email protected]>
lguohan pushed a commit that referenced this pull request Nov 18, 2021
6f198d0 (HEAD -> 202012, origin/202012) [Y-Cable][Broadcom] upgrade to support Broadcom Y-Cable API to release (#230)
1c3e422 SSD Health: Retrieve SSD health and temperature values from generic SSD info (#229)

Signed-off-by: vaibhav-dahiya <[email protected]>
SuvarnaMeenakshi pushed a commit to SuvarnaMeenakshi/sonic-buildimage that referenced this pull request Mar 16, 2022
…onic-net#230)

**- What I did**

Fixes [sonic-net#8293](sonic-net#8293)

**- How I did it**

Accumulated all the older notifications and did act only upon the latest notification discarding the others
snider-nokia pushed a commit to snider-nokia/sonic-buildimage that referenced this pull request Apr 6, 2023
sonic-net#230)

This release goes in sync with the following firmware version of Broadcom Y cable, which is consistent with release 7
{
"version_nic_active": "D207.1.D103.1",
"version_nic_inactive": "D207.1.D103.1",
"version_nic_next": "D207.1.D103.1",
"version_peer_active": "D307.1",
"version_peer_inactive": "D307.1",
"version_peer_next": "D307.1",
"version_self_active": "D307.1",
"version_self_inactive": "D307.1",
"version_self_next": "D307.1"
}

Signed-off-by: vaibhav-dahiya [email protected]

Description
Basically a vendor specific implementation of abstract YCableBase class .
detailed design discussion can be found https://github.com/Azure/SONiC/pull/757/files

Signed-off-by: vaibhav-dahiya <[email protected]>
vivekrnv pushed a commit to vivekrnv/sonic-buildimage that referenced this pull request Apr 28, 2023
Dynamic write_max support for optoe driver


Signed-off-by: Prince George <[email protected]>
mssonicbld added a commit that referenced this pull request May 7, 2024
…lly (#18888)

#### Why I did it
src/sonic-gnmi
```
* c2bfe3d - (HEAD -> master, origin/master, origin/HEAD) Fix memory leak in unit test (#230) (44 minutes ago) [ganglv]
* 16c2975 - Disable translib unit test (#229) (71 minutes ago) [ganglv]
* 4c86853 - Merge pull request #224 from ganglyu/fix_build (10 hours ago) [Saikrishna Arcot]
* db2d896 - Disable dialout unit test (3 days ago) [ganglyu]
* 0e4ac4d - Disable translib test (4 days ago) [ganglyu]
* 8494e90 - Fix unit test (4 days ago) [ganglyu]
* 036979d - Fix unit test (4 days ago) [ganglyu]
* bd74b09 - Disable failed unit test (4 days ago) [ganglyu]
* a4bc960 - Update go.mod (7 days ago) [ganglyu]
* c15d45f - Fix build error (7 days ago) [ganglyu]
* 775a41e - Fix go.sum (7 days ago) [ganglyu]
* b39742e - Fix build error from sonic-mgmt-common (7 days ago) [ganglyu]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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