-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ntp]: Do not disable reader for error ENOBUFS (#2529)
Need to build NTP 4.2.6 locally due to a Bug in NTP 4.2.6. Changes: 1.) Remove 'apt-get ntp' step from build_debian.sh. 2.) Add NTP package as part of base image in slave.mk. 3.) NTP Makefile for Sonic Build System rules/ntp.mk. 4.) NTP Source Makefile src/ntp/Makefile. 5.) Patch to fix the issure src/ntp/patch. Signed-off-by: Praveen Chaudhary<[email protected]> * [src/ntp/Makefile]: DSC file URL points to sonic storage. Signed-off-by: Praveen Chaudhary<[email protected]> * [src/ntp/Makefile]: Changes to build with sonic blob.
- Loading branch information
Showing
8 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# ntp_4.2.6.p5+dfsg-7+deb8u2.deb | ||
|
||
NTP_VERSION_MAJOR = 4.2.6 | ||
NTP_VERSION_SUFFIX = .p5+dfsg | ||
NTP_VERSION_SUFFIX_NUM = 7+deb8u2 | ||
NTP_VERSION_FULL = $(NTP_VERSION_MAJOR)$(NTP_VERSION_SUFFIX)-$(NTP_VERSION_SUFFIX_NUM) | ||
NTP_VERSION = $(NTP_VERSION_MAJOR)$(NTP_VERSION_SUFFIX) | ||
|
||
export NTP_VERSION NTP_VERSION_FULL | ||
|
||
NTP = ntp_$(NTP_VERSION_FULL)_amd64.deb | ||
$(NTP)_SRC_PATH = $(SRC_PATH)/ntp | ||
SONIC_MAKE_DEBS += $(NTP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
SHELL = /bin/bash | ||
.ONESHELL: | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = ntp_$(NTP_VERSION_FULL)_amd64.deb | ||
|
||
DSC_FILE = ntp_$(NTP_VERSION_FULL).dsc | ||
ORIG_FILE = ntp_$(NTP_VERSION).orig.tar.gz | ||
DEBIAN_FILE = ntp_$(NTP_VERSION_FULL).debian.tar.xz | ||
|
||
DSC_FILE_URL = "https://sonicstorage.blob.core.windows.net/packages/debian/$(DSC_FILE)?sv=2015-04-05&sr=b&sig=HxuXOJsIfkj3lF2TlCShil7lFFf90Zh8oBNTfaka%2FNc%3D&se=2155-12-30T06%3A25%3A21Z&sp=r" | ||
ORIG_FILE_URL = "https://sonicstorage.blob.core.windows.net/packages/debian/$(ORIG_FILE)?sv=2015-04-05&sr=b&sig=bZcv%2B25Ke%2FBcWWd8WdBuK9sMDkcF45Yd2hAmmHBHfTk%3D&se=2155-12-30T06%3A26%3A27Z&sp=r" | ||
DEBIAN_FILE_URL = "https://sonicstorage.blob.core.windows.net/packages/debian/$(DEBIAN_FILE)?sv=2015-04-05&sr=b&sig=WGy6DcbTXo9FDRq%2F0gaiwV7oAYY86dHSUlvGaMrINBM%3D&se=2155-12-30T06%3A21%3A57Z&sp=r" | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
rm -rf ntp-$(NTP_VERSION) | ||
wget -O "$(DSC_FILE)" $(DSC_FILE_URL) | ||
wget -O "$(ORIG_FILE)" $(ORIG_FILE_URL) | ||
wget -O "$(DEBIAN_FILE)" $(DEBIAN_FILE_URL) | ||
|
||
dpkg-source -x $(DSC_FILE) | ||
|
||
pushd ntp-$(NTP_VERSION) | ||
|
||
git init | ||
git add -f * | ||
git commit -m "original source files" | ||
|
||
stg init | ||
stg import -s ../patch/series | ||
|
||
dpkg-buildpackage -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS) | ||
popd | ||
|
||
mv $* $(DEST)/ |
31 changes: 31 additions & 0 deletions
31
src/ntp/patch/0001-donot-disable-reader-kernel-enobufs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
commit 1534de6d3ef2d188d1e2697f7180786ee5a8a9dc | ||
Author: Praveen Chaudhary <[email protected]> | ||
Date: Sat Feb 2 20:12:53 2019 -0800 | ||
|
||
[ntp_io.c]: Do not disable reader for error ENOBUFS. | ||
|
||
Signed-off-by: Praveen Chaudhary<[email protected]> | ||
|
||
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c | ||
index f2a2404..fe5c94d 100644 | ||
--- a/ntpd/ntp_io.c | ||
+++ b/ntpd/ntp_io.c | ||
@@ -4430,10 +4430,14 @@ process_routing_msgs(struct asyncio_reader *reader) | ||
cnt = read(reader->fd, buffer, sizeof(buffer)); | ||
|
||
if (cnt < 0) { | ||
- msyslog(LOG_ERR, | ||
- "i/o error on routing socket %m - disabling"); | ||
- remove_asyncio_reader(reader); | ||
- delete_asyncio_reader(reader); | ||
+ if (errno == ENOBUFS) { | ||
+ msyslog(LOG_ERR, "routing socket reports: %m"); | ||
+ } else { | ||
+ msyslog(LOG_ERR, | ||
+ "i/o error on routing socket %m - disabling"); | ||
+ remove_asyncio_reader(reader); | ||
+ delete_asyncio_reader(reader); | ||
+ } | ||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0001-donot-disable-reader-kernel-enobufs.patch |