Commit Graph

13 Commits

Author SHA1 Message Date
Ze Gan
2f8994999b
[dash-api]: Add dash-api and related protobuf library (#14515)
Why I did it
For the DASH scenario, the APP_DB will be optimized by protobuf message for less memory consumption.

How I did it
Download the Debian package of protobuf 3.21.12 and create a corresponding rule for building it.
Add a submodule of sonic-dash-api and generated its Debian package which includes C++ library and Python library

How to verify it
Check artifacts of Azp that the protobuf-related and dash-api deb packages should be generated.

Signed-off-by: Ze Gan <ganze718@gmail.com>
2023-07-05 09:59:35 -07:00
Joe LeVeque
4612f680e6
[swss] Depend on Python 3 version of swsscommon rather than Python 2 (#6432)
The only Python code in the SwSS package, restore_neighbors.py, was recently converted to Python 3 and most dependencies were updated as part of #6207. However, the SwSS makefile still listed the Python 2 version of the swsscommon package as a dependency. This caused Python 2-related packages to be installed in containers unnecessarily.
2021-01-14 00:29:21 -08:00
lguohan
e1ac3cfc6a
[build]: wait for conflicts package to be uninstalled (#5039)
when parallel build is enabled, both docker-fpm-frr and docker-syncd-brcm
is built at the same time, docker-fpm-frr requires swss which requires to
install libsaivs-dev. docker-syncd-brcm requires syncd package which requires
to install libsaibcm-dev.

since libsaivs-dev and libsaibcm-dev install the sai header in the same
location, these two packages cannot be installed at the same time. Therefore,
we need to serialize the build between these two packages. Simply uninstall
the conflict package is not enough to solve this issue. The correct solution
is to have one package wait for another package to be uninstalled.

For example, if syncd is built first, then it will install libsaibcm-dev.
Meanwhile, if the swss build job starts and tries to install libsaivs-dev,
it will first try to query if libsaibcm-dev is installed or not. if it is
installed, then it will wait until libsaibcm-dev is uninstalled. After syncd
job is finished, it will uninstall libsaibcm-dev and swss build job will be
unblocked.

To solve this issue, _UNINSTALLS is introduced to uninstall a package that
is no longer needed and to allow blocked job to continue.

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-07-27 10:46:20 -07:00
lguohan
58632e6e83 [docker-orchagent]: make build depends only on sairedis package (#4880)
make swss build depends only on libsairedis instead of syncd. This allows to build swss without depending
on vendor sai library.

Currently, libsairedis build also buils syncd which requires vendor SAI lib. This makes difficult to build
swss docker in buster while still keeping syncd docker in stretch, as swss requires libsairedis which also
build syncd and requires vendor to provide SAI for buster. As swss docker does not really contain syncd
binary, so it is not necessary to build syncd for swss docker.

* [submodule]: update sonic-sairedis

* ccbb3bc 2020-06-28 | add option to build without syncd (HEAD, origin/master, origin/HEAD) [Guohan Lu]
* 4247481 2020-06-28 | install saidiscovery into syncd package [Guohan Lu]
* 61b8e8e 2020-06-26 | Revert "sonic-sairedis: Add support to sonic-sairedis for gearbox phys (#624)" (#630) [Danny Allen]
* 85e543c 2020-06-26 | add a README to tests directory to describe how to run 'make check' (#629) [Syd Logan]
* 2772f15 2020-06-26 | sonic-sairedis: Add support to sonic-sairedis for gearbox phys (#624) [Syd Logan]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-07-12 18:08:51 +00:00
Danny Allen
c50b431747
[dvs] Install libteamdctl runtime dependency in VS docker (#4837)
* Add libteamdctl dependency to VS docker
* Reorder dependencies and rename libteamctl

Signed-off-by: Danny Allen <daall@microsoft.com>
2020-06-24 14:07:22 -07:00
arheneus@marvell.com
50fe458592 [build]: SONiC buildimage ARM arch support (#2980)
ARM Architecture support in SONIC

make configure platform=[ASIC_VENDOR_ARCH] PLATFORM_ARCH=[ARM_ARCH]
SONIC_ARCH: default amd64
armhf - arm32bit
arm64 - arm64bit

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
2019-07-25 22:06:41 -07:00
Renuka Manavalan
6c4ec396ba [debug]: Fix src path mistake for sonic-swss. (#3186) 2019-07-19 06:55:39 -07:00
Renuka Manavalan
76bf5a0bc4 [build]: Added debug symbols to many debug dockers. (#3098)
* Added debug symbols to many debug dockers.

* For debug images *only*:
1) Archive source files into debug image
2) Archived source is copied into /src
3) Created an empty dir /debug
4) Mount both /src as ro & /debug as rw into every docker
5) Login banner will give some details on /src & /debug
6) Devs can copy core file into /debug and view it from inside a container.
7) Dev may create all gdb logs and other data directly into /debug.

* Dropped redundant REDIS_TOOLS per review comments.

* Added debug symbols to frr package and hence FRR based BGP docker.

* 1) Moved dbg_files.sh to scripts/
2) Src directories to archive are now collected from individual Makefiles.
3) Added few more debug symbols
4) Added few more debug dockers.

Here after no more changes except per review comments.

To debug:
Install required version of debug image in Switch or VM.
Copy core file into /debug of host
Get into Docker
gdb /usr/bin/<daemon> -c /debug/<your core file>
set directory /src/... <-- inside gdb to get the source

For non-in-depth debugging:

Download corresponding debug Docker image (docker-...-dbg.gz) to your VM
Load the image
Run image with entrypoint as 'bash' with dir containing core mapped in.
Run gdb on the core.
2019-07-03 22:13:55 -07:00
zhenggen-xu
51a76614a3 Restore neighbor table to kernel during system warm-reboot (#2213)
* Restore neighbor table to kernel during system warm-reboot

Added a service: "restore_neighbors" to restore neighbor table into
kernel during system warm reboot. The service is started by supervisord
in swss docker when the docker is started.

In case system warm reboot is enabled, it will try to restore the neighbor
table from appDB into kernel through netlink API calls and update the neighbor
table by sending arp/ns requests to all neighbor entries, then it sets the
stateDB flag for neighsyncd to continue the reconciliation process.

-- Added tcpdump python-scapy debian package into orchagent and vs dockers.
-- Added python module: pyroute2 netifaces into orchagent and vc dockers.
-- Workarounded tcpdump issue in the vs docker

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>

* Move the restore_neighbors.py to sonic-swss submodule
Made changes to makefiles accordingly

Make dockerfile.j2 changes and supervisord config changes

Add python monotonic lib for time access

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>

* Added PYTHON_SWSSCOMMON as swss runtime dependency

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
2018-11-09 17:06:09 -08:00
Qi Luo
ea51e1c241 Add explicit dependency for swss (#519) 2017-04-19 21:01:26 -07:00
lguohan
701c1eb9b1 [build]: add swss dbg package into deb (#506) 2017-04-14 15:47:33 -07:00
Shuotian Cheng
4356a6bef6 [team]: Add docker-team dependencies (#136) 2016-12-20 00:39:24 -08:00
Marian Pritsak
e9098b99fb Build improvements (#80)
* Build improvements

Fix dependencies
Add configuration options
Automatically build sonic-slave

* Set default number of jobs to 1

* Auto generate target/debs directory

Signed-off-by: marian-pritsak <marianp@mellanox.com>

* Automatically remove sonic-slave container after exit

* Silence clean-logs

* Add SONIC_CLEAN_TARGETS to clean

* Use second expansion for clean dependencies

* Avoid creating empty log files

Remove log file on flush instead of writing empty string

* Put dpkg install inside lock

Use same lock as debian install targets do to avoid
race condition in dpkg installation

* Remove redirect to log from docker save

* Add .platform dependency to all and clean targets

* Remove header and footer from clean targets

* Disable messages for SONIC_CLEAN_TARGETS

* Exit with error if dpkg-buildpackage fails

* Set new location for debs in build_debian.sh

* Add recipe for docker-database

* Update redis version to 3.2.4

* Add support for p4 platform

* Add recipe for snmpd

* Add slave targets to phony and make all target default

* Remove build.sh from thrift

* Add versioning to team, nl, hiredis and initramfs

* Change sonic-slave to support snmpd build from sources

* Remove src/tenjin

* Add recipe for lldpd

* Add recipe for mpdecimal

* Remove hiredis directory on rebuild

* Add recipe for Mellanox hw management

* Remove generic image from all targets for Mellanox

* Add support for python wheels

* Add lldp and snmp dockers

* Sync docker-database to include libjemalloc

* Fix asyncsnmp variable name

* Change default build configuration

Redirect output to log files by default
Set number of jobs to nproc value
Do not print dependencies
Fix logging to print log of failed job into console

* Use docker inspect to check if sonic-slave image exists

* Use config in slave.mk directly

* Disable color output by default

* Remove sswsdk dependency from lldp and snmp dockers

* Fix comment in py wheels install targets

* Add dependency between two versions of sswsdk

* Add containers to mellanox platform

lldp, snmp and database containers

* Add recipe for team docker

* Add team docker to mellanox platform

* Encrypt password passed to build_debian.sh

* Update mellanox SAI version

Make version and revision setting only in main recipe

* Fix error handling in makefiles

As makefiles use .ONESHELL we should add -e
option to shell options in order to exit after any command fails

* Add recipe for platform monitor image

* Add platfotm monitor to mellanox targets

* Ignore submodules when building base image
2016-12-05 11:12:19 -08:00