Commit Graph

594 Commits

Author SHA1 Message Date
Ying Xie
698b248a13
[docker script] skip docker mount point checking for database container (#2683)
database container doesn't mount hwsku folder.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-03-19 20:14:07 -07:00
Renuka Manavalan
ae05579c67 [baseos]: Install ipaddress python package that has deprecated current ipaddr. … (#2674)
* Install ipaddress python package that has deprecated current ipaddr. ipaddress has backport to python2.7

* Install python ipaddress module as required by route_check.py sonic utility. BTW, ipaddress deprecates ipaddr and ipaddress has python2 backport

* Revert the old chaneg per review comments.

Signed-off-by: Renuka Manavalan <remanava@microsoft.com>
2019-03-18 11:12:47 -07:00
Pavlo Yadvichuk
11c2e9ee3d [barefoot]: Allow configuration of platform-specific interfaces used for internal purposes (#2631)
- Why it is required
since SONiC master switches ifupdown package to the new implementation (ifupdown2), it is required to change the configuration of a platform-specific interface for wedge100bf_32x and wedge100bf_65x platforms (bc of ifupdown2 doesn't support auto mode for inet6 protocol).

Also, need to make some refactoring and remove if platform == smth then.. from the system level scripts.

- What I did

removed customization of /usr/bin/interfaces-config.sh
explicitly created directory /etc/network/interfaces.d
added "source" to the /etc/network/interfaces generation template (to include platform-specific interfaces processing)
added platform-specific interfaces config itself (for wedge100bf_32x and wedge100bf_65x)
fixed testcase in sonic-config-engine
- How to verify it

build image for wedge100bf_32x
perform sudo config reload -y on new installation
check the correct configuration of usb0 interface
- Description for the changelog

Allow configuration of platform-specific interfaces
2019-03-09 06:22:32 -08:00
Joe LeVeque
2bb5400948 [services] Services which start containers now use 'docker wait' instead of 'docker attach' (#2661) 2019-03-08 10:59:41 -08:00
Wenda Ni
f9c9fa8ba1 [qos]: Map tc 1, 2, 5, and 6 back to pg 0 (#2650)
Lossy traffic does not need to be mapped to different ingress PGs. They can all share the same ingress PG.

Signed-off-by: Wenda Ni <wenni@microsoft.com>
2019-03-08 02:23:32 -08:00
Nazarii Hnydyn
b22fe37670 [mellanox]: Upgraded hw-management V.2.0.0160. (#2643)
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
2019-03-06 18:51:46 -08:00
Wenda Ni
784bf77a92 Add hook to allow customizing link cable lengths
Signed-off-by: Wenda Ni <wenni@microsoft.com>
2019-03-05 22:06:00 +00:00
Ying Xie
66f5202b9f
[swss/syncd] cold start syncd service in swss in attach method (#2639)
start() is called by service startPre method, which is blocking. Starting
syncd service here is causing deadlock.

attach() is called by service start method, which is non-blocking.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-03-04 16:46:55 -08:00
RAMA CHANDRA REDDY GADDAM
b9edb7153d [aaa] Fix common-auth-sonic.j2 template issue (#2613) 2019-03-02 15:36:35 -08:00
Joe LeVeque
5eb7872a07 [services] Ensure swss and syncd services start before dependent services (#2634)
* [services] Ensure swss and syncd services start before dependent services

* Add 'attach' functions to scripts which get installed to /usr/local/bin so that services only reference the one script each

* Add 'After=swss.service' to syncd.service
2019-03-02 15:28:34 -08:00
yurypm
d632569a6a Add initramfs hook for Arista devices (#2595)
We are going to use initramfs hook for firmware upgrades
To install Arista hook:
- create folder /mnt/flash/<image dir>/platform/hooks/boot1/ from Aboot or
  /host/<image dir>/platform/hooks/boot1/ from Sonic
- add executable script to created folder
2019-02-27 10:28:04 -08:00
Ying Xie
3086f4f391
Revert "[baseimage] Delay ntp-config service to start after 5 minutes (#2494)" (#2590)
This reverts commit 33fe8d298e.
2019-02-21 10:04:54 -08:00
Nikos
1158277533 [frr]: staticd terminating due to inadequate permissions (#2580)
Signed-off-by: nikos <ntriantafillis@gmail.com>
2019-02-19 21:50:19 -08:00
lguohan
572db1e0a9
[swss]: flush asic db in swss.sh for non warm-boot (#2582)
need to flush asic db in swss.sh instead of syncd.sh

orchagent might already started in swss.sh and put commands
into asic db before asic db is flushed in syncd.sh. This
causes race condition such as INIT_VIEW not passing to syncd.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-02-19 21:48:43 -08:00
Jipan Yang
ff74daaf13 Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE (#2538)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2019-02-19 17:06:56 -08:00
Renuka Manavalan
fa7c46611e [hostcfgd]: Promote logs for update-notifications-from-DB from DEBUG to INFO (#2576)
* Add a log message for each notification of add/del TACACS server.

Signed-off-by: Renuka Manavalan <remanava@microsoft.com>

* Moved another syslog message from DEBUG to INFO to be able to see those notifications.

All these changes are to help with a one-time-seen-bug, that hostcfgd did not act upon changes to redis for TACACS servers. We could not repro the bug.

Signed-off-by: Renuka Manavalan <remanava@microsoft.com>
2019-02-16 10:17:13 -08:00
Stepan Blyshchak
2dd769bf46 [syncd.sh] Don't stop sxdkernel during warm shutdown on Mellanox platform (#2572)
/etc/init.d/sxdkernel stop may take up to 15 sec which has impact on
control plane downtime

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-02-15 16:08:08 -08:00
Nazarii Hnydyn
d53df059d4 [devices]: Added new SN3700/SN3700C Mellanox platforms (#2548)
* [mlnx-msn3700]: Added MSN3700 platform.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>

* [mlnx-msn3700]: Upgrade FW burn: use ASIC auto detect.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>

* [mlnx-msn3700]: Updated HW-MGMT/FW/MFT/SAI/SDK.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>

* [mlnx-msn3700]: Added MSN3700C platform.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
2019-02-13 23:08:04 -08:00
Ying Xie
44551d0fb5
[swss/syncd] log swss/syncd service script activities (#2545)
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-02-10 11:56:31 -08:00
zzhiyuan
6037707abc [devices]: Add device data for Arista 7060PX/DX4-32 (#2534)
* Add boot0 definition for Arista 7060PX4-32 and 7060DX4-32

* Add port configuration for Arista 7060PX4-32

* Add plugins for Arista 7060PX4-32

* Add platform_reboot for Arista 7060PX4-32

* Add Arista 7060DX4-32 as symlink of 7060PX4-32

* Add sensors configuration and fancontrol for Arista 7060PX4-32

* Update arista-driver submodules for barefoot/broadcom

* Add platform_reboot script for Alhambra

* Rook fancontrol CPLD rename
2019-02-08 22:02:01 -08:00
Nadiia Stetskovych
bb5a171ffc [minigraph]: Do not fail for minigraphs which do not have neighbors listed in <Devices> section (#2522)
Signed-off-by: Nadiya.Stetskovych <nstetskovych@barefootnetworks.com>
2019-02-04 22:43:08 -08:00
lguohan
f20665008c
[build]: put stretch debian packages under target/debs/stretch/ (#2519)
* [build]: put stretch debian packages under target/debs/stretch/

* in stretch build phase, all debian packages built in that stage are placed under target/debs/stretch directory.
* for python-based debian packages, since they are really the same for jessie and stretch, they are placed under target/python-debs directory.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-02-04 22:06:37 -08:00
zhenggen-xu
982eddfaa4 [updategraph] After system upgrade, restore files/directories with original attributes etc. (#2368)
* [updategraph] After system upgrade, restore files/directories with
original attributes etc.
Restore a few more files that was missed before.
Restore FRR configuration directory if exists on old system

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

* Removed deployment_id_asn_map.yml from copy list

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
2019-02-02 12:50:19 -08:00
lguohan
9c2d7240ea
[vs]: Force10-S6000 buffer settings for virtual switch (#2515)
Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-02-01 11:18:02 -08:00
Prince Sunny
39e12a1d82 [swss]: Change VrfMgrd startup order, cleanup VRF_TABLE from state DB (#2510) 2019-01-31 23:28:31 -08:00
Wenda Ni
58adf06cc0 [QoS]: Link pg 2 and 6 to lossy buffer profile (#2511)
* Link pg 2 and 6 to lossy buffer profile

Signed-off-by: Wenda <wenni@microsoft.com>
2019-01-31 23:27:58 -08:00
Joe LeVeque
33fe8d298e [baseimage] Delay ntp-config service to start after 5 minutes (#2494) 2019-01-30 19:01:21 -08:00
Wenda Ni
ce9a3f0c5a [QoS]: QoS Config change for multiple devices (#2505)
* QoS config change: 1) DSCP mapping; 2) link pg/queue 6 to lossy buffer;
3) redistribute scheduler

Signed-off-by: Wenda <wenni@microsoft.com>

* Add scheduling weight to queue 2

Signed-off-by: Wenda <wenni@microsoft.com>

* Link pg/queue 2 to lossy buffer

Signed-off-by: Wenda <wenni@microsoft.com>

* Update the pg headroom for a7060-D48C8 50G

Signed-off-by: Wenda <wenni@microsoft.com>

* Update config gen test for qos

Signed-off-by: Wenda <wenni@microsoft.com>

* Update pg headroom size, and update egress lossy pool size accordingly

Signed-off-by: Wenda <wenni@microsoft.com>

* Update headroom pool size; Update ingress service pool and egress lossy
pool sizes accordingly;

Signed-off-by: Wenda <wenni@microsoft.com>

* a7260: update headroom pool size; Update ingress service pool and egress lossy pool sizes accordingly;

Signed-off-by: Wenda <wenni@microsoft.com>

* Update config gen test for buffer

Signed-off-by: Wenda <wenni@microsoft.com>
2019-01-30 19:00:13 -08:00
Joe LeVeque
39b60d2a50 [reboot cause] Move reboot-cause files to /host directory so they persist across SONiC upgrades (#2490)
* [reboot cause] Move reboot-cause files to /host directory so they persist across SONiC upgrades

* [sonic-utilities] Update submodule to include related changes
2019-01-29 03:42:19 -08:00
Joe LeVeque
8f43cad061 [rsyslog] Suppress duplicate messages from base image and all Docker containers (#2497) 2019-01-29 03:41:40 -08:00
lguohan
4ccd35bc25
[kernel]: update sonic kernel to 4.9.0-8-2 (#2468)
* [kernel]: update sonic kernel to 4.9.0-8-2

* 3b2114d 2019-01-20 | [sonic-linux-kernel] add udp_l3mdev_accept kernel upstream patch (#70) (HEAD, azure/master) [Harish Venkatraman]
* 37734aa 2019-01-10 | L3mdev cgroup (#73) [lguohan]
* d631eeb 2018-12-15 | yet another uart race condition fix (#75) [lguohan]

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

* Update Mellanox SDK

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

* Update arista platform driver to match 4.9.0-8-2 kernel

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-01-25 00:46:09 -08:00
Joe LeVeque
116ddb996a [caclmgrd] Don't crash if we find empty/null rule_props (#2475)
* [caclmgrd] Don't crash if we find empty/null rule_props
2019-01-23 18:47:05 -08:00
Prabhu Sreenivasan
f28a670097 [baseimage]: Avoid removing localhost entry from /etc/hosts file (#2452)
- What I did
This fix removes the possibility of 'localhost' entry getting removed from /etc/hosts file by hostname-config service.

Without this change, whenever we change the hostname from 'localhost' to any other name on the config_db.json and reload the config, /etc/hosts file will only have the new hostname on it. But there are multiple sonic utilities (eg: swssconfig) which relies on the hard coded 'localhost' name and they tend to stop working.

- How I did it
Added a new check on hostname-config.sh script to avid blindly deleting the line containing the old hostname from /etc/hosts file. Now it will delete the old hostname only if its not localhost or when the hostname is not changing.

- How to verify it

Bring up SONiC on a device with hostname as localhost
Edit /etc/sonic/config_db.json to update the 'hostname' filed under DEVICE_METADATA from "hostname" : "localhost" --> "hostname" : "sonic"
run config reload -y to reflect the hostname change done on config_db.json file.
cat /etc/hosts and check whether both 127.0.0.1 localhost and 127.0.0.1 sonic entry are present on the file.
ping localhost should work fine.
- Description for the changelog
Make hostname-config service more robust in handling SONiC hostname change from localhost to anything else.
2019-01-17 22:47:19 -08:00
stepanblyschak
20dfb03359 [mellanox|ffb] ISSU version check (#2437)
* Revert "[mellanox]: Integrate CRIU tool to SYNCD docker container (#2061)"

This reverts commit 514b38f348.

Conflicts:
	platform/mellanox/docker-syncd-mlnx.mk
	sonic-slave/Dockerfile

* [mellanox|ffb] remove unused scripts

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

* [mellanox|ffb] ISSU version check

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

* [mlnx|ffb] remove extra ';'

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-01-17 14:41:32 -08:00
Nikos
e55a7d7db7 [baseimage]: Initial changes for dhcp to support eth0 in a mgmt vrf (#2348)
* Initial changes to support eth0 in a mgmt vrf
2019-01-15 18:15:56 -08:00
stepanblyschak
ff526dd103 [mellanox|ffb] use system level warm reboot for Mellanox fastfast boot (#2374)
* [mellanox|ffb] use system level warm reboot for Mellanox fastfast boot

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

* [mellanox|ffb] add comments for mellanox start/stop drivers section

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-01-10 14:09:03 -08:00
lguohan
b57a376622
[docker-engine]: upgrade docker engine to 18.09 (#2417)
* [docker-engine]: upgrade docker engine to 18.09
2019-01-04 20:47:43 -08:00
Volodymyr Samotiy
b506241b84 [syncd]: Fix reload flow for Mellanox platforms (#2386)
* Perform stop/start of Mellanox driver tools for all types of reboot
* Don't set Mellanox FAST_BOOT option for "cold" reboot
* Don't send "syncd_request_shutdown" event for "cold" reboot on Mellanox platforms

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2018-12-15 11:36:12 -08:00
zhenggen-xu
f093ef2a9f [security kernel] Upgrade kernel from 4.9.110-3+deb9u2 to 4.9.110-3+deb9u6 (#2367)
* [security kernel] Upgrade kernel from 4.9.110-3+deb9u2 to 4.9.110-3+deb9u6
short version: 4.9.0-7 to 4.9.0-8

See changelogs for security fixes:
https://tracker.debian.org/media/packages/l/linux/changelog-4.9.110-3deb9u6

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

* Update sonic-linux-kernel submodule after it was merged

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
2018-12-11 04:17:17 -08:00
Samuel Angebault
6c7bcf5067 [device/Arista] fix small issue for the 7170 (#2373)
* Fix boot0 install on vfat

* Only display the hook name in boot0

Instead of printing the entire path

* Update arista driver submodule
2018-12-11 04:14:46 -08:00
Ying Xie
6ba93acd9c
[update graph] adapt to warm reboot scenario (#2353)
* [update graph] adapt to warm reboot scenario

When migrating configuration, always copy config files from old_config
to /etc/sonic. But if warm reboot is detected, then skip configuration
operations.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* log file copies and misses
2018-12-06 10:24:50 -08:00
Wenda Ni
f5e678cf84 Port QoS & buffer changes in 0330 to master (#2239)
* 1) DSCP 46 to 5; 2) ecn config for lossless traffic; 3) ecn on by default; 4) DWRR equal weight;

Signed-off-by: Wenda <wenni@microsoft.com>

* 1) link pg & queue 5 to lossy buffer profile; 2) ingress lossless alpha 1/8

Signed-off-by: Wenda <wenni@microsoft.com>

* Update the test case for qos & buffer json template

Signed-off-by: Wenda <wenni@microsoft.com>

* Migrate a7050-qx32 and s6000 to use pg_profile lookup architecture

Signed-off-by: Wenda <wenni@microsoft.com>

* Update pg headroom egress service pool for a7050-qx-32s, a7050-qx32, and s6000

Signed-off-by: Wenda <wenni@microsoft.com>

* Link queue 5 to lossy profile

Signed-off-by: Wenda <wenni@microsoft.com>
2018-12-04 20:51:55 -08:00
kannankvs
a9a7ce1091 tacacs management vrf changes (#2217) 2018-12-04 10:22:48 -08:00
Volodymyr Samotiy
75b41233d2 [Mellanox|FFB]: Add support for Mellanox fast-fast boot (#2294)
* [mlnx|ffb] Add support for mellanox fast-fast boot

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

* [mlnx|ffb]: Add support of "config end" event for mlnx fast-fast boot

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [Mellanox|FFB]: Fix review comments

* Change naming convention from "fast-fast" to "fastfast"

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2018-12-04 10:11:24 -08:00
Samuel Angebault
989b60059b [device/arista]: Update (#2336)
* Update arista drivers submodule

* Ignore the possible timestamp warning in tar extraction

* Add verbosity toggle to boot0

Console logging is slow because of the 9600 baud rate.
Some time can be saved by decreasing the console verbosity.

* Add hook mechanism in boot0.

Support additional features in boot0 via hooks.
Hooks are unpacked and executed at post-install or pre-exec time.

* Fix 7170 sensors.conf file

Fix critical temperature settings for MAX6658 sensors

* Fix the random swap of storage devices

For arista 7050 switches running with linux 4.9, it is likely the device
name of flash drive (/dev/sda) and usb (/dev/sdb) randomly swap in kernel
booting, depending on which one is ready first. It breaks the expectation
that flash will be mounted as root by setting root=/dev/sda1. This patch
will correct ROOT to flash device refering to the path under block_flash.

* Fix 7170 fancontrol

* Do not remove aquota.user file in boot0

This file is a filesystem protected file used by EOS.
It can be simply removed and will make the SONiC installation failed if
not skipped.
2018-12-04 10:08:55 -08:00
Taoyu Li
aedfd6e708 [sonic-cfggen] Multi-key should be in form of (a,b) instead of 'a|b' (#2337) 2018-12-04 10:07:44 -08:00
Joe LeVeque
298d2ad8f4
[boot] Refactor: All services which start Docker containers start before ntp-config service (#2335) 2018-12-03 16:01:44 -08:00
Ying Xie
84bde1511a
[sonic boot] disable dhcp during boot up, until updategraph service is running (#2316)
* [sonic] disable management port eth0 during boot up

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [updategraph] enable dhcp client on management port eth0

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-29 08:34:22 -08:00
Joe LeVeque
d1c9b0cb77 [boot] Start ntp-config service after all Docker containers are started (#2303) 2018-11-28 00:12:03 -08:00
Ying Xie
ce60c53933
[build image] copy init_interfaces to interfaces (#2302)
init_interfaces meant to be sonic init interfaces configuration file.
However, it needs to be copied to the right file name to take effect.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-27 14:35:17 -08:00
Nikos
7056b49af7 Routing application split config support (#2286)
* Routing application split config support

Signed-off-by: nikos <ntriantafillis@gmail.com>

* Routing application split config support
Routing application split config support

Signed-off-by: nikos <Nikos Triantafillis>
2018-11-26 18:19:12 -08:00
zzhiyuan
f0540e7381 Fix networking.service waiting for udevadm settle (#2295)
There was a fix to speed up initialization when networking used init.d
but it did not carry over to systemd networking.service. This fix will
apply the same change on the systemd service.

The result is much less time spent being blocked in networking.service.
2018-11-23 17:06:23 -08:00
Qi Luo
c2ae736f2e [warmboot] Load database from redis-cli save (#2287)
* [warmboot] Load database from `redis-cli save`

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Add trivial statement to make bash function valid

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Update submodule sonic-utilities: Use 'redis-cli save' to dump database to file

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Move configdb-load.sh outside docker, and only run in cold

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Fix for more strict warm check

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
2018-11-22 15:13:35 -08:00
Ying Xie
4abbe43463 [syncd] skip ledinit during syncd warm start (#2285)
* [syncd] skip ledinit during syncd warm start

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-21 17:56:19 -08:00
Ying Xie
873df9d8e8
[bde driver] black list linux_kernel_bde driver (#2284)
This driver should be loaded by sonic service. If kernel tries to load
it, the driver would be loaded with default parameters, which is not
right for sonic.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-21 08:08:37 -08:00
Qi Luo
465ebbafff
Build patched redis-dump-load (#2277)
* Build patched redis-dump-load
* Fix build
* Add build rule
2018-11-20 19:27:56 -08:00
Qi Luo
b4fd40a75e Fix redis-py version to 2.10.6 (#2273)
* Fix redis-py version

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Update submodule sonic-py-swsssdk: Fix redis-py version to 2.10.6

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
2018-11-19 12:03:15 -08:00
Ying Xie
5c8650aaaa [swss service] don't clear WARM_RESTART table (#2256)
Clear WARM_RESTART table could cause component level warm restart to
fail due to missing WARM_RESTART state.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-15 22:04:53 -08:00
Ying Xie
8598ccaf84
[syncd] extend syncd service script to support both warm/cold shutdown (#2238)
- cold shutdown is used by regular service stop and/or fast reboot
- warm shutdown is used by warm restart and/or warm reboot

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-15 15:47:33 -08:00
Joe LeVeque
f126000cc9
[sudoers] Add 'SONIC_CLI_IFACE_MODE' to env_keep to ensure variable is made available to sudo calls (#2249) 2018-11-15 15:16:06 -08:00
stepanblyschak
447ae7b61a [mlnx] Fix fast reboot (#2237)
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2018-11-09 21:54:20 -08:00
Ying Xie
914d5c7451 [warm boot] restore log level DB during warm reboot (#2233)
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-07 21:59:24 -08:00
Shuotian Cheng
110355201b [swss]: Update swss.sh script to clean up specific db when start (#2223)
This script shall not flush all the entries in the state database
when it starts up, since there are entries maintained and written
by other processes outside this docker.

The issue we noticed was that the portchannel states are cleaned
up after teamsyncd writes the entries into the database, which
causes the IPs failed to be configured because intfmgrd considers
the portchannels are not ready yet.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2018-11-03 12:32:46 -07:00
Qi Luo
8b67424101 Warm reboot: restore the database docker with content saved (#2216)
* Database service warm start

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Update files/build_templates/docker_image_ctl.j2

Co-Authored-By: qiluo-msft <qiluo-msft@users.noreply.github.com>

* Update files/build_templates/docker_image_ctl.j2

Co-Authored-By: qiluo-msft <qiluo-msft@users.noreply.github.com>

* Update files/build_templates/docker_image_ctl.j2

Co-Authored-By: qiluo-msft <qiluo-msft@users.noreply.github.com>

* Fix sudo, and exit immediately if any failure

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Fix syntax

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Fix redisLoadAndDelete argument, and refactor

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Fix: sudo, ping through unix socket

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
2018-11-02 07:20:07 -07:00
Ying Xie
5cff136951 [console speed] lock console speed to start up speed (#1734)
Auto negotiating console speed could cause sonic to lock on a wrong
speed under rare conditions. The only way to come out of the wrong
speed is to issue line break or restart console service with forced
speed, or reboot sonic.

Lock down the console speed to avoid these situations.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-01 15:12:22 -07:00
Taoyu Li
2897686de8
[updategraph] Use empty configuration when DHCP graphurl option is missing (#2185) 2018-10-29 12:16:00 -07:00
Joe LeVeque
1e1add90f9
Remove Arista-specific service ACL solution; All platforms now use caclmgrd (#2202) 2018-10-29 10:25:18 -07:00
Wenda Ni
09ae9a8965 In the case of upgrade, have pfcwd enabled on the upgraded sonic (#2192)
Signed-off-by: Wenda <wenni@microsoft.com>
2018-10-26 09:13:45 -07:00
Shuotian Cheng
7313e7d9bc [teamd]: Add teammgrd in docker-teamd (#2064)
Remove the teamd.j2 templates used for starting the teamd. Add
teammgrd instead to manage all port channel related configuration
changes. Remove front panel port related configurations in
interfaces.j2 templates as well.

Remove teamd.sh script and use teammgrd to start all the teamd
processes. Remove all the logics in the start.sh script as well.

Update the sonic-swss submodule.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2018-10-19 03:41:53 -07:00
Taoyu Li
2a24a303ec [tacplus nss conf] tacplus should be before compat (#2163) 2018-10-18 12:42:24 -07:00
Wenda Ni
77652c55fd [QoS]: Unify qos json by using qos_config.j2 template (#2023)
* Unify qos config with qos_config.j2 template

Signed-off-by: Wenda <wenni@microsoft.com>

* Change 7050 to use qos config template

Signed-off-by: Wenda <wenni@microsoft.com>

	modified:   device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json.j2
	modified:   device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/qos.json.j2

* Change a7060, a7260, s6000, s6100, z9100  to use qos config template

Signed-off-by: Wenda <wenni@microsoft.com>

* Change mlnx devices to use qos config template

Signed-off-by: Wenda <wenni@microsoft.com>

	modified:   ../../../mellanox/x86_64-mlnx_msn2100-r0/ACS-MSN2100/qos.json.j2
	modified:   ../../../mellanox/x86_64-mlnx_msn2410-r0/ACS-MSN2410/qos.json.j2
	modified:   ../../../mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2
	modified:   ../../../mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/qos.json.j2

* Change barefoot devices to use qos config template

Signed-off-by: Wenda <wenni@microsoft.com>

	modified:   barefoot/x86_64-accton_wedge100bf_32x-r0/montara/qos.json.j2
	modified:   barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/qos.json.j2

* Change accton as7212 to use qos config template

Signed-off-by: Wenda <wenni@microsoft.com>

	modified:   accton/x86_64-accton_as7212_54x-r0/AS7212-54x/qos.json.j2

* Apply PORT_QOS_MAP to active ports only

Signed-off-by: Wenda <wenni@microsoft.com>

* Update qos config test with qos_config.j2 template

Signed-off-by: Wenda <wenni@microsoft.com>

* Update sample output of qos-dell6100.json

Signed-off-by: Wenda <wenni@microsoft.com>

* Remove generating the default port name and index list, i.e., remove the generate_port_lists macro, because PORT is always defined

Signed-off-by: Wenda <wenni@microsoft.com>

* Include pfc_to_pg_map according to platform asic type obtained from
/etc/sonic/sonic_version.yml rather than specifying per hwsku

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Customize TC_TO_PRIORITY_GROUP_MAP and
PFC_PRIORITY_TO_PRIORITY_GROUP_MAP for barefoot

Signed-off-by: Wenda <wenni@microsoft.com>

* Unify PFC_PRIORITY_TO_PRIORITY_GROUP_MAP: remove "0":"0", "1":"1" as
these two pgs do not generate PFC frames.

Signed-off-by: Wenda <wenni@microsoft.com>
2018-10-17 14:10:34 -07:00
Ying Xie
f3ab8cdf9a [warm boot] syncd warm start could be individual warm start (#2147)
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-10-16 11:20:39 -07:00
Qi Luo
7d51f8363f Fix bug: if all containers killed, service stop will throw exception because no redis (#2139)
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
2018-10-12 08:39:06 -07:00
Joe LeVeque
f047756d7b [image config] Install Python tabulate library v0.8.2 via pip (#2130) 2018-10-08 18:36:37 -07:00
Kevin(Shengkai) Wang
ea4b4bd650 [mellanox]: Update recipe for hw-mgmt according to latest changes (#2128)
Update the hw-mgmt to latest release V.2.0.0060.
Update the related files according to the latest hw-mgmt.

Signed-off-by: Kevin Wang <kevinw@mellanox.com>
2018-10-08 18:33:44 -07:00
Samuel Angebault
6ba2f97f1e [devices]: Align flash partition at 1M (#2104)
Flashes used for the 7050QX-32 and 7050QX-32S have a fw issue.
The best option to solve the problem is to upgrade to a newer firmware.
However this can only be done while in memory and take 10 seconds.
Adding an upgrade mechanism is possible but would need more
consideration as flashing the firmware and reformating the flash will
exceed the fast-reboot requirements.

A quick mitigation is to align the ext4 partition that we create on
these vfat based system on a 4k boundary.
Here we chose 1M instead but it's the same.
Newer version of sfdisk do this automatically but the one in SONiC
today doesn't have this behavior.

This workaround will only reduce the pace of the flash health
degradation. The only long term fix is to flash the firmware.
2018-10-02 06:10:12 -07:00
Jipan Yang
dedd5624a0 Adapt to the new WARM_RESTART_TABLE table schema: change from restart… (#2083)
* Adapt to the new WARM_RESTART_TABLE table schema: change from restart_count to restore_count

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

* Update variable and function name to match restore_count name change

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

* Update swss submodule for warm restart schema change

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-10-02 06:08:26 -07:00
Ying Xie
c8e6b15504
[syncd] warn shutdown syncd process when warm boot is enabled (#2078)
* [syncd] warn shutdown syncd process when warm boot is enabled

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [warmboot] mount folder to hold warmboot temporary files

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* Fix a typo
2018-10-01 19:01:04 -07:00
Samuel Angebault
e72d63cf92 [arista] Update Arista drivers submodule (#2097)
* [arista] Update Arista drivers submodule

* Fix 7050qx32 fancontrol for kernel 4.9

* Fix 7060cx32s fancontrol for kernel 4.9

* Install python3-yaml for sonic config tests

* Fix 7260cx3 fancontrol for kernel 4.9

* Fix hwsku-init scripts and permissions

* Preserve old_config folder in boot0
2018-09-28 21:27:41 -07:00
Ying Xie
cfe01f19e4
Separate syncd service from swss service (#2051)
* [swss.sh] refactor ssh service script code

- Move checks and waits to helper functions.
- Remove early returns from code stream

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [swss.sh] Add debug log for service state changes

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [syncd] Separate out syncd service from swss service

Still make them start/stop/restart synchronously so existing scripts
continue working.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* Remove extra 'After' in swss service and remove syncd docker warm boot code

Syncd warm boot needs more thinking, we can put it back once the work
flow has been defined and ready for coding/testing.

* [syncd] syncd start/stop/restart shouldn't affect swss state

Semi-detach syncd service state change from swss:

- swss state change still chase syncd service to follow except warm boot
- syncd state change will only affect itself.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* add missing '{'
2018-09-24 16:35:01 -07:00
Taoyu Li
018b5899be [updategraph] add support to use preset config instead of default minigraph (#2050)
* [updategraph] add support to use preset config instead of default minigraph

* Fix variable case

* Remove default minigraph case

* Remove default minigraphs and add default_sku files
2018-09-21 22:01:10 -07:00
Samuel Angebault
7ece396592 Add SWI_DEFAULT support in boot0 (#2056)
Currently setting the next boot image is the same as setting a default
image.
With this change SWI_DEFAULT= will be considered the default image and
SWI= the next image.
When executing the boot0 SWI= will be overriden by SWI_DEFAULT= if it
exists and create in with the value of SWI= otherwise.
2018-09-20 00:19:40 -07:00
Taoyu Li
47c9542c63 Don't reuse init_cfg.json from old image during upgrade (#2036) 2018-09-11 21:26:51 -07:00
Jipan Yang
3f37b96de6 [swss]: Add support for swss docker warm restart (#1982)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-08-25 01:39:09 -07:00
lguohan
83f0822dde
[build]: run docker info at later stage in the build (#1984)
wait till docker service started

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-24 10:33:56 -07:00
lguohan
80c6453731
[swss]: simplify swss systemd service file (#1965)
move the swss service start/stop logic into /usr/local/bin/swss.sh

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-22 13:02:32 -07:00
yurypm
de0e892eaa [arista] Fix arista-convertfs script (#1961) 2018-08-21 15:19:31 -07:00
Samuel Angebault
788b20ee12 [arista]: Fix mount point discovery in boot0 for overlayfs (#1959)
On overlay filesystem the name of the mountpoint will also match in the
mount command for overlayfs as upperdir=
To prevent detecting the wrong partition we now look for space before.
This ensure that we match mountpoint and not devices in df and mount
outputs.
2018-08-21 00:58:16 -07:00
Shuotian Cheng
9413fa9a7b
[interfaces]: Move IP/MTU information from interfaces file into database (#1908)
- Move front panel ports and port channels MTU and IP configurations out of
the current /etc/network/interfaces file and store them in the configuration
database.

- The default MTU value for both front panel ports and the port channels is
9100. They are set via the minigraph or 9100 by default.

- Introduce portmgrd which will pick up the MTU configurations from the
configuration database.

- The updated intfmgrd will pick up IP address changes from the configuration
database.

- Update sonic-swss submodule

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2018-08-20 11:19:16 -07:00
Joe LeVeque
98082d56a0 [baseimage]: Download picocom version 3.1-2 from stretch-backports; No longer build from source (#1946) 2018-08-17 17:38:20 -07:00
lguohan
38f3eba695
[kernel]: upgrade kernel to 4.9.0-7 (4.9.110-3+deb9u1) (#1922)
* [kernel]: upgrade kernel to 4.9.0-7 (4.9.110-3+deb9u1)

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

* [mellanox]: Update SDK pointer for 4.9.0-7 kernel (#44)

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* Update arista drivers for 4.9.0-7 linux kernel (#43)
2018-08-16 08:56:56 -07:00
cawand
9f545456c9 Added picocom and pexpect to base image, for use in consutil (#1935)
Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
2018-08-15 21:41:12 -07:00
Volodymyr Samotiy
746ad967a4 [mellanox]: Fix post stop action in swss service template (#1928)
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2018-08-14 11:46:01 -07:00
lguohan
f3ca7c422f
[rsyslog]: use # to separate container name and program name in syslog message (#1918)
Previously use / to separate container name and program name.

However, in rsyslogd:

Precisely, the programname is terminated by either (whichever occurs first):

end of tag
nonprintable character
‘:’
‘[‘
‘/’
The above definition has been taken from the FreeBSD syslogd sources.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-12 22:23:58 -07:00
zhenggen-xu
d761630f73 Fix potential blackholing/looping traffic when link-local was used and refresh ipv6 neighbor to avoid CPU hit (#1904)
* Fix potential blackholing/looping traffic and refresh ipv6 neighbor to avoid CPU hit

In case ipv6 global addresses were configured on L3 interfaces and used for peering,
and routing protocol was using link-local addresses on the same interfaces as prefered nexthops,
the link-local addresses could be aged out after a while due to no activities towards the link-local
addresses themselves. And when we receive new routes with the link-local nexthops, SONiC won't insert
them to the HW, and thus cause looping or blackholing traffic.

Global ipv6 addresses on L3 interfaces between switches are refreshed by BGP keeplive and other messages.

On server facing side, traffic may hit fowarding plane only, and no refresh for the ipv6 neighbor entries regularly.
This could age-out the linux kernel ipv6 neighbor entries, and HW neighbor table entries could be removed,
and thus traffic going to those neighbors would hit CPU, and cause traffic drop and temperary CPU high load.

Also, if link-local addresses were not learned, we may not get them at all later.

It is intended to fix all above issues.

Changes:
Add ndisc6 package in swss docker and use it for ipv6 ndp ping to update the neighbors' state on Vlan interfaces
Change the default ipv6 neighbor reachable timer to 30mins
Add periodical ipv6 multicast ping to ff02::11 to get/refresh link-local neighbor info.

* Fix review comments:
Add PORTCHANNEL_INTERFACE interface for ipv6 multicast ping
format issue

* Combine regular L3 interface and portchannel interface for looping

* Add ndisc6 package to vs docker
2018-08-12 03:14:55 -07:00
Guohan Lu
7f7a2a019e [sshd]: regenerate ssh key if ssh_host_rsa_key is not present
ssh_host_key is removed in debian stretch. Use ssh_host_rsa_key
to decide if the host keys are present.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-11 21:38:33 +00:00
Volodymyr Samotiy
6a3c05f498 [mellanox]: Update recipe for hw-mgmt according to latest changes (#40)
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2018-08-11 09:09:03 +00:00
Guohan Lu
46b0847339 [baseimage]: use original stretch bash in the base image 2018-08-11 09:09:03 +00:00
paavaanan
ecfca8bf23 [devices]: DellEMC new platform support for z9264f - 64x100 (#26)
* Added new platform support DellEMC - Z92264f - 64x100

* Includes changes with Makefiles, sfputil, eeprom and default minigraph

* Led support for Z9264f platform

* Includes changes on default minigraph

* ipmitool implementation in pmon docker. platform_sensors script is inclued in pmon startup
2018-08-11 09:09:03 +00:00
Samuel Angebault
0f0e7ab7e8 Add support 4.9 support for 7260CX3 (#34) 2018-08-11 09:09:03 +00:00
Samuel Angebault
764a7edd83 [device]: Enable arista drivers for sonic-linux-kernel 4.9 (#21)
* Enable arista drivers

* Add vfat ascii charset in initramfs

* Update boot0.j2 for 4.9 kernel

* Fix i2c offsets in sensors.conf

* Bump sonic-platform-modules-arista submodule
2018-08-11 09:09:03 +00:00
lguohan
35ab7a6e09 [kernel]: upgrade linux kernel to 4.9.0-5 (4.9.65-3+deb9u2) (#8) 2018-08-11 09:09:03 +00:00
Guohan Lu
0827ed3b1a [baseimage]: install tacacs dependencies 2018-08-11 09:07:59 +00:00
Guohan Lu
540a87a9db [opennsl]: use opennsl kernel module based on kernel 4.9.0-3 2018-08-11 09:07:59 +00:00
Guohan Lu
8c72d8c6f2 [build]: insert overlay kmod for base image build 2018-08-11 09:07:59 +00:00
Guohan Lu
b03e974bb3 [baseimage]: let docker in base image use overlay fs instead of aufs 2018-08-11 09:07:59 +00:00
Guohan Lu
f64ffe8571 [baseimage]: build root filesystem via overlay fs instead of aufs 2018-08-11 09:07:59 +00:00
Guohan Lu
4d701ad037 [baseimage]: update base image from jessie to stretch 2018-08-11 09:07:59 +00:00
Joe LeVeque
7aefa185d4 Download newer version (8.23.0-2) of rsyslog from jessie-backports in hopes of eliminating memory leaks (#1912) 2018-08-09 23:56:41 -07:00
Taoyu Li
530e2dc4e1
Only keep most recent one in old_config (#1884) 2018-07-31 12:50:54 -07:00
Sagar Balani
5011622c6f [platform]: bfn intf: allow-hotplug for usb0 interface (#1889) 2018-07-30 09:54:05 -07:00
Rodny Molina
c3c8f7fd7f Fix for bash's memory-leak (#1879)
* Fix for bash's memory-leak

Memory leak is observed during the execution of scripts that make use of bash-arrays. In scenarios where the offending script is executed on a regular basis (e.g. fancontrol), the leaking process may end up consuming most of the system resources.

In this PR i'm replacing bash in all the contexts where it executes (both host and dockers). The official patch for this issue is here: https://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-040

* Fixing minor issue during code-merge

Signed-off-by: Rodny Molina <rmolina@linkedin.com>
2018-07-27 17:46:33 -07:00
pavel-shirshov
10b4bbcae8 [swss]: Start counter from swss container (#1875)
* sonic-quagga update. Don't spam with 'Vtysh connected from' message

* Enable counters inside swss container. systemd is not flexible enough to follow our business rules
2018-07-26 13:39:08 -07:00
Qi Luo
e3abf0c070
[docker] Exit if docker run fails (#1870) 2018-07-24 21:46:55 -07:00
Sagar Balani
93905d3d82 [barefoot]: Support for platforms based on Barefoot Networks' device (#1796)
* Initial commit

* Add Ingrasys S9180-32X platform dirver.

Signed-off-by: Wade He <chihen.he@gmail.com>

* Add bfn.service for init barefoot.

Signed-off-by: Wade He <chihen.he@gmail.com>

* [Barefoot Beta] Add some functions and fixed some bugs.

1. Update sensors.conf.
2. Fixed IO expander init.
3. Fixed PSU EEPROM.
4. Fixed MB EEPROM.
5. Add fancontrol and fan init.
6. Add SYS LED control (sys, fan, fan tray).
7. 2.5V compute and setup max and min.
8. Fixed typo MB eeprom delete address.
9. Remove coretemp to BMC.
10. Add active CPLD.
11. Modify SFP+ GPIO slave address.
12. Modify tmp75 Near Port 32 slave address.

Signed-off-by: Wade He <chihen.he@gmail.com>

* Add bfn script in /etc/init.d/

Signed-off-by: Wade He <chihen.he@gmail.com>

* Add bfn service in debian

Signed-off-by: Wade He <chihen.he@gmail.com>

* Fixed CPLD switch LED behavior.

Signed-off-by: Wade He <chihen.he@gmail.com>

* [Barefoot Beta] Fixed sensors and hwmon order.
1. Fixed ignore sensors Vbat.
2. Reorg hwmon order.

Signed-off-by: Wade He <chihen.he@gmail.com>

* Fixed PSU1 and PSU2 EEPROM order.

Signed-off-by: Wade He <chihen.he@gmail.com>

* initial barefoot checkin october 2017

* update refpoint

* update refpoints

* update refpoints to bf-master

* update refpoint

* update refpoint to tested version

* change to platform from asic

* update refpoint for swss

* revert core creation setting

* update refpoints

* add telnet for debug shell

* update refpoints 11/17/17

* missed change in file on previous merge

* [CPLD] Fixed blink LED issue.

* Fixed blink LED mask set error.

Signed-off-by: Wade He <chihen.he@gmail.com>

* Update bf_kdrv.c for 6.0.2.39

* Update bf kernel driver

* Add bf_fun kernel module.

* Update bf_tun for fixed build error

* merge with Azure master (12/12/17)

* update swss refpoint

* update refpoint of swss

* library dependency for stack unroll

* update refpoint to bf-master

* [DHCP relay]: Fix circuit ID and remote ID bugs (#1248)

* [DHCP relay]: Fix circuit ID and remote ID bugs

* Set circuit_id_len after setting circuit_id_len to ip->name

* [Platform] Add Psuutil and update sensors.conf for S9100-32X, S8810-32Q and S9200-64X (#1272)

* Add I2C CPLD kernel module for psuutil.
 * Support psuutil script.
 * Add voltage min and max threshold.
 * Update sensors.conf for tmp75.

Signed-off-by: Wade He <chihen.he@gmail.com>

* Allow multi platform support - infra (more changes to follow)

* update relative path to include platform for clarity

* [Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC for "branch 201712" (#1274)

- What I did
Add switch ASIC vendor: Nephos
Add Nephos platforms: Ingrasys S9130-32X, Ingrasys S9230-64X

- How I did it
Add platform/nephos files
Add platform/nephos/sonic-platform-modules-ingrasys submodule
Add device/ingrasys/x86_64-ingrasys_s9130_32x-r0 files
Add device/ingrasys/x86_64-ingrasys_s9230_64x-r0 files
Add SONiC to support Nephos platform
Update Head of submodule src/sonic-sairedis to "3b817bb"

- How to verify it
To build SONiC installer image and docker images, run the following commands:

make configure PLATFORM=nephos
make target/sonic-nephos.bin
Check system and network feature is worked as well

- Description for the changelog
Add switch ASIC vendor and platforms for Nephos

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

Signed-off-by: Sam Yang <yang.kaiyu@gmail.com>

* change source of files to github (from dropbox), update sairedis refpoint

* update refpoint of sairedis

* [centec] support CENTEC SAI 1.0 on 201712 branch and update e582-48x6q board   (#1269)

* [marvel]: Marvell's updates for SONiC.201712 & SAI v1.0 (#1287)

* update sairedis (fast-boot refpoint)

* fix syncd rpc make files

* update refpoint to handle Makefile change (no functional change)

* [Marvell]: Add support for SLM5401-54x device (#1307)

* Marvell's updates for SONiC.201712 & SAI v1.0
* [Platform] Add Marvell's SLM5401-54x for branch 201712

* [Broadcom]: Update Boradcom SAI package to 3.0.3.3-3 (#1312) (#1321)

- update Arista 7050-QX32S config.bcm file
- update Accton th-as771*-32x100G.config.bcm files

* update refpoint for Makefile chnage in sairedis

* update refpoint - sairedis

* update sairedis to older refpoint till we debug clean build

* export asic platform for build

* update refpoint for makefiles

* [PLATFORM] Centec update E582 driver fan/epprom/sensor (#1332)

* Upload wnc-osw1800

* Modify for Barefoot suggest

* Revert bfn-platform.mk

* Update bfn-platform-wnc.mk

Update parameter name

* Update parameter name

* initial support for WNC platform

* change switch name to "switch"

* Delete bf modules for rel_7_0

* Add Ingrasys S9180 platform

Signed-off-by: Wade He <chihen.he@gmail.com>

* Modify bfnsdk for Ingrasys S9180 platform

Signed-off-by: Wade He <chihen.he@gmail.com>

* Resolved the conflict.

* Resolved the conflict.

* Update submodule path and url.

* Delete unused file.

* Update PSU GPIO and EEPROM for psuutil.

* Add psuutil in S9180-32X

Signed-off-by: Wade He <chihen.he@gmail.com>

* update refpoint

* update refpoint

* change contact email, update refpoint

* cleanup and update kernel modules

* updates based on review

* update refpoint

* update refpoint

* fix typo in config script to check for platforms

* remove stale file

* resolve conflicts

* cleanup diffs with Azure repo and update SDK debs

* update refpoints to Azure

* address review comments

* revert refpoint of swss-common

* porting the build fix from master

* porting build fix from master

* Minor Fix

* Minor fix

* Temp to sde deb packages url

* Update sonic - sairedis,swss & swss-common refpoints

* Update git modules url path to bfn repo

* updated paths for swss, swss-common & sairedis

* Update refpoint for sonic-swss to local bfn repo

* Update URL for downloading sde debian packages

* porting fix links of debian git server from master

* porting fix links of debian git server from master

* [Ingrasys] Add platform support for S9280-64X with Barefoot ASIC

* Update ref points for swss, swss-common and sairedis repos

* Add sonic platform scripts for bfn montara/maverick

* Call sh scripts instead of calling py scripts

* Address upstream PR Comments (#10)

* Update bf-master with azure/master
* Undo changes to some files

* Revert "Address upstream PR Comments (#10)"

This reverts commit a7fddb83ca.

* Address upstream comments (#11)

* Remove all non bfn specific changes from upstream PR

* Revert "Address upstream comments (#11)"

This reverts commit 559132103e.

* Undo non bfn changes

* Little more cleanup

* Add back code removed in merge

* export CONFIGURED_PLATFORM

* Update sairedis and swss refpoints

* Address Upstream PR comment

* change deb pkg dependency from 3.16.0-4-amd64 to 3.16.0-5-amd64

* Set default tx queue len for usb0 interface to 64

* Update sairedis refpoint

* Update swss ref point

* Add bfn buffer cfg files for montara/maverick as per new design

* Update buffer cfg templates for bfn montara

* add non zero size to buffer profile
* add macro to generate port lists

* Update buffer cfg templates for bfn mavericks

* add non zero size for buffer profiles
* add port generation macro

* Add missing psmisc package

* BGP docker seems to be missing killall utility being used by fast-reboot script. This is causing non graceful termination of BGP sessions.
Adding psmisc to resolve this issue.

* Update swss ref point

* Update swss ref point

* Update sairedis refpoint

* Update sairedis refpoint

* Update sairedis refpoint

* Update sairedis refpoint

* Update refpoint for sairedis and swss

* sairedis to azure master
* swss to latest bfn bf-master

* Update gitmodules

Update url for sairedis to azure master

* Correct typo in bfn platform script

* Update swss and sairedis ref points

* Update swss ref point

* Address Review comments

* Update swws path in gitmodules to azure master
* update swss refpoint
* update base docker j2 file -remove psmisc package (could be a concern, would cause fast reboot to not work correctly will fix in another PR)

* Fix sairedis refpoint broken in by previous merge

* Remove psmisc from docker base image

* This will break fast reboot as killall is required for killing bgp process and initiating graceful termination of BGP session.
Will fix this in a seperate PR. Need this for SONIC upstreaming

* Address upstream comments

* Remove bmc interface from interface jinja template and sample output interfaces file
* Add bmc interface at boot time to network interfaces for bfn bmc based platforms

* Remove autogen ingrasys debian files

* Revert "Remove autogen ingrasys debian files"

* Buffer and qos config template fix for bfn platforms (#21)

SWI-1509 Buffer and qos config template fix for bfn platforms

* Fix qos config files for montara & mavericks (#22)

* Reference only ppg 3,4 in qos files as no profiles are attached to 0,1 in buffer configs

* Fix vs test (#23)
2018-07-24 10:23:12 -07:00
Andriy Moroz
dadc17d9e6 [Mellanox] Use MAC from EEPROM for PortChannels and VLAN Interfaces (#1793)
* Use MAC from EEPROM for PortChannels

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Use MAC from EEPROM in DEVICE_METADATA

Will affect MAC for VLAN interfaces

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Get MAC via decode-syseeprom

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* hw-management is now a service

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add error handling for MAC fetch process

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-07-23 15:51:03 -07:00
pavel-shirshov
c52fb762dd
Convert arp_update into a 'start-it-once' mode (#1864)
* Run arp_update just once, don't restart it. It will run continuosly with 5 min pauses
2018-07-18 13:04:57 -07:00
Joe LeVeque
2ccfefc919
[caclmgrd] Add a rule to allow all connections from localhost (#1858) 2018-07-13 10:27:47 -07:00
pavel-shirshov
f598397b07 Pavelsh/restart swss counters (#1854)
* sonic-quagga update. Don't spam with 'Vtysh connected from' message

* Restart counters in 60 seconds after manual swss restart
2018-07-12 01:52:19 -07:00
Joe LeVeque
a8af2e57f0 [sonic_debian_extension.j2] Create /var/cache/sonic/ directory (#1845) 2018-07-06 02:50:42 -07:00
Samuel Angebault
26afa348ea [device] Misc fixes for Arista platforms (#1844)
* Update sensors.conf for 7050QX-32 and 7050QX-32S

These two platforms were using a previous version of a kernel driver.
The new one names the i2c buses differently.
We therefore need to rename them here.

* Fix the default minigraph for the 7050QX-32S

The interface offset is invalid which makes sonic-cfggen generate an
invalid config_db.jon in rc.local.
This config then silently makes orchagent/syncd fail.

* Use the partition on which sonic-aboot.swi is

Instead of always assuming /mnt/flash, use the partition where the image
to be installed lies.
This allow for the image to be on any partition.
2018-07-05 14:30:57 -07:00
byu343
73a2e64d9f [arista]: Add platform support for DCS-7170-64C (#1718) 2018-07-03 17:10:11 -07: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
Joe LeVeque
301fc282a7 Add initial support for keeping track of and displaying reboot cause (#1812)
* [rc.local] Move all constants and functions to top of file; Unify style; Reword messages

* Add function to process reboot cause upon boot

* Simplify retrieval of SONIC_VERSION per comments

* Change wording
2018-06-28 05:29:14 -07:00
pavel-shirshov
d57bef55db Enable all counters: queue, port, and pfcwd (#1814)
* Enable all counters: queue, port, and pfcwd

* Fixed a small bug inside of sonic-utilities

* Another typo
2018-06-26 06:34:25 -07:00
pavel-shirshov
07ea9741fb Enable sairedis counter thread in 3 minutes after SONiC was started (#1805) 2018-06-22 19:53:51 -07:00
pavel-shirshov
3681cfa553
Use only active ports when applying buffers/qos configuration (#1787)
* First part of skipping not used port for qos configuration

* Use active ports only to set QoS parameters for 6100

* Add a test for qos.json.j2

* Add a test for Dell S6100 buffers.json template

* Update submodulre
2018-06-21 11:51:37 -07:00
Taoyu Li
b745c0bf1b Modify sudo lecture message to be more informational (#1800) 2018-06-21 10:41:50 -07:00
Taoyu Li
7557007761 [interface-config] Force eth0 before reconfiguration (#1802) 2018-06-21 10:40:28 -07:00
Denis Maslov
d82db79051 [caclmgrd] Translation of ACL Control Plane rules into iptables commands fixed (#1798)
Signed-off-by: Denis Maslov <Denis.Maslov@cavium.com>
2018-06-19 21:14:49 -07:00
Joe LeVeque
711be8f7da [caclmgrd] Heuristically determine whether ACL is IPv4 or IPv6, use iptables/ip6tables accordingly (#1767)
* [caclmgrd] Heuristically determine whether ACL is IPv4 or IPv6, use iptables/ip6tables accordingly

* Check all rules in table until we find one with a SRC_IP
2018-06-05 03:24:30 -07:00
Qi Luo
eee36719ea
Revert the feature: serial port watchdog service (#1766)
* Revert "[serial watchdog] remove serial watchdog service dependency to rc.local (#1752)"
* Revert "[service] introducing serial port watchdog service (#1743)"
2018-06-04 21:06:58 -07:00
Ying Xie
c1057177d9
[serial watchdog] remove serial watchdog service dependency to rc.local (#1752)
* [serial watchdog] remove serial watchdog service dependency to rc.local

When restarting this service in rc.local, the dependency causes an error
in syslog. Removing the dependency to mute the error log entry.

* remove lines with empty inputs
2018-05-30 18:29:43 -07:00
Taoyu Li
225b3e5b91
Fix a bug that default graph might be missing when generating minimal config (#1747) 2018-05-29 13:46:25 -07:00
Shuotian Cheng
46c2d340ff [docker_image_ctl]: Add --force while removing obsolete dockers (#1744) 2018-05-25 20:04:08 -07:00
Ying Xie
bb6ff62a32
[service] introducing serial port watchdog service (#1743)
* [rc.local] refactor platform identification code to separate function

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [rc.local] infrastructure to take action according to installer.conf

* [serial port watchdog] add service to watch serial port processes

Monitor serial port processes. Kill ones stuck for too long.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [rc.local] start watchdog on serial port specified by installer.conf

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-05-25 10:52:35 -07:00
lguohan
76d9de5d8e
[fast-reboot]: support encoded & gzipped minigraph in fast reboot (#1716)
* [fast-reboot]: support encoded & gzipped minigraph in fast reboot

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

* add acl.json and snmp.yml into fast-reboot

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-05-16 10:04:17 -07:00
Andriy Moroz
872f69a566 Update buffers config for Mellanox 27xx devices (#1649)
* Update buffers config for Mellanox 27xx devices

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Remove buffers template test for msn27xx

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-05-08 08:37:35 -07:00
Andriy Moroz
f3426e32dc Decrease usable space in log partition to 90% (#1648)
95 is too close to the edge because by default 5% is already reserved for super-user

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-04-30 11:18:56 -07:00
Prince Sunny
3993e58d1d [updategraph]: Keep updategraph service active after start (#1651) 2018-04-26 15:27:20 -07:00
Joe LeVeque
242f86d2dc [cli]: Update sudoers file to ensure no 'show' commands prompt for sudo password (#1632)
* [sonic-utilities] Update submodule

* Update sudoers file to ensure no 'show' commands prompt for sudo
2018-04-23 13:43:16 -07:00
Taoyu Li
8153ce7f05
[sudoer] Enable read-only commands for all users (#1558) 2018-04-19 11:25:08 -07:00
yurypm
2b9f877b8f [baseimage]: Fix tcpdmatch dependency (#1594)
* Fix tcpdmatch dependency

Issue: sonic_debian_extension.j2 uses tcpdmatch from src folder
       which is result of libwrap build
Fix: added tcpd.deb to build results and extract required files
     from build results

* Install libwrap0 and tcpd deb packages
2018-04-13 17:00:38 -07:00
byu343
27e57c06ab [devices]: Fix the issue of ma1 not found in boot0 for Arista (#1579) 2018-04-10 20:14:45 -07:00
Joe LeVeque
c626dc921f
Allow one Service ACL to bind to multiple services (#1576)
* [caclmgrd] Also ignore IP protocol if found in rule; we will only use our predefined protocols
2018-04-10 18:14:12 -07:00
byu343
ac2861e6d7 [Arista] Set MAC address of mangement port in initramfs (#1565)
* Set MAC address of mangement port in initramfs

* Fix boot0 for running in none-aboot environment
2018-04-06 10:48:13 -07:00
Kebo Liu
ed915e342a [build templates] Add environment variables for mellanox syncd container to support mellanox sdk and prm sniffer. (#1551)
modified:   files/build_templates/docker_image_ctl.j2

  Signed-off-by:  Kebo Liu kebol@mellanox.com
2018-04-02 20:24:59 -07:00
lguohan
11b0cd93e8
[baseimage]: bring down eth0 before restart networking (#1555)
cfggen generates new eth0 configuration. Need to first
clean existing configuration on eth0 before bring up
new configuration on eth0. Thus, we need to first bring
down eth0 before putting new configuration into /etc/network/
interfaces

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-04-01 21:36:43 -07:00
Taoyu Li
208ca43760
[hostcfgd] Fix a bug that tacacs key is wrongly modified (#1536) 2018-03-28 10:55:59 -07:00
Taoyu Li
4daf002859 [updategraph] Remove pending_initialization flag after first boot (#1538) 2018-03-28 09:06:48 -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
Volodymyr Samotiy
da42bd75a8 [config]: Apply CRM default config to DB on start (#1534)
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2018-03-27 13:37:02 -07:00
padmanarayana
dba35eebb1 [baseimage]: Updategraph during NOS->SONiC migration (#1521) 2018-03-23 15:16:54 -07:00
sihuihan88
6d592d8329 [build_template]: combine the init config write into one block (#1513)
Signed-off-by: Sihui Han <sihan@microsoft.com>
2018-03-19 17:44:16 -07:00
lguohan
56efb41f55
[image]: remove quote for build_version in /etc/sonic/sonic_version.yml (#1512)
commit 0965b33 added quote to build_version in /etc/sonic/sonic_version.yml,
e.g., sonic_version : '20170104.10'. scripts to use the $sonic_version need
to remove the quote.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-03-19 00:53:47 -07:00
Joe LeVeque
e6278c1e0e
[radv] Rename service unit file Jinja template to radv.service.j2 (#1480)
- Service unit file not getting generated because I changed the docker
    container name from 'router_advertiser' to 'radv', however I didn't
    rename the service unit file template name to match. However,
    slave.mk generates a service file for every docker based on its
    container name, and since there was no matching 'radv.service.j2'
    template file, this file stopped getting generated and therefore
    the docker container was never getting started.

  - Also add swss.service to 'Requires'
2018-03-09 23:01:49 -08:00
Taoyu Li
e84e093dea
Move all minigraph-related action from rc.local to updategraph (#1452)
- Move all minigraph-related action from rc.local to updategraph
- updategraph service is now after database. All feature services are now after and depending on updategraph
2018-03-09 17:17:08 -08:00
padmanarayana
02b62ac9bb [fast-reboot]: Support OS9 -> SONiC fast-reboot migration (#1414)
* Support OS9 -> SONiC fast-reboot migration

* Address review comments. Update NOS mac in EEPROM and net.rules for eth0

* Address review comments. Update sonic-platform-modules-dell to fac81d...

* Fix script for POSIX compliance
2018-03-08 16:42:41 -08:00
Samuel Angebault
e18e15f31b [Aboot] refactor boot0.j2 for Aboot bootloader (#1445)
Now properly differenciate the image installation and the kexec
operations. This is useful for fast-reboot operations.

Minor updates include
 - better command line management
 - using partition UUID in the command line
2018-03-07 15:28:14 -08:00
sihuihan88
7639cc1b53 [pfcwd]: add flag to enable pfc wd on start (#1429) 2018-03-05 23:55:37 -08:00
Taoyu Li
09f2385a15 [hostcfgd/tacacs] obfuscate tacacs credentials in syslog (#1444) 2018-03-02 21:24:01 -08:00
lguohan
a9d2e13627
[image]: prevent password related command into syslog (#1450)
* [image]: prevent password related command into syslog
2018-03-02 21:21:25 -08:00
Ying Xie
720c71399c
Improve: buffer configuration infrastructure (#1403)
* [sonic build] Define folder macro for target folder /usr/sonic/share/templates

* [sonic-cfggen] allow templates to include from common folders

- Allow templates to include files under /usr/share/sonic/templates
- Allow templates to include files in the same folder as the root template

* [Buffer config] install the buffer configuration template

* [Arista7260cx3] Add buffer configuration for Arista7260CX3 T0 topology

- pg profile look up table is incomplete. Currently contains T0 default
  values.

* [Arista7260cx3] Adding QoS configuration

* Address review comments

1. Stop generating ingress pg configuration for lossless pgs.
2. Stop putting ports into speed sets, put all ports in one set.
3. Remove ingress lossless profiles.
4. Added some tailing '-' back to remove leading spaces.
2018-02-27 12:15:56 -08:00
pavel-shirshov
43a98393e9
Error fix: The function can't have empty body in bash (#1420) 2018-02-26 17:42:20 -08:00
pavel-shirshov
ec537be065
[Submodule update]: Update submodule sonic-utilities (#1407)
* Update submodule sonic-utilities

* Copy fast-reboot json dumps from /host filesystem

* Update sonic-utilities to latest

* Fix typo
2018-02-26 11:23:29 -08:00
lguohan
005a59fc4d
[image]: Upgrade SONiC stack to use SAI version to v1.2 (#1336) 2018-02-22 19:36:39 -08:00
nikos-li
5a0e42307f [baseimage]: Suppress sonic WARNING rsyslogd-2007: action 'action 6' suspended syslog message (#1400) 2018-02-22 19:32:18 -08:00
Taoyu Li
04b694454a
[sonic-cfggen] Remove machine.conf info and add get_system_mac support (#1397)
[sonic-cfggen] Remove machine.conf info and add get_system_mac support
2018-02-20 14:38:13 -08:00
lguohan
f657df7588
[baseimage]: enable auto logout for console (ttyS*) sessions (#1398) 2018-02-20 09:36:54 -08:00
Joe LeVeque
6ccd1601b8
Modify Arista service ACL solution to listen to ACL changes in ConfigDB (#1385) 2018-02-12 11:10:01 -08:00
byu343
ecf5c8d311 ssh and snmp allow list (#1363)
- Service ACL framework for Arista platforms
2018-02-08 17:43:52 -08:00
Ying Xie
2b48886eec
[config] activate qos configuration only when buffers configuration exists (#1378) 2018-02-07 13:38:09 -08:00
padmanarayana
0d0752e099 Reduce SONiC migration partition from 8G to 1G. (#1343)
* Reduce SONiC migration partition from 8G to 1G.

* Changes to create 1G partition with ability to resize post migration.

* Remove redundant changes in varlog

* Use findfs to interpret root. Move resize in case cmdline params are reordered
2018-02-07 22:07:01 +08:00
kaiyu22
d0dd80c6d3 [Nephos] Update SDK version to 3.16.0-5 in swss.service.j2 (#1377)
- What I did
Updating SDK version from 3.16.0-4 to 3.16.0-5

- How I did it
Updating SDK version in files/build_templates/swss.service.j2

- How to verify it
Checking command "config load_minigraph" without errors

- Description for the changelog
Updating SDK version from 3.16.0-4 to 3.16.0-5 in swss.service.j2

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

Signed-off-by: Sam Yang <yang.kaiyu@gmail.com>
2018-02-07 20:09:14 +08:00
Ying Xie
58c479d3af
[boot] log rc.local execution in syslog (#1375) 2018-02-06 14:59:15 -08:00
Joe LeVeque
162089dd9e
[caclmgrd] Prevent service from blocking system boot indefinitely (#1362) 2018-02-01 15:15:39 -08:00
Qi Luo
358949b4e5
Upgrade linux-image version (#1294)
* Upgrade linux-image version
* Add missing dependency of igb
* Fix mft build rule
* Add missing dependency of ixgbe
* [Broadcom]: Update OpenNSL modules to be compatible with kernel 3.16.0-5 (#3)
* [Nephos] Update SDK version to support new kernel module 3.16.0-5 (#4)
* [mellanox]: Update URL for SDK (#5)
2018-01-31 11:39:48 -08:00
Ying Xie
673c82f9a3
[dhcp_relay] complete the dhcp_relay service dependency towards teamd (#1356)
This change makes sure that the dhcp_relay service will be started
after teamd service is started from a stopped state.
2018-01-30 17:30:38 -08:00
Joe LeVeque
a36527a6a5
Store ConfigDB init indicator boolean value as 1/0 in Redis to be language-agnostic (#1352) 2018-01-30 15:04:52 -08:00
Ying Xie
474b3f08e7
[dhcp_relay] make dhcp_relay service depends on teamd as well (#1348)
When teamd service restarted, the port channels will be recreated.

Dhcp relay service needs to be restarted after that to listen on the
right port channels.
2018-01-29 16:26:54 -08:00
Andriy Moroz
58d8302b53 Buffers configuration update on port speed change (#1345)
* Move buffer configuration to ConfigDB

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Converted Dell and Arista configs

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add buffer configs for ACS-MSN2740

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Updated buffers template

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fixed j2 unit test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config for Force10-S6100

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update VS docker to support speed and buffers test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config generation

- fixed support of sonic-to-sonic install

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update submodules pointers for buffers config

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-01-29 08:11:05 -08:00
Ying Xie
2b91c9681d Revert "Buffers configuration update on port speed change (#1250)" (#1340)
This reverts commit 814e50fd5e.
2018-01-26 10:13:43 -08:00
Andriy Moroz
814e50fd5e Buffers configuration update on port speed change (#1250)
* Move buffer configuration to ConfigDB

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Converted Dell and Arista configs

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add buffer configs for ACS-MSN2740

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Updated buffers template

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fixed j2 unit test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config for Force10-S6100

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update VS docker to support speed and buffers test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config generation

- fixed support of sonic-to-sonic install

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-01-26 08:09:31 -08:00
pavel-shirshov
8cfa223ef9 [scripts]: Fix issues with checking status of the DB. Use one approach everywhere. (#1323) 2018-01-18 19:55:11 -08:00
Joe LeVeque
134707f822
Move platform-specific hardware plugin base packages to sonic-platform-common submodule (#1301) 2018-01-17 17:11:31 -08:00
pavel-shirshov
22a3e4817a Run docker containers with /tmp and /var/tmp mounted to tmpfs (#1313) 2018-01-16 23:20:13 -08:00
lguohan
b8a0a10e8d
[baseimage]: add mkfs.ext3 and fsck.ext3 in initrd to support ext3 partition (#1306) 2018-01-16 10:50:43 -08:00
Joe LeVeque
0fffa6c63b
Add caclmgrd and related files to translate and install control plane ACL rules (#1240) 2018-01-09 17:55:10 -08:00
lguohan
15d433d975
[build]: allow to use http(s) proxy in the build (#1265)
* allow to use http(s) proxy in the build

To enable this, use following command
http_proxy=[your_proxy] https_proxy=[your_proxy] make
2017-12-23 23:34:15 -08:00
kaiyu22
63de341dd6 [Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC (#1245)
* Add switch ASIC vendor and platforms for Nephos

- What I did
Add switch ASIC vendor: Nephos
Add Nephos platforms: Ingrasys S9130-32X, Ingrasys S9230-64X

- How I did it
Add platform/nephos files
Add platform/nephos/sonic-platform-modules-ingrasys submodule
Add device/ingrasys/x86_64-ingrasys_s9130_32x-r0 files
Add device/ingrasys/x86_64-ingrasys_s9230_64x-r0 files
Add SONiC to support Nephos platform

- How to verify it
To build SONiC installer image and docker images, run the following commands:
make configure PLATFORM=nephos
make target/sonic-nephos.bin
Check system and network feature is worked as well

- Description for the changelog
Add switch ASIC vendor and platforms for Nephos

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

Signed-off-by: Sam Yang <yang.kaiyu@gmail.com>

* Advance sonic-sairedis submodule to include #271 (Add Nephos ASIC)
2017-12-22 10:04:29 -08:00
Joe LeVeque
c898a04b28
[sudoers] Add 'docker ps' to READ_ONLY_CMDS (#1259) 2017-12-21 11:03:08 -08:00
Marian Pritsak
ab2d066a4d [snmp]: Save S/N in state DB prior to starting service (#1246)
snmp.service needs to read chassis serial number for one of its mibs.
We save this value in state DB so that it is accessible from container.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-12-19 16:02:26 -08:00
Liuqu
dce6d3536b [TACACS+]: Add configDB enforcer for TACACS+ (#1214)
* [TACACS+]: Add configDB enforcer for TACACS+

* hostcfgd - configDB enforcer for TACACS+, listen configDB to
  modify the pam configuration for Authentication in host
* Add a service script for hostcfgd

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>

* [TACACS+]: Generate conf file by template file

* Generate common-auth-sonic and tacplus_nss.conf by jinja2 template

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
2017-12-12 03:45:44 -08:00
Liuqu
8383b1f256 [TACACS+]: Add support for TACACS+ Authentication (#1019)
* [TACACS+]: Add support for TACACS+ Authentication

* pam_tacplus - A TACACS+ protocol client library and PAM module to
  supports core TACACS+ functions for AAA.
* nss_tacplus - A NSS plugin for TACACS+ to extend function getpwnam,
  make the TACACS+ authenticated user which is not found in local
  could login successfully.

* Add make rules for pam_tacplus and install script
* Add a patch for pam_tacplus to disable pam-auth-update pam-tacplus
  by default
* Add a patch for pam_tacplus to inlucde and build nss_tacplus

  Signed-off-by: chenchen.qcc@alibaba-inc.com

* [TACACS+]: Add nss-tacplus as a separate src repo

* Separate nss-tacplus from pam-tacplus, modify tacacs.mk and
  makefile, add a patch to adapt to the new user map profile.
* Use the lastest stable version for pam-tacplus, add a dependent
  package in sonic-salve, add two patches to fix build error.
* Add scripts to disable tacplus by default.
* Remove hostcfgd service file

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>

* [TACACS+]: Fix nss-tacplus filter some valid TACACS+ username

* The NAME_REGEX for username check in plugin nss-tacplus is
  the ANSI version "^[0-9a-zA-Z_-\ ]*$", but the regular expression
  in /etc/adduser.conf is not defined as ANSI version. To avoid
  nss-tacplus filter some valid TACACS+ username, remove username
  check.

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
2017-12-07 03:36:17 -08:00
Prince Sunny
744927acd3
Derive varlog size based on total flash size (#1209) 2017-12-06 15:13:18 -08:00
lguohan
b907e4e9f5
[vs]: add vlan configuration support in virtual switch (#1200) 2017-11-30 14:59:25 -08:00
Samuel Angebault
7f25b94378 [aboot]: Add setfacl in the initramfs (#1185)
Arista platforms need the filesystem ACLs to be removed on boot to
prevent invalid permission to be set for new files.
2017-11-24 17:30:11 -08:00
Taoyu Li
617b3e43b1
Add service to config hostname based on configdb (#1174) 2017-11-22 14:36:25 -08:00
Andriy Moroz
6d0329af3d Move QoS configuration to Config DB (#1178)
* Move Mellanox QoS configuration to config DB

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Move qos.json to hwsku subfolder

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Remove copying of old qos config

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update WRED threshold values

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* hwsku2

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fix syntax error in json

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add qos config for some Dell and Arista platforms

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fix inital qos config on clean boot

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Updated swss-common and swss pointers (QoS in Config DB)

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2017-11-22 08:58:22 -08:00
Samuel Angebault
21764008da [Aboot] Declare flash_size for all platform (#1171)
The flash_size parameter can then be used to compute the varlog_size
2017-11-22 02:58:20 -08:00
Taoyu Li
c5eba7dd34 [baseimage]: Fix racing condition between updategraph and rc.local (#1175) 2017-11-22 00:51:05 -08:00
lguohan
df529efef7
[baseimage]: fix mac address calculation on mellanox and centec platform (#1166) 2017-11-20 10:05:08 -08:00
Joe LeVeque
cea87e985c
Add docker-router-advertiser to support IPv6 router advertisements (#1103) 2017-11-14 14:40:15 -08:00
Prince Sunny
803c263331 [baseimage]: Subnet route added for management interface (eth0) - "fixes #1023" (#1142)
* Added management subnet route to route table-default in kernel.

* Added sample output to interface file
2017-11-14 08:19:24 -08:00
Ying Xie
764cb913f1
[Arista7260cx3] Increase /var/log partition size to 4G (#1140) 2017-11-10 15:47:38 -08:00
Haiyang Zheng
a69b353630 [interfaces.j2] Get mtu value from config DB if provided (#1128)
Signed-off-by: Haiyang Zheng <haiyang.z@alibaba-inc.com>
2017-11-10 13:54:31 -08:00
Marian Pritsak
c64d423fec [rc.local]: Fix init_cfg.json (#1129)
If device MAC is added to init_cfg.json, it has to be done using
intermediate file. We cannot redirect to same file while trying to read
from it because it will be truncated first.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-11-08 08:50:22 -08:00
Taoyu Li
f7c39720f7
Restart ntp after ntp-config (#1106)
* Restart ntp after ntp-config
* Remove ntp dependency to ntp-config
2017-11-07 14:51:07 -08:00
lguohan
1ce9b85e3c
[init]: save the initial switch mac to config db (#1125)
* [init]: save the initial switch mac to config db

Save the initial switch mac to config db DEVICE_METADATA|localhost entry.

* update sonic-swss submodule
2017-11-06 23:40:27 -08:00
JipanYanga
7406d3709b [configdb]: Add support for vlanconfd and intfconfd (#1063)
* Add support for vlanconfd and intfconfd

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

* Change name to vlanmgrd and intfmgrd

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

* Add missing vlan_members for parse_dpg result

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

* Remove cfgmgr debug CLI from image

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

* Update swss and swss-common submodules for VLAN trunk support

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2017-11-05 22:37:16 -08:00
JipanYanga
84cbfd5bbc [configdb]: Store switch mac to configDB switch table (#1108)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2017-11-05 00:31:29 -07:00
Samuel Angebault
ca214b947c [arista]: Bump sonic-platform-modules-arista submodule (#1111)
* Bump sonic-platform-modules-arista

Improves i2c performance for xcvrs
Fix the led_plugin by ignoring unknown ports
Miscellaneous improvements

* Fix index column for Arista-7260CX3-D108C8

* Fix flash permissions for Arista platforms

The ext4 flash uses acl to properly handle permissions in EOS.
Aboot isn't built with this support and therefore can't be used
to set the flash permissions. It has to be deferred in sonic initrd.
2017-11-03 15:22:05 -07:00
Shuotian Cheng
06c0f7d2e8 Revert "[ntp]: Restart ntp after ntp-config (#1098)" (#1102)
This reverts commit c832f2af62.
2017-11-01 18:40:33 -07:00
Taoyu Li
c832f2af62 [ntp]: Restart ntp after ntp-config (#1098) 2017-10-31 22:20:18 -07:00
byu343
d7d6c41184 [Arista]: Fix the udev waiting in networking start (#1093)
* [Arista]: Fix the udev waiting in networking start

This change is to fix the issue in https://github.com/aristanetworks/sonic/issues/16
For the checking condition used, it is only applied to Arista switches

Signed-off-by: Boyang Yu <byu@arista.com>

* [Arista]: Correct for PR comments

Signed-off-by: Boyang Yu <byu@arista.com>
2017-10-30 18:04:40 -07:00
Taoyu Li
a7ea0556c8 [updategraph]: Support a special value to use empty configuration (#1086)
When updategraph service is enabled, a special value 'default'
from DHCP response will now initialize the system with an empty
configuration instead of existing minigraph.

A DHCP response without option 224 will remain the current behavior
of skipping graph update and use existing default minigraph.
2017-10-27 18:01:02 -07:00
Joe LeVeque
37dc7bd478 [interfaces]: Set hwaddr of VLAN interfaces to system MAC upon creation (#1042) 2017-10-16 17:36:21 -07:00
Hnydyn Nazar
118c2dd39d [ntp]: Fix NTP sync while using DHCP (#1035) 2017-10-13 17:08:35 -07:00
Shuotian Cheng
dbced4fb77 [snmp]: Add swss dependency for snmp service (#1034)
- snmp service needs swss to be ready to get the port counter map

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2017-10-12 00:28:16 -07:00
Marian Pritsak
ecd99c73d1 [swss]: Flush flex counter DB in swss_serivce.j2 (#1029) 2017-10-10 12:49:06 -07:00
lguohan
dc0f3ceb5c add version tag for the docker images (#1021)
docker images are also tagged with the same image version.
2017-10-08 02:10:14 -07:00
Joe LeVeque
8a305ce9c9 [sonic-utilities]: Build as Debian package once again (revert change to wheel) (#1018) 2017-10-06 12:46:47 -07:00
Joe LeVeque
1cd9818fe9 [build]: sonic-utilities package depends on swsssdk; build as wheel and add build dependency (#1011)
* [build]: sonic-utilities package now depends on swsssdk; add build dependency

* Now building sonic-utilities Python package in wheel format

* Update sonic-utilities submodule

* Change output wheel name to match proper format
2017-10-04 19:50:39 -07:00
Volodymyr Samotiy
763205ff7d [config]: Fix management interface configuration (#966)
* [config]: Fix management interface configuration

* [config]: Fix management interface configuration

* Fix comments
2017-09-20 23:55:50 -07:00
Prince Sunny
72f5d6bcb7 [interfaces]: Change MTU value to 9100 (#967)
* Updated MTU to the widely used value with other devices
2017-09-19 19:29:00 -07:00
ravijo2
458093fee5 Framework to plugin Organization specific scripts during ONIE Image build (#951)
* Framework to plugin Organization specific scripts

* Framework to plugin Organization specific scripts

* Framework to plugin Organization specific scripts

* add getopt option to organization script
2017-09-19 16:23:31 -07:00
padmanarayana
6935e00909 [build/onie installer] Install grub for SONiC post migration from another NOS (#949)
* Install grub for SONiC post migration from another NOS

* Install grub from bundled debian package instead of using ONIE's. Address review comments
2017-09-17 11:41:29 -07:00
Ying Xie
56ae5edc7f [service template] Starting new docker when HWSKU change is detected (#946)
Existing dockers has paths mounted according to the HWSKU. When HWSKU
changes, these dockers need to be destroyed and recreated with the
correct paths mounted.
2017-09-14 08:43:02 -07:00
Taoyu Li
c9cc7aea41 [configdb] Migrate minigraph configurations to DB (#942)
Modify minigraph parser output format so it fit DB schema
Modify configuration templates to fit new schema
Systemd services dependencies are modified so database starts before any configuration consumer
2017-09-12 14:13:27 -07:00
Marian Pritsak
8f1ac5d5ec [rsyslog]: Use timegenerated instead of timestamp (#944)
* [rsyslog]: Use timegenerated instead of timestamp

This is useful when rsyslog is used to put markers generated on other machines.
This way all messages will have a timestamp from a single system.

* [rsyslog] Use subseconds from local machine
2017-09-08 18:25:25 -07:00
Marian Pritsak
e418675ba5 [rsyslog]: Use SONiC template in containers (#940) 2017-09-07 13:01:20 -07:00
lguohan
116ba4b180 [baseimage]: allocate varlog disk in the initramfs stage (#936)
moving to initramfs unifies disk allocate on different platforms.
use fallocate instead of dd to speed up the disk allocation.

By default, mkfs.ext4 has -E discard option which discards the blocks
at the mkfs time, also speed up the initialization time.
2017-09-06 20:07:32 -07:00
padmanarayana
2d3b064437 [image]: build sonic-broadcom.raw image for sonic conversion from ftos (#901)
1. "make target/sonic-broadcom.raw" will create the compressed dd'able image.
2. This will also update the grub config files (device/dell/*/nos_to_sonic_grub.cfg) with the image versions.
2017-08-27 20:13:38 -07:00
Oleksandr Ivantsiv
7c75030cea [mlnx-fw-upgrade]: Define required FW version in build time. (#902)
- Do not query required FW from file.
2017-08-22 08:08:07 -07:00
byu343
a92f5a9ffe Add arista-net initramfs hook (#899) 2017-08-19 21:32:10 -07:00
Joe LeVeque
178fc032ae [sfputil]: Add support for SFP presence, low-power mode and reset (#877)
- Update sfputil plugins for Dell FORCE10-S6000, Arista 7050-QX-32, 7050-QX-32-S
2017-08-11 11:36:32 -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
Taoyu Li
a2fe0212be [ConfigDB] Move all BGP configuration into DB (#861)
- BGP data read from minigraph.py now match DB schema
- BGP templates are updated
- bgpcfgd can now deal with runtime neighbor create/delete
2017-08-08 16:23:58 -07:00
Samuel Angebault
97e4360d9b [platform] Add support for Arista DCS-7260CX3-64 (#863)
* Update sonic-platform-modules-arista submodule

* Update boot0 to handle DCS-7260CX3-64

* Add sys eeprom plugin for DCS-7260CX3-64

* Add sfputil plugin for DCS-7260CX3-64

* Add sensors config for DCS-7260CX3-64

* Add Arista-7260CX3-64 HwSku port_config

* Handle slow flash partition re-read

* Add minigraph.xml for DCS-7260CX3-64 64x100G
2017-08-05 20:56:32 -07:00
Taoyu Li
b6efe438b5 Introduce ConfigDB (#808)
* [cfggen] Support reading from and writing to configdb
* [bgp] Move bgp_admin_state to configdb, support dynamic admin state change
* [sonic-utilities] Adapt configDB for admin status, support config save and config load
2017-08-01 19:02:00 -07:00
Oleksandr Ivantsiv
382d52843f [mellanox]: Move FW upgrade script to base image. (#849)
- Download files to target/files directory (instead of target/debs)
- Clean python-weels log files
2017-07-28 10:57:51 -07:00
Taoyu Li
829a205b85 [config services] Not to block syslog service on minigraph update (#850) 2017-07-27 19:52:22 -07:00
Joe LeVeque
f49cac086f Remove extra trailing newlines at EOF (#804)
Files now end with a single newline
2017-07-12 20:54:37 -07:00
pavel-shirshov
a78d3b1a9f [base]: allow-hotplug is enough in /etc/network/ifaces. auto is not required (#781) 2017-07-05 13:50:21 -07:00
sihuihan88
3268946de5 [BGPD]: add bgp dynamic neighbor configuration (#708)
* add bgp dynamic neighbor configuration

* [bgpd]: update as comments

* update as comment

* update to deployment_id_asn_map

* minor change
2017-06-21 18:52:50 -07:00
Taoyu Li
95906a6490 [installer] Copy old config files rather than only minigraph (#730) 2017-06-21 11:02:25 -07:00
lguohan
493edb4584 [image]: add debian security update in the apt source list (#724) 2017-06-19 22:16:05 -07:00
lguohan
4a780f4a6a [submodule]: update swss/sairedis/swss-common submodule (#716)
fix bug for logrotate sairedis log
2017-06-18 16:54:13 -07:00
Qi Luo
88b98c7b89 [image]: Update login message (#706) 2017-06-14 15:18:02 -07:00
Shuotian Cheng
8843c6f192 [logrotate]: Add /var/log/swss/*.rec to logrotate target (#703)
SwSS record files in /var/log/swss/ folder get larger and
larger and were not rotated. Add them here to rotate these files.
2017-06-14 07:05:34 -07:00
Taoyu Li
5e6620e19e [bgp] Save bgp admin state (#690)
* [bgp] Save admin state and set default state to shutdown

* Set default behavior to no shutdown

* Add build option SHUTDOWN_BGP_ON_START

* Script change for default admin state to be on

* Address CR comments to bgp_neighbor script

* Fix script bug
2017-06-12 11:05:22 -07:00
Taoyu Li
cefd024c26 Kill dhclient when reconfig interfaces (#683) 2017-06-08 01:50:04 -07:00
lguohan
ea4dfa48c9 Revert "[baseos] Avoid disconnecting mgmt when re-cfg interfaces" (#681)
This reverts commit e74196cd75.
2017-06-07 10:37:49 -07:00
Taoyu Li
e74196cd75 [baseos] Avoid disconnecting mgmt when re-cfg interfaces (#553)
* [baseos] Avoid disconnecting mgmt when recfg interfaces

* Kill dhclient after interfaces-config
2017-06-06 17:12:26 -07:00
lguohan
b968cf73a1 [aboot]: use pipe to extract docker archive to save disk space (#677) 2017-06-06 10:41:06 -07:00
Samuel Angebault
7d33387e7c [platform] Complete support for Arista-7050QX-32S (#661)
* Bump sonic-platform-modules-arista submodule

* Use sonic_sfputil plugin from the arista library

* Fix undefined variable varlog_size

* Prevent minigraph.xml to be removed from the flash

* Update DCS-7050QX-32 sensors config
2017-06-02 01:31:53 -07:00
Joe LeVeque
e0d22acc9e [DHCP Relay]: Wait for all interfaces to come up before starting DHCP relay (#660) 2017-06-01 18:38:33 -07:00
Joe LeVeque
b0c99338a1 [Aboot]: Add '--numeric-owner' when untarring docker filesystem to preserve original owners (#653) 2017-05-31 19:27:47 -07:00
lguohan
17f0633143 [image]: change mtu to jumbo size 9216 by default (#641) 2017-05-28 00:36:34 -07:00
Taoyu Li
bd52f411ff [interfaces]: Use default table instead of main table for forced_mgmt_routes (#635)
If routes are inserted in main table, they wont' be overwritten
by the routes learned via BGP. Then the routes will be missing
from the ASIC.
Thus a default table is used so that control plane and data plane
routes are isolated and could be configured independently.
2017-05-27 01:14:58 -07:00
Joe LeVeque
714e45f0bb Cron jobs log to /var/log/cron.log once again (#620)
- Now that logrotate is a cron job that runs every minute, it was polluting syslog
 - Also shrink max size of less-important logs to 50MB and rotate them daily by default
2017-05-23 10:29:54 -07:00
Joe LeVeque
72b8284e57 Update sonic-utilities submodule; Add commands to sudoers as necessary (#608) 2017-05-17 13:02:17 -07:00
Joe LeVeque
910e666798 Add /usr/bin/generate_dump to sudoers file; Update sonic-utilities submodule (#603) 2017-05-15 14:32:39 -07:00
Taoyu Li
7663da9510 Disable updategraph after first time (#592) 2017-05-11 12:37:14 -07:00
Joe LeVeque
6393afdb0b [sonic-utilities]: Update submodule (#581) 2017-05-10 12:39:00 -07:00
Qi Luo
6cab3bc852 Add rotation feature to docker logs (#563)
* Add rotation feature to docker logs

* Fix: only apply log rotation for json-file log driver
2017-05-05 17:44:36 -07:00
lguohan
72a039b1de [aboot]: refactor boot0.j2 to support one image SONiC-to-SONiC upgrade (#557)
* [aboot]: refactor boot0.j2 to support one image upgrade

* support sonic_installer in aboot
2017-05-01 15:16:33 -07:00
Marian Pritsak
d597418b6c [rc.local]: Copy saved minigraph if available. (#533)
* [rc.local]: Copy saved minigraph if available.

In case of sonic-to-sonic update old image stores minigraph under /host
directory. Upon first boot this minigraph will be used by new image to
save configuration.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-04-26 11:41:18 +03:00
lguohan
147b89fa43 [sonic-utilities]: update sonic-utilities to use redis-load-dump to dump redis db data (#530) 2017-04-25 11:07:54 -07:00
Joe LeVeque
f28790ce9a [System logs]: Fix logrotate bugs (#535)
- rsyslog logs were being rotated regardless of whether they exceeded their maixmum size. This was due to "-f" flag passed to logrotate in cron job.

- After rotation, /var/log/syslog was never written to again. Instead, logs were written to /var/log/syslog.1. This was due to rsyslog not properly closing the file descriptor to the pre-rotated log.

- Also brought back time-related rotation via the new(er) maxsize option, which performs a boolean OR operation. If the log exceeds the maxsize OR the log hasn't been rotated in the specified, it will be rotated. Using the older size option, the time-based rotation was ignored.

- Also addresses issue #528
2017-04-24 17:55:05 -07:00
lguohan
34adb715df [oneimage]: use loop variable to get image dir in /proc/cmdline for aboot image (#534) 2017-04-24 13:39:29 -07:00
Andriy Moroz
b549adc36c [image]: SONiC-to-SONiC update (#464) 2017-04-21 17:23:36 -07:00
Joe LeVeque
6c202919b3 [System logs]: Eliminate duplicate log messages and attempt rotation more frequently (#520)
* Rename 'ACSFileFormat' -> 'SONiCFileFormat'

* Rename '00-acs.conf' -> '00-sonic.conf'

* Add logrotate.d and systemd-journald config files to image

* Log all SONiC process messages to /var/log/syslog; prevent duplicate logging to /var/log/messages

* Do not redirect cron and daemon logs to their own files, let them log to /var/log/syslog

* Log all teamd messages to /var/log/teamd.log; Add more SONiC program names to SONiC rules clause

* Remove duplicate code by condensing quagga programs into a list; Fix teamd log rule

* Kernel and LPR messages no longer getting duplicated to their own log files

* Now calling logrotate every minute via cron job

* Need full path to logrotate in cron job

* Add '.log' suffix to wildcards, otherwise logrotate will rotate already-rotated logs (e.g., bgpd.log.1.1.1.1.1...)

* Add microsecond granularity to syslog messages

* Don't overwrite system crontab, instead, install additional logrotate crontab file into /etc/cron.d

* Removed incomplete concept of per-process SONiC logs. We can revisit again later
2017-04-21 08:22:44 -07:00
Shuotian Cheng
b305a50a78 [interfaces]: Bring up LAG members before they are enslaved (#505)
Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-04-13 23:54:44 -07:00
Marian Pritsak
884bd2d467 [mellanox]: Add support for Mellanox MSN2410 (#491)
* [device]: Add support for Mellanox MSN2410
MSN2410 runs on Spectrum silicon and has 56 ports:
48 25GbE and 8 100GbE
* Avoid full path within bash -c

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-04-10 14:36:36 -07:00
lguohan
1458e9ea6b [aboot]: add varlog limit file in aboot image (#487)
* [aboot]: add varlog limit file in aboot image
2017-04-07 15:28:30 -07:00
Shuotian Cheng
eef859baf9 [interfaces]: Do not bring up LAG members when LAG is not up (#480)
- Do not bring up LAG member ports when LAG is not created.
  This is because LAG member ports must be DOWN when joining
  the teamd instances due to teamd design. Therefore, we cannot
  bring up a LAG member port first and then join the port to a LAG.

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-04-05 16:22:19 -07:00
Marian Pritsak
6dbe979e5f [build]: Include SONiC version into installer. (#472)
* [build]: Include SONiC version into installer.

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

* Append dirty if contains local changes

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

* Update config

* Use correct name for kernel version field

* Update sysDescription.j2
2017-04-05 16:14:41 -07:00
Taoyu Li
e0a3c2aa57 [oneimage] Add ":latest" to docker run script (#477) 2017-04-05 14:20:02 -07:00
Taoyu Li
b0537eab73 [oneimage] Update dhclient.conf (#479)
Add option 226 back and do slight adjustment to make sure the total option amount is not 16.
2017-04-05 13:16:20 -07:00
Shuotian Cheng
bd6976a6fa [interfaces]: Support ifup/ifdown on VLAN/LAG members (#462)
- This change is added so that when doing ifdown/ifup to flap the
  interface, it will success even when the interface is already
  enslaved as a member of VLAN.
- LAG members do not have IP addresses. Thus ifconfig command is
  needed.
- Do not display comments when not necessary.

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-04-04 01:41:42 -07:00
Joe LeVeque
b7d2009b14 [base image]: Install SwSS SDK Python 2 package into base image (#461)
* [base image]: Install SwSS SDK Python packages (Python 2 & 3) into base image

* Fix typo in existing variable name

* Only install Python 2 version, as Python 3 is not installed in base image
2017-04-03 23:56:15 -07:00
Nadiya
6f04867954 [oneimage] Add cavium packet driver (#469)
* [oneimage] Add cavium packet driver

Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>

* Rename cavm_platform_modules.mk and cavm_xpnet.mk to fit naming convetion

Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>

* Allow dpkg -i for cavm_xpnet

Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
2017-04-03 19:13:29 -07:00
Taoyu Li
8c76556efb Re-commit PR #432 (SHA 4546372) (#474)
* [config/acl] Get ACL config from DHCP and load it in swss container (#432)
* Temporarily disable DHCP option 226
2017-04-03 16:12:32 -07:00
sihuihan88
5c8bcef1ac [boot0]:remove no need files before extract image (#460)
* [Aboot]:remove no need files before extract image

Signed-off-by: Sihui Han <sihan@microsoft.com>

* use  and remove boot0 in the check

Signed-off-by: Sihui Han <sihan@microsoft.com>

* change the comments accordingly

Signed-off-by: Sihui Han <sihan@microsoft.com>
2017-03-31 23:51:59 -07:00
Taoyu Li
fed908fc6b [config-engine] minigraph.py refactoring (#448)
* Refactor minigraph.py
See description in https://github.com/Azure/sonic-buildimage/pull/448 for detail
2017-03-30 15:25:31 -07:00
lguohan
94934f7b3b Revert 432 taoyl/acl dhcp (#457)
* Revert "[config/acl] Get ACL config from DHCP and load it in swss container (#432)"

This reverts commit 4546372f48.
2017-03-29 20:11:46 -07:00
Taoyu Li
4546372f48 [config/acl] Get ACL config from DHCP and load it in swss container (#432)
Get ACL config from DHCP and load it in swss container
2017-03-29 13:33:54 -07:00
Taoyu Li
9e8df96ca7 [interface-config] Fix a loopback addr config bug (#437)
Fix a bug introduced in PR 430 that addresses on lo are not configured correctly.
2017-03-24 18:12:44 -07:00
Shuotian Cheng
6308420db9 [swss]: Enforce swss dependency with opennsl-modules (#434)
- This change ensures that when shuting down, opennsl-modules will
  not stop until swss stops. Otherwise it will cause kernel stack
  trace.

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-03-24 16:29:23 -07:00
Shuotian Cheng
5150ed55c7 [interfaces]: Restart networking service after the file is updated (#430)
Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-03-23 16:30:18 -07:00
Shuotian Cheng
e2cc409f8a [database]: Mount /var/run/redis/ folder from host for all dockers (#418)
- Create /var/run/redis/ folder on the host
- Install Python client for Redis on the host
- Mount /var/run/redis/ as read/write from host for all dockers
- Enable accessing the database everywhere including on the host and from remote

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-03-23 12:18:52 -07:00
Taoyu Li
a8fdd1f42d [oneimage] Enable forcing mgmt route through minigraph (#424) 2017-03-22 20:13:55 -07:00
Taoyu Li
42ae02b665 [oneimage]: Fix race condition in systemd container services (#421)
When Type=simple, systemd will consider the service activated immediately
after specified in ExecStart process is started. If there is downstream
service depending on the state prepared in ExecStart, there will be race condition.

For example, issue #390. In this case, database.service calls database.sh, which
calls docker run or docker start -a to start database container. However, systemd
considers database.service successfully started at the time database.sh begins,
not after docker run finishes. As database.service is consider started, bgp.service
can be started. The redis database, which bgp service depends on, might or might not
have been started at this time point.

To fix this issue (and still keeping the functionality to monitor docker status with
systemd), we split the ExecStart process into an ExecStartPre part and an ExecStart
part. docker run is splitted into docker run -d then docker attach , while docker start
-a  is splitted into docker start and then docker attach. In this way, we make sure
the downstream services are blocked until container is successfully started.
2017-03-22 13:26:00 -07:00
Shuotian Cheng
6a6bc88dcb [interfaces]: Remove bridge-utils from swss docker and add it to base image (#417)
The reason is that /etc/network/interfaces file is in base image. After booting,
docker-swss is not ready and thus the empty VLAN interfaces cannot be created
when the brctl is pointing to the binary inside the swss docker.

Add the bridge-utils into the base image and add bridge_ports none to the
/etc/network/interfaces file so that after boot-up the empty VLAN interfaces
will be created to let the members to join later.

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-03-20 21:39:09 -07:00
Taoyu Li
7a16e02ec1 [cfggen]: Fix the path to sonic-cfggen due to the path change in #388 (#416)
The path moved from /usr/bin/ to /usr/local/bin due to the installation change from deb to whl
2017-03-20 14:04:18 -07:00
Taoyu Li
3643281594 [cfggen] Add tool to translate openconfig acl into sonic format (#388)
* Build sonic-config-engine as whl instead of deb package
* Add tool to translate openconfig acl into sonic format
2017-03-17 14:51:42 -07:00
Shuotian Cheng
05e6b3611d [interfaces]: Combine vlan_interfaces and lag_interfaces file and add allow-hotplug (#381)
* [files]: Add allow-hotplug stanza to interfaces files

- start interface <interface_name> when the kernel detects
a hotplug event from the interface

ref: https://www.debian.org/doc/manuals/debian-reference/ch05.en.html

* [interfaces]: Combine vlan_interfaces and lag_interfaces file and add allow-hotplug

1. Remove vlan_interfaces and lag_interfaces file and members in teamd.j2
2. Add all interfaces to /etc/network/interfaces file
3. Add allow-hotplug stanza
4. Add up <command> to automatically add interfaces to VLAN and LAG
5. Add unique_name filter to minigraph.py to remove duplicate interface names
6. Add brctl to base image
7. Update sonic-swss submodule

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-03-16 11:22:40 -07:00
Joe LeVeque
d6bfa505b3 Wait for VLAN interface to come up before starting DHCP relay (#399) 2017-03-16 10:40:33 -07:00
Joe LeVeque
d34cfd04a8 [motd]: Lower-case 'i' in title (#398) 2017-03-15 20:14:28 -07:00