Commit Graph

3018 Commits

Author SHA1 Message Date
SuvarnaMeenakshi
2a59551eff
[sonic-netns-exec]: use "$@" to reflects all positional parameters as they were set initially (#4375)
sonic-netns-exec fails to execute below command in swss.sh:

    sonic-netns-exec "$NET_NS" sonic-db-cli $1 EVAL "
    local tables = {$2}
    for i = 1, table.getn(tables) do
        local matches = redis.call('KEYS', tables[i])
        for j,name in ipairs(matches) do
            redis.call('DEL', name)
        end
    end" 0

This command fails with error " redis.exceptions.ResponseError: value is not an integer or out of range" .

Root cause:

When sonic-netns-exec executes the above function, argument passed to sonic-db-cli is NOT executed as a single script.

The argument is passed as separate keywords to sonic-db-cli, as below:

['EVAL', 'local', 'tables', '=', "{'PORT_TABLE*'}", 'for', 'i', '=', '1,', 'table.getn(tables)', 'do', 'local', 'matches', '=', "redis.call('KEYS',", 'tables[i])', 'for', 'j,name', 'in', 'ipairs(matches)', 'do', "redis.call('DEL',", 'name)', 'end', 'end', '0']

- How I did it
To make sure that the parameters are passed as they were set initially, fix sonic-netns-exec to use double quoted "$@", where "$@" is "$1" "$2" "$3" ... "${N}"

After fix, the argument passed to sonic-db-cli is as below:

Argument passed to sonic-db-cli:

['EVAL', "\n    local tables = {'PORT_TABLE*'}\n    for i = 1, table.getn(tables) do\n        local matches = redis.call('KEYS', tables[i])\n        for j,name in ipairs(matches) do\n            redis.call('DEL', name)\n        end\n    end", '0']

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
2020-04-07 00:05:47 -07:00
Santhosh Kumar T
7bc8f1293c
[DellEMC] Z9264f Watchdog support (#4192)
Co-authored-by: Sujin Kang <sujkang@microsoft.com>
2020-04-06 09:27:45 -07:00
lguohan
296470de25
[docker-iccp]: do not mount kernel module into iccp container (#4372)
kernel module should be loaded outside container

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-04-06 07:40:24 -07:00
lguohan
60b16495cc
[docker-base-stretch]: move common packages into docker-base-stretch (#4371)
libpython2.7, libdaemon0, libdbus-1-3, libjansson4 are common
across different containers. move them into docker-base-stretch

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-04-05 13:29:34 -07:00
zhenggen-xu
b9f6353714
[Seastone] Add new HWSKU for 48x50G+8x40G (#4156)
Add the port_config.ini and sai.profile, leveraging the same bcm file.

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
2020-04-04 22:52:34 -07:00
xumia
78b93a8897
[docker-sonic-mgmt]: Fix virtual environment bug (#4370) 2020-04-04 18:17:55 -07:00
shine4chen
524cf9e56a
MCLAG feature for SONIC (#2514)
* MCLAG feature for sonic

* MCLAG feature for sonic

* remove binary file

* remove unused dockerfile

update docker-iccpd to stretch-based container

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* minor fix for isolation port setting

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* iccpd docker would start on demand

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* Add x attribute on mclagdctl file

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* add warm-reboot support for MCLAG

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* merge to master branch and reformat iccpd file

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* fix some bugs and make peer-link configuration optional

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* refactor code per Brcm review

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* correct a typo

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* * optimize iccpd arp/mac sync process
* refine code according to brcm opinoin
* unify function return value

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* * optimize warm-reboot process
* estabish iccpd connection with configurated src-ip

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* fix a typo

Signed-off-by: shine.chen <shine.chen@nephosinc.com>

* optimize some code
* add some debug info
* optimize bridge mac setting
* fix vlan mac sync issue on standby node

Signed-off-by: shine.chen <shine.chen@mediatek.com>

* optimize some code

Signed-off-by: shine.chen <shine.chen@mediatek.com>

* fix some bugs for warm-reboot

Signed-off-by: shine.chen <shine.chen@mediatek.com>

* refine log level

Signed-off-by: shine.chen <shine.chen@mediatek.com>

* refine iccpd syslog & skip arp packet whose src ip is local ip

Signed-off-by: shine.chen <shine.chen@mediatek.com>

* remove iccpd dependency with teamd

Signed-off-by: shine.chen <shine.chen@mediatek.com>

* print log level when dump mclag status

Signed-off-by: shine.chen <shine.chen@mediatek.com>

* revise per community review

Signed-off-by: shine.chen <shine.chen@mediatek.com>

Co-authored-by: shine.chen <shine.chen@nephosinc.com>
Co-authored-by: shine.chen <shine.chen@mediatek.com>
2020-04-04 15:24:06 -07:00
CharlieChenEC
abbd871d55
Fix the error that 'sensord' daemon cannot be spawn correctly in pmon container (#4354)
- This commit fixes the issue #4021 (Sensord not able to start up on
  both master and 201911 branches)
- Add the new patch file for "lm-sensors" to perform dh_installinit to
  include sensord.init in the packed deb. So that the missing init
  script file for 'sensord' will be included in the created 'sensord'
  deb.

Signed-off-by: Charlie Chen <charlie_chen@edge-core.com>
2020-04-03 12:48:47 -07:00
Mykola F
c5c1ae2173
[Mellanox] update eeprom.py plugin for SimX (#4364)
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
2020-04-03 12:41:37 -07:00
arheneus@marvell.com
4ed3fe4a31
[HWSKU] [Marvell] Added HWSKU for Platform 98cx8580 (#4205)
Suuported profiles 32x400G and 16x400G

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
2020-04-03 10:25:03 -07:00
Ze Gan
ea38d061c7
Fixbug: EVPN issue in FRR template (#4260)
* Fixbug: EVPN issue in FRR template
2020-04-02 18:17:08 -07:00
pavel-shirshov
8585005a36
[FRR]: Update frr to latest 7.2.1-s3 (#4294)
- Updated to latest frr 7.2.1 from the master.
- Updated patches accordingly
2020-04-01 12:57:19 -07:00
lguohan
dca8a27719
[docker-syncd-vs]: add support for vs syncd docker auto restart (#4344)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-03-31 15:00:48 -07:00
Mykola F
7e7777e374
[devices][Mellanox] create sai.xml for MSN3800-D112-C8 (#4334)
sai_xml contains info about port splits, previously it simply linked to the MSN3800 sai xml, which does not have splits. New version describes splits and speeds according to Mellanox-SN3800-D112-C8 SKU.

Practically it can cause port recreation on SAI init.

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
2020-03-31 11:25:52 -07:00
SuvarnaMeenakshi
4b8067e913
Multi-ASIC implementation (#3888)
Changes made to support multi-asic platform. Added multi-instance support for swss, syncd, database, bgp, teamd and lldp.
2020-03-31 10:06:19 -07:00
xumia
2c97321545
[sonic-mgmt]: Support virtual environment for ansible 2.0.0.2 (#4325)
. env-201811/bin/activate

The ansible 2.0.0.2 will be used.
2020-03-30 17:50:57 -07:00
noaOrMlnx
1a0067ede0
Bug fix: #4011 #4012 - "show run acl", "show run interfaces" - traceback when no ACL_RULE/INTERFACE is present. (#4226)
* Fix bugs - "show run acl/interfaces" returns traceback when no ACL_RULE/INTERFACE is present in configuration
- Change logic in main to take data only if the var_json appears in DB.
- Add unit testing for bug fix & fix comments

Signed-off-by: Noa Or <noaor@mellanox.com>
2020-03-30 09:24:16 -07:00
padmanarayana
eede9a9db9
sFlow : Upgrade hsflowd to v2.0.26-4 (#4301)
As per SONiC CLI requirements, we wanted the collector port to default to 6343 if not explicitly configured. In the Click based CLI, if the collector port is omitted, the port will be set to 6343 by default (https://github.com/Azure/sonic-utilities/blob/master/config/main.py#L2543).
However, if sonic-mgmt-framework based CLI is used, hsflowd was using port 0 as default. host-sflow v2.0.26-4 addresses this issue (i.e. use 6343 in case “collector_port” is not set).

Upgrade hsflowd to v2.0.26-4 to pick up https://github.com/sflow/host-sflow/releases/tag/v2.0.26-4.
2020-03-28 23:49:09 -07:00
rkdevi27
84256314fe
DellEMC: Platform 2.0 Api - Fan for z9264f (#4191) 2020-03-28 11:48:22 -07:00
Kebo Liu
0fe58af6d2
copy spc3 fw file to image (#4328) 2020-03-28 11:45:38 -07:00
Garrick He
d095d0bdbc
[procdockerstatsd] Fix CMD field in dB (#4335)
* Fix the CMD for the PROCESSSTATS entries so that
  there is a space between the command name and the
  arguments.

Signed-off-by: Garrick He <garrick_he@dell.com>
2020-03-28 11:43:48 -07:00
Samuel Angebault
5b0ec7afe6
[Arista] Update drivers submodules (#4317)
* Update arista drivers submodules

* Add device configs for 7060CX2-32S

* Update boot0 and union-mount for 7060CX2-32S

* Add 7170-32C and 7170-32CD support in boot0

* Sync after writting boot configs

* Add 7170-32C and 7170-32CD device configurations

Co-authored-by: Boyang Yu <byu@arista.com>
2020-03-27 17:28:27 -07:00
judyjoseph
98fbd59f19
Revert "Updated sonic-sairedis submodule (#4323)" (#4336)
This reverts commit ed5650fa27.
2020-03-27 17:27:28 -07:00
Andriy Kokhan
2739ac00ca
[pmon][barefoot] Disabled thermalctld pmon daemon (#4327)
Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
2020-03-27 14:45:21 -07:00
xumia
46df9ad576
[build]: Fix DPKG derived package issue (#4333) 2020-03-27 12:57:14 -07:00
lguohan
442482685f
[build]: install cmake 3.13.2 (#4319)
fix #4315

download and install cmake 3.13.2 from azure storage 

latest cmake 3.16.3 from stretch-backports breaks the libyang 1.0.73 build

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-03-27 10:49:08 -07:00
judyjoseph
ed5650fa27
Updated sonic-sairedis submodule (#4323)
The following changes are included in this submodule advance

54b2510 [syncd] Use correct VID when GET will fail to obrain object type (#577)
59b0430 [syncd] Unlock vendor api lock if enabling diag shell (#571)
910d45e [vs] Add more logs when setting MTU on port (#576)
c0d9947 [vs] Fix setting correct port mtu value (#573)
2020-03-27 09:14:33 -07:00
SuvarnaMeenakshi
73c77f0d43
[submodule]: Advance sonic-utilities. (#4324)
798ce2f [multi-asic]: Update reload of systemd services to support multi-asic platforms (#856)
6f51428 [Mellanox] Fix thermal control issue: use natural sort for fan status and thermal status (#836)
51d26ce [ntp]: support "show ntp" with mgmt vrf based on linux os version (#858)

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
2020-03-26 11:04:38 -07:00
jostar-yang
592abec5d9
[as4630-54pe]Put correct fanuilt.py file (#4321) 2020-03-25 11:58:19 -07:00
Junchao-Mellanox
80bf061b37
[Mellanox] Fix thermal control bugs (#4298)
* [thermal control] Fix pmon docker stop issue on 3800
* [thermal fix] Fix QA test issue
* [thermal fix] change psu._get_power_available_status to psu.get_power_available_status
* [thermal fix] adjust log for PSU absence and power absence
* [thermal fix] add unit test for loading thermal policy file with duplicate conditions in different policies
* [thermal] fix fan.get_presence for non-removable SKU
* [thermal fix] fix issue: fan direction is based on drawer
* Fix issue: when fan is not present, should not read fan direction from sysfs but directly return N/A
* [thermal fix] add unit test for get_direction for absent FAN
* Unplugable PSU has no FAN, no need add a FAN object for this PSU
* Update submodules

Co-authored-by: Stephen Sun <5379172+stephenxs@users.noreply.github.com>
2020-03-25 10:54:07 -07:00
Nazarii Hnydyn
d2bab4424b
[submodule]: Advance sonic-utilities. (#4316)
Commits on Mar 24, 2020
- [config] Add sflow to _reset_failed_services (#850) 04648f5
- [fwutil]: Use overlay driver when mounting next image filesystem (#825) 668c116
- Fix for adding L3 interface to Vlan group (#826) 6e3679b
- [fwutil]: Fix component table layout. (#831) 30adcbd 

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
2020-03-25 08:08:20 -07:00
Renuka Manavalan
9d3ea75c57
[submodule]: Update sonic-mgmt-framework to fix a build break fix. (#4318)
Module updated: sonic-mgmt-framework
Azure/sonic-mgmt-framework#44
2020-03-24 23:39:39 -07:00
Santhosh Kumar T
12291b276b
DellEMC S6100 I2C Enumeration Segregation (#4312) 2020-03-24 13:52:30 -07:00
tiantianlv
e45d07baa3
Load port led FW for Silverstone! (#4313) 2020-03-24 13:22:09 -07:00
Kebo Liu
f4ed88297d
[Mellanox] Add a new Mellanox platform x86_64-mlnx_msn4700 and new SKU ACS-MSN4700 (#3901)
* add MSN4700 device files

* update ACS-MSN4700 sai profile

* update buffer pool size, headroom, sensor conf, port config and reboot scripts

* fix ident

* update sensor conf and buffer pool

* [sn4700] add sku 4700 to chassis.py

* [Mellanox-4700] Add 4700 info to psu and thermal platform API

* update buffer config file template to the latest.
update SAI profile to use 100G X 4lanes for now
update port_config.ini according to the SAI profile

* [Mellanox]Update the buffer configurations for 4700

* fix alignment in pg_profile_lookup.ini

* add platform components file for new sku

* Update device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/pg_profile_lookup.ini

Co-Authored-By: Nazarii Hnydyn <nazariig@mellanox.com>

* remove redundant line

* [Mellanox]Correct type, buffer size

Co-authored-by: Nazarii Hnydyn <nazariig@mellanox.com>
Co-authored-by: junchao <junchao@mellanox.com>
Co-authored-by: Stephen Sun <stephens@mellanox.com>
2020-03-24 14:32:52 +02:00
xumia
6c8ed042da
Fix docker-sonic-mgmt-framework-dbg wrong dependency issue (#4314) 2020-03-24 19:32:51 +08:00
lguohan
a0d213cc37
[telemetry]: move default certs location from device metadata to telemetry (#4307)
maintains backward compatibility to search original x509 location
when telemetry table does not have certs

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-03-24 00:04:36 -07:00
Aravind Mani
8a6aeace6e
[DellEMC] Fix Z9100 port index issue (#4309) 2020-03-23 21:09:35 -07:00
Arun Saravanan Balachandran
0b52be3e5f
DellEMC: Z9264-Platform2.0 Implementation [Reboot Cause] (#4246)
- Added get_reboot_cause() API implementation in chassis.py
- Added new file platform.py for platform2.0 API implementation.
2020-03-23 15:30:09 -07:00
lguohan
760e763935
[build]: allow to specify timestamp format in the build log (#4311)
only simple/none are supported currently

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-03-23 09:45:43 -07:00
Nazarii Hnydyn
4d22cd405f
[mellanox]: Align platform API: change CPLD version representation (#4221) 2020-03-23 09:04:11 -07:00
noaOrMlnx
440f86ee07
[Mellanox] Update MFT version to 4.14.0 (#4262)
Signed-off-by: Noa Or <noaor@mellanox.com>
2020-03-23 00:42:30 -07:00
lguohan
944ff080ae
[submodule]: update sonic-utilities (#4308)
* [submodule]: update sonic-utilities

* d0f8091 2020-03-22 | Revert "add support for MCLAG (#453)" (#849) (HEAD -> master, origin/master, origin/HEAD) [lguohan]
* 6f54e8c 2020-03-22 | Revert "return list for _get_optional_services() (#822)" (#848) [lguohan]
* f1c79d5 2020-03-22 | return list for _get_optional_services() (#822) (HEAD -> master, origin/master, origin/HEAD) [shine4chen]
* 28ea21a 2020-03-21 | Fix kernel panic for irq after fast-reboot (#823) [byu343]
* 727b499 2020-03-22 | [decode-syseeprom] fix getattribute check for sime platforms (#835) [Mykola F]
* db78cb6 2020-03-21 | Update Command Reference with sFlow section (#841) [padmanarayana]
* 780673c 2020-03-21 | explicitly specify command with underscores (#846) [lguohan]
* 07dc201 2020-03-21 | [db_migrator]Do DB migration for buffer pool size change on Mellanox platform (#833) [Kebo Liu]
* 9a94955 2020-03-20 | [sonic_installer] Enable ARM64 arch (#811) [arheneus@marvell.com]
* 92b30c2 2020-03-18 | [config]: add syslog messages to config load_minigraph/reload (#843) [lguohan]
* 4389ffe 2020-03-17 | [intfutil] set speed to 0 when interface speed is not available (#839) [Ying Xie]
* 45c6c68 2020-03-17 | [Mellanox] add document for thermal control related cli (#832) [Junchao-Mellanox]
* 7105400 2020-03-12 | Add kdump support for Aboot platforms (#824) [byu343]
* c5c5ffc 2020-03-01 | [fwutil]: Set default socket timeout for FW download to 30 sec. (#821) [Nazarii Hnydyn]
* 81c5930 2020-03-01 | Update config/show to include PFC Watchdog commands (#736) [Andriy Moroz]
* 66e9dfb 2020-02-28 | [MultiDB] sonic-utilities - replace redis-cli/redis-dump with sonic-db-cli/sonic-db-dump (#810) [Dong Zhang]
* 8aea564 2020-02-24 | add support for MCLAG (#453) [shine4chen]
* 118620f 2020-02-23 | [reboot] make sure the reboot happens even if platform reboot failed (#819) [Ying Xie]
* 40eff82 2020-02-22 | Multi-Db changes for NAT feature. (#818) [Akhilesh Samineni]
* a4cb4dd 2020-02-21 | [Command-Reference.md] Unify Usage statments and Examples (including sample prompts) (#816) [Joe LeVeque]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-03-22 22:02:28 -07:00
Sangita Maity
0dc047c327
[build]: add dependency of sonic-config-engine on 'sonic-platform-common' package (#3912)
Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
2020-03-22 12:30:55 -07:00
lguohan
3c6f23e7b7
[tacacs]: fix /etc/nsswitch.conf for buster image (#4303)
in buster image, default /etc/nsswitch.conf becomes

```
passwd:         files
```

when tacacs is enable, this files changes to

```
passwd:         tacplus files
```
2020-03-22 09:44:48 -07:00
Srideep
1038182f3d
[DellEMC]: Support to add new HWSKU DellEMC-Z9332f-C32 (#4054)
TH3 related NPU config files to configure switch in 32x100G
LED Firmware support
2020-03-21 23:40:08 -07:00
SuvarnaMeenakshi
cfe754f665
[ntp]: Add "tinker panic 0" in ntp.conf to avoid ntpd from panic (#4263)
- What I did
Add configuration to avoid ntpd from panic and exit if the drift between new time and current system time is large.

- How I did it
Added "tinker panic 0" in ntp.conf file.

- How to verify it
[this assumes that there is a valid NTP server IP in config_db/ntp.conf]

Change the current system time to a bad time with a large drift from time in ntp server; drift should be greater than 1000s.
Reboot the device.
Before the fix:
3. upon reboot, ntp-config service comes up fine, ntp service goes to active(exited) state without any error message. This is because the offset between new time (from ntp server) and the current system time is very large, ntpd goes to panic mode and exits. The system continues to show the bad time.

After the fix:
3. Upon reboot, ntp-config comes up fine, ntp services comes up from and stays in active (running) state. The system clock gets synced with the ntp server time.
2020-03-21 18:50:12 -07:00
RayWang910012
f90bf8fe62
[monit]: monit_telemetry which will have error when telemetry is in secure mode (#4286)
When telemetry is in secure mode ,the monitor will have error log of the match string "--insecure". So I modify to be compatiable with insecure mode and secure mode.

Co-authored-by: Ubuntu <ubuntu@ip-10-5-1-21.ap-south-1.compute.internal>
2020-03-21 18:48:17 -07:00
CharlieChenEC
3e6899004c
[docker/brcm-syncd-rpc]: remove duplicated "--net" options in broadcom syncd rpc (#4296)
In the file "files/build_templates/docker_image_ctl.j2", it adds the option
"--net" to the docker create command through the commit
"abe7ef7e2e2e1215c97cee19a83aab0b130cebe5" (#3856).

Remove the "--net" option in "docker-syncd-brcm-rpc.mk" to avoid
specifying duplicated "--net" options.

Signed-off-by: charlie_chen <charlie_chen@edge-core.com>
2020-03-21 18:47:31 -07:00
jostar-yang
c9059992a0
[AS9716-32D]:Support 0x57 and 0x56 eeprom (#4103)
* [AS9716-32D]:Support 0x57 and 0x56 eeprom

* Add checking sysfs use 0x57 or 0x56

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2020-03-21 14:26:55 -07:00