Commit Graph

70 Commits

Author SHA1 Message Date
Ashwin Hiranniah
ada7c6a72e
Add pensando platform (#15978)
This commit adds support for pensando asic called ELBA. ELBA is used in pci based cards and in smartswitches.

#### Why I did it
This commit introduces pensando platform which is based on ELBA ASIC.
##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it
Created platform/pensando folder and created makefiles specific to pensando.
This mainly creates pensando docker (which OEM's need to download before building an image) which has all the userspace to initialize and use the DPU (ELBA ASIC).
Output of the build process creates two images which can be used from ONIE and goldfw.
Recommendation is use to use ONIE.
#### How to verify it
Load the SONiC image via ONIE or goldfw and make sure the interfaces are UP.

##### Description for the changelog
Add pensando platform support.
2023-12-04 14:41:52 -08:00
Yevhen Fastiuk
52f6dd65a3
Improve remote fetch (#12795)
### Why I did it
To fix those errors:
One:
```
Connecting to urm.nvidia.com (urm.nvidia.com)|*.*.*.*|:443... connected.
GnuTLS: Error in the pull function.
Unable to establish SSL connection.
Error 4
make[1]: Leaving directory '/sonic/src/smartmontools'
[ target/debs/bullseye/smartmontools_6.6-1_amd64.deb ]
```
Second:
```
Get:90 https://debian-mirror-url buster/main amd64 librrd-dev amd64 1.7.1-2 [284 kB]
Get:91 https://debian-mirror-url buster/main amd64 psmisc amd64 23.2-1+deb10u1 [126 kB]
Get:92 https://debian-mirror-url buster/main amd64 python-smbus amd64 4.1-1 [12.2 kB]
Get:93 https://debian-mirror-url buster/main amd64 python3.7-dev amd64 3.7.3-2+deb10u3 [510 kB]
Get:94 https://debian-mirror-url buster/main amd64 python3-dev amd64 3.7.3-1 [1264 B]
Get:95 https://debian-mirror-url buster/main amd64 python3-smbus amd64 4.1-1 [12.5 kB]
Get:96 https://debian-mirror-url buster/main amd64 rrdtool amd64 1.7.1-2 [485 kB]
Fetched 122 MB in 12s (9976 kB/s)
E: Failed to fetch https://debian-mirror-url/pool/main/p/python-defaults/python2-minimal_2.7.16-1_amd64.deb  500  Internal Server Error [IP: *.*.*.* 443]
E: Failed to fetch https://debian-mirror-url/pool/main/f/fontconfig/fontconfig-config_2.13.1-2_all.deb  500  Internal Server Error [IP: *.*.*.* 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get update &&       apt-get install -y          build-essential         python3-dev             ipmitool                librrd8                 librrd-dev              rrdtool                 python-smbus            python3-smbus           dmidecode               i2c-tools               psmisc                  libpci3' returned a non-zero code: 100
[ target/docker-platform-monitor.gz ]
Error 1
```

#### How I did it
Add retry mechanism to apt, wget, and curl hooks
2023-09-23 18:07:04 -07:00
Christian Svensson
97c29a45bd
[build] Do not ignore well-known debian files (#14565)
Includes the common debian files that we always want to include.

This mitigates but does not fully solve #7683 as it
could be more files that are ignored by this default rule.

Signed-off-by: Christian Svensson <blue@cmd.nu>
2023-04-12 09:10:22 -07:00
xumia
ac5d89c6ac
[Build] Support j2 template for debian sources (#12557)
Why I did it
Unify the Debian mirror sources
Make easy to upgrade to the next Debian release, not source url code change required.
Support to customize the Debian mirror sources during the build
Relative issue: #12523
2022-11-09 08:09:53 +08:00
Alexander Allen
b4bc051267
Add logging for slave container builds (#10628)
#### Why I did it

No logs currently exist for sonic-save-X containers which makes it difficult to debug.

#### How I did it

Altered Makefile.work to create logs in the sonic-slave-X folder while still displaying the log to the screen to prevent interfering with any existing tooling. 

#### How to verify it

Do `make configure` and verify that logs show up in `sonic-slave-buster/` and `sonic-slave-bullseye/`

#### Description for the changelog
Add logging for slave container builds

#### A picture of a cute animal (not mandatory but encouraged)
TBD
2022-05-31 09:59:52 -07:00
Junchao-Mellanox
e8b4c2a1f4
[Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422)
- Why I did it
* To support systems with dynamic port configuration
* Apply lazy initialization to faster the speed of loading platform API

- How I did it
* Add module.py to implement dynamic port configuration (aka line card model)
* Adjust chassis.py, platform.py, thermal.py, sfp.py to support dynamic port configuration
* Optimize existing code

- How to verify it
Platform regression on MSN4700, MSN3800 and MSN2700, 100% pass
Unit test covers all new changes.
2021-10-25 07:59:06 +03:00
Ye Jianquan
38500fa92e
Add gdb and pyrasite to ptf image (#8816) 2021-09-24 17:10:48 +08:00
VenkatCisco
702e852ee1
Platform/cisco-8000 module for sonic-buildimage (#8172)
Why I did it
Update Makefile, so it does the following:
For a given platform, verify if platform/checkout/.ini exists and hence run the platform/checkout/template.j2. This allows platform code to be checked out during the 'make configure' stage.

How I did it
git clone git@github.com:Azure/sonic-buildimage.git
mkdir platform/cisco-8000

make init
make configure PLATFORM=cisco-8000
make all
2021-08-06 09:11:54 +08:00
Stepan Blyshchak
cd2c86eab6
[dockers] label SONiC Docker with manifest (#5939)
Signed-off-by: Stepan Blyschak stepanb@nvidia.com

This PR is part of SONiC Application Extension

Depends on #5938

- Why I did it
To provide an infrastructure change in order to support SONiC Application Extension feature.

- How I did it
Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on
installed SONiC images.

- How to verify it
Build an image, execute the following command:

admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq
Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
2021-04-26 13:51:50 -07:00
Sujin Kang
d5238ae8dd
[pcie.yaml] Move pcie configuration file path to platform directory (#6475)
- Why I did it
The pcie configuration file location is under plugin directory not under platform directory.
#6437

- How I did it

Move all pcie.yaml configuration file from plugin to platform directory.
Remove unnecessary timer to start pcie-check.service
Move pcie-check.service to sonic-host-services
- How to verify it
Verify on the device
2021-02-21 08:27:37 -08:00
Guohan Lu
512eb6bee2 [build]: add arch name in sonic-slave docker image
for exmaple, for arm64, the sonic-slave docker image name
is sonic-slave-arm64-$(USER)

for amd64, the docker image is kept as it is

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-12-25 09:31:42 -08:00
xumia
0a36de3a89
Recover "Support SONiC Reproduceable Build-debian/pip/web packages (#6255)
* Revert "Revert "Support SONiC Reproduceable Build-debian/pip/web packages (#5718)""

This reverts commit 17497a65e3.

* Revert "Revert "Remove unnecessary sudo authority in build Makefile (#6237)""

This reverts commit 163b7111b5.
2020-12-21 15:31:10 +08:00
Guohan Lu
17497a65e3 Revert "Support SONiC Reproduceable Build-debian/pip/web packages (#5718)"
This reverts commit 55a707586b.
2020-12-18 23:37:27 -08:00
xumia
55a707586b
Support SONiC Reproduceable Build-debian/pip/web packages (#5718)
* Support SONiC reproduceable build for deb/py2/py3/web

* Remove j2 files

* Fix bug

* Fix some issues

1. Change some code format issues
2. Fix curl calling wget command, pip2 calling pip3 issue
3. Fix wget/curl downloading multiple urls issue

* Fix some code format issue

* Fix bug

* Fix bug

* Fix command path hard code in build info scripts issue

* Add debian package sonic-build-tools

* Fix auto debian package removed issue

* Change build debian package name, and change the folder

* Collect the pre-versions and post-versions

* Change to use debian:buster

* Remove apt-mark and improve code

* Remove set_build_hooks

* Change docker trusted gpg files

* Fix docker build COPY directory name issue

* Move the trusted gpg files into the sonic-build-hooks package
2020-12-17 13:06:53 +08:00
shi-su
339cfbf9af
Remove the configuration of synchronous mode from init_cfg.json (#5308)
Remove the configuration of synchronous mode from init_cfg.json
2020-09-10 01:26:10 -07:00
Samuel Angebault
7e2fa7d997
[build]: Add a user defined rules/config file not tracked by git (#5325)
This change introduce the rules/config.user file.
It gets loaded after rules/config as a mean to override default values.
If the configuration file does not exists this step is ignored.
Since this path is tracked by .gitignore, it provides a mean to change
the configuration of sonic build without dirtying the git tree.

Signed-off-by: Samuel Angebault <staphylo@arista.com>
2020-09-10 01:24:12 -07:00
shi-su
f3feb56c8a
Add switch for synchronous mode (#5237)
Add a master switch so that the sync/async mode can be configured.
Example usage of the switch:
1.  Configure mode while building an image
    `make ENABLE_SYNCHRONOUS_MODE=y <target>`
2. Configure when the device is running 
    Change CONFIG_DB with `sonic-cfggen -a '{"DEVICE_METADATA":{"localhost": {"synchronous_mode": "enable"}}}' --write-to-db`
    Restart swss with `systemctl restart swss`
2020-08-24 14:04:10 -07:00
Joe LeVeque
58db2d53e3
[sonic-py-common] Add unit test framework (#5238)
**- Why I did it**

To install the framework for adding unit tests to the sonic-py-common package and report coverage.

** How I did it **

- Incorporate pytest and pytest-cov into sonic-py-common package build
- Updgrade version of 'mock' installed to version 3.0.5, the last version which supports Python 2. This fixes a bug where the file object returned from `mock_open()` was not iterable (see https://bugs.python.org/issue32933)
- Add support for Python 3 setuptools and pytest in sonic-slave-buster environment
- Add tests for `device_info.get_machine_info()` and `device_info.get_platform()` functions
- Also add a .gitignore in the root of the sonic-py-common directory, move all related ignores from main .gitignore file, and add ignores for files and dirs generated by pytest-cov
2020-08-24 10:35:22 -07:00
Joe LeVeque
ce2c0781ab
[sonic-config-engine] Update .gitignore (#5223)
- Ignore directories generated by building Python wheel package
- Move all sonic-config-engine ignores from the root .gitignore to src/sonic-config-engine/.gitignore
2020-08-20 11:09:10 -07:00
Joe LeVeque
2b5e418e2e
Remove sonic-daemon-base package (#5131)
sonic-daemon-base package has been deprecated in favor of the sonic-py-common package. All related functionality has been moved there.
2020-08-09 21:27:36 -07:00
Joe LeVeque
c2a96c07e2
[.gitignore] Ignore src/sonic-py-common/.eggs/ directory (#5114)
Add generated src/sonic-py-common/.eggs/ directory to .gitignore file
2020-08-07 08:52:07 -07:00
Joe LeVeque
c0d1616f89
Introduce sonic-py-common package (#5003)
Consolidate common SONiC Python-language functionality into one shared package (sonic-py-common) and eliminate duplicate code.

The package currently includes three modules:

- daemon_base
- device_info
- logger
2020-07-26 23:15:41 -07:00
pavel-shirshov
7c2f5a0544
Update .gitignore for platform (#4803) 2020-06-18 11:29:44 -07:00
Joe LeVeque
c6365e7abe
Reorganize .gitignore files (#4707)
- Add .gitignore files in each subdirectory of src/, so as to reduce the size of the .gitignore file in the project root, and also make it easier to maintain (i.e., if a directory in src/ is removed, there will not be outdated entries in the root .gitignore file.

- Also add missing .gitignore entries and remove outdated entries and duplicates.
2020-06-09 21:04:55 -07:00
Danny Allen
7b1f0a6d33
[gitignore] Ignore all auto-generated Dockerfiles (#4195)
* [gitignore] Ignore all auto-generated Dockerfiles
- Simplify gitignore to ignore all known directories with generated Dockerfiles
- Rename Barefoot and Cavium saiserver Dockerfiles to follow same convention as other platforms

Signed-off-by: Danny Allen <daall@microsoft.com>
2020-02-27 08:21:35 -08:00
Tamer Ahmed
2658ab8add
[dhcp-relay]: Add DHCP Relay Monitor (#3886)
DHCP relay MONitor (dhcpmon) keeps track of DORA messages. If DHCP Relay
is detected to be not forwarding DORA message, dhcpmon will log such event
to syslog. Under the hood dhcpmon keeps counts of clients DR messages,
forwarded DR messages, DHCP server OA messages, and forwarded OA messages.
dhcpmon will check every 12 sec (configurable) if counts are monotonically
increasing and record snapshot of those counters. dhcpmon will report
discrepancies when detected between current counters and snapshot counters.

pull-request: https://github.com/Azure/sonic-buildimage/pull/3886
signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-01-07 17:48:03 -08:00
tahmed-dev
df04809cb8
[libnl]: Debian Packaging libnl version 3.5.0 (#3967)
Packaging libnl 3.5.0 based off libnl 3.2.27 packaging. libnl contains various bug fixes that are nice to have.

pull-request: https://github.com/Azure/sonic-buildimage/pull/3967
signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-01-06 17:01:28 -08:00
Joe LeVeque
24a0c46464
[monit] Build from source and patch to use MemAvailable value if available on system (#3875) 2019-12-30 18:25:57 -08:00
Greg Paussa
f65c7969b6 [build] Fix cleaning SONIC_PYTHON_STDEB_DEBS (#3343)
* slave.mk
* .gitignore

The SONIC_PYTHON_STDEB_DEBS group is part of SONIC_CLEAN_DEBS
for cleaning with 'make clean', but this group is overlooked
since they reside in PYTHON_DEBS_PATH, not DEBS_PATH. This
fix creates a separate clean rule for SONIC_PYTHON_STDEB_DEBS.

Also noticed the .arch file showing up on 'git status' so
added it to .gitignore.

Signed-off-by: Greg Paussa <greg.paussa@broadcom.com>
2019-08-15 00:34:34 -07:00
Lawrence Lee
7271fe598f [build]: Move Systemd service start to systemd generator (#3172)
- What I did

 Move the enabling of Systemd services from sonic_debian_extension to a new systemd generator

- How I did it

  Create a new systemd generator to manually create symlinks to enable systemd services
  Add rules/Makefile to build generator
  Add services to be enabled to /etc/sonic/generated_services.conf to be read by the generator at boot time

Signed-off-by: Lawrence Lee <t-lale@microsoft.com>
2019-07-29 15:52:15 -07:00
lguohan
1860dd5abe
[build]: use j2 template for sonic slave Dockerfile (#3223)
Generate sonic slave Dockerfile based on j2 template

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-07-26 13:13:33 -07:00
Joe LeVeque
f5f7fb38b8
[gitignore] Ignore .DS_Store files (#2997) 2019-06-13 16:00:30 -07:00
Lawrence Lee
a0c740b2f9 [.gitignore]: update inclusion of dbg files
* Remove pattern '*dbg*' and replaced with '*-dbg' and '*dbg.j2'

Signed-off-by: Lawrence Lee <t-lale@microsoft.com>
2019-05-24 16:41:37 +00:00
Lawrence Lee
e10ec8c5f5 [.gitignore]: add build artifacts
* Ignore images
* Ignore debug files
* Ignore compressed/tarred files
* Ignore libyang, smartmontools, and swig artifacts
* Ignore miscellaneous initramfs-tools artifacts

Signed-off-by: Lawrence Lee <t-lale@microsoft.com>
2019-05-23 21:21:57 +00:00
Joe LeVeque
c0904f766b
[radvd] Build radvd from source; Patch so as not to treat out-of-range MTU as an error (#2795) 2019-04-17 16:41:20 -07:00
Stepan Blyshchak
0e01ff557b [mellanox] add makefiles to build Mellanox SDK from sources (#2701)
* [.gitignore] add missing directories to .gitignore

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [buildsystem] add ability to override make variables from root Makefile

To override any make variable during build use SONIC_OVERRIDE_BUILD_VARS, e.g:
"make SONIC_OVERRIDE_BUILD_VARS="PARAM1=A PARAM2=B" all"

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [mellanox] add SDK build from sources

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [mellanox] pass -j$(SONIC_CONFIG_MAKE_JOBS) when building SDK

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [mellanox] Add MLNX_SAI_REPO, MLNX_FW_BASE_URL variables

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [mellanox] if MLNX_SDK_BASE_SOURCE_URL is not empty then build SDK from sources

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-03-27 18:32:25 -07:00
Mykola F
3826ffd30f [pmon] move platform monitor docker to stretch (#2680)
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
2019-03-22 16:42:56 -07:00
Stepan Blyshchak
0a0f5b81bf [thrift] add a patch to revert THRIFT-3650 (#2688)
Revert breaking change in thrift 0.11.0;
saithrift implementation relies on the bug in union serialization
(details: https://jira.apache.org/jira/browse/THRIFT-3650)

Add this revert patch untill saithrift is fixed according to
correct thrift behaviour

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-03-20 17:40:22 -07:00
Joe LeVeque
0fd4f1806b
[build] Enable streaming telemetry Docker container by default (#2354) 2019-02-28 16:27:29 -08:00
Joe LeVeque
3f138e899c Define a base Docker image and config-engine docker image based on Debian Stretch (#2076)
* Build a Docker base image based on Debian Stretch

* Build a config-engine Docker image based on Stretch

* Do not install socat from Debian repo

* Add changes that were made to docker-base since this PR was opened
2019-01-30 23:05:52 -08:00
lguohan
9f6f3e4046
[docker-saiserver]: build docker-saiserver (#2244)
* build docker-saiserver

Signed-off-by: Guohan Lu <gulv@microsoft.com>

* add docker saiserver mlnx/bfn/cavm

* set nephos to 1.3.5

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-11-14 01:15:31 -08:00
Guohan Lu
8910c7e18c update .gitignore
Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-12 07:58:59 +00:00
Joe LeVeque
f04f0704f7
Build python-click Debian package from version 6.7-4 source to fix CLI autocomplete/suggest (#1824) 2018-06-29 09:59:46 -07:00
Jipan Yang
f74de8914b [telemetry]: SONiC system telemetry Support (#1526)
* SONiC system telemetry Support

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update package name from telemetry to sonic-telemetry

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-03-27 13:39:04 -07:00
Joe LeVeque
c161de406a
[lldpmgrd] Fix potential race condition when interfaces are created (#1469) 2018-03-07 17:08:45 -08:00
Joe LeVeque
0fa64cc618
[supervisor] Add patch to prevent 'supervisorctl start' command from hanging if system time has rolled backward (#1311)
* Add patch to prevent 'supervisorctl start' command from hanging if system time has rolled backward

* Also add unit tests for clock rollback scenarios
2018-01-18 11:43:57 -08:00
Joe LeVeque
2571cb59b6 [DHCP relay]: Fix bug which could cause incorrect interface name association (#1233)
* [DHCP relay]: Fix bug which could cause incorrect interface name association

* Add patches to series file and apply using stgit

* Update .gitignore in order to ignore downloaded and generated files

* Reorganize src/ subdirectories alphabetically in .gitignore
2017-12-12 23:56:59 -08:00
Joe LeVeque
cea87e985c
Add docker-router-advertiser to support IPv6 router advertisements (#1103) 2017-11-14 14:40:15 -08:00
lguohan
875bdf6be9
[vs] add teamsyncd into vs docker (#1112)
* [vs] add teamsyncd into vs docker

* add build badge for virtual switch
2017-11-03 17:13:39 -07:00
Joe LeVeque
9d5adb993a [System logs]: Improvements to prevent filling /var/log partition (#865)
- Force log rotation at size thresholds only (no longer also rotating logs daily), allowing for more consistent archived log size
- Eliminate remaining duplicate log messages
- Cron facility now only logs to cron.log (was also logging to syslog)
- Debug, mail, news and user log facilities only log to syslog; no longer creating separate log files for these facilities
- Cron job that calls logrotate every minute now uses the main /etc/logrotate.conf file so as to check/rotate all logs every minute, not just the logs specified in the rsyslog file. Also redirecting output of this command to /dev/null to prevent "(CRON) info (No MTA installed, discarding output)" messages in cron.log due to lack of a mail service
- Delete archive files based on remaining /var/log partition space. Note that this solution currently requires a minimum /var/log partition size of 32MB to function correctly
- Update sonic-sairedis and sonic-swss submodules to incorporate recording file name changes
- Add .screen file to .gitignore (unrelated)
2017-08-10 16:24:57 -07:00