Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skucreate #2

Closed
wants to merge 64 commits into from
Closed

Skucreate #2

wants to merge 64 commits into from

Conversation

madhanmellanox
Copy link
Owner

- What I did
I moved all the SKU based variables (dictionaries), functions to Platform based variables and functions in scripts like sfputil.py, chassis.py, psu.py, fan.py and thermal.py
- How I did it
I eliminated almost all the references of SKU based dictionaries and functions from these files and instead used Platform based dictionaries and functions.

- How to verify it
Used the following commands to verify my changes are working:
sudo sfputil show presence
show platform psustatus
show interface transceiver eeprom Ethernet0
show platform temperature

- Description for the changelog

The changes are only in files sfputil.py, chassis.py, fan.py, psu.py and thermal.py and the changes are conversion of dictionaries and functions from SKU based to Platform based.

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

lguohan and others added 30 commits March 21, 2020 14:21
…ld log (sonic-net#4269)

add timestamp in each job build log

example:

   [01:39:21] dh clean  --with autotools-dev
   [01:39:22]    dh_auto_clean
   [01:39:27]      make -j16 distclean

Signed-off-by: Guohan Lu <lguohan@gmail.com>
update network and broadcast address in /etc/network/interfaces

Before:
root@sonic:/home/admin# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.28.32.73  netmask 255.255.254.0  broadcast 0.0.0.0 <<<<<

After:
root@sonic:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.28.32.73  netmask 255.255.254.0  broadcast 10.28.33.255 <<<<<

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
* [AS9716-32D]:Support 0x57 and 0x56 eeprom

* Add checking sysfs use 0x57 or 0x56

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
…m syncd rpc (sonic-net#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" (sonic-net#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>
…ecure mode (sonic-net#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>
…ic-net#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.
TH3 related NPU config files to configure switch in 32x100G
LED Firmware support
in buster image, default /etc/nsswitch.conf becomes

```
passwd:         files
```

when tacacs is enable, this files changes to

```
passwd:         tacplus files
```
…mon' package (sonic-net#3912)

Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
* [submodule]: update sonic-utilities

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

Signed-off-by: Guohan Lu <lguohan@gmail.com>
Signed-off-by: Noa Or <noaor@mellanox.com>
…t#4311)

only simple/none are supported currently

Signed-off-by: Guohan Lu <lguohan@gmail.com>
)

- Added get_reboot_cause() API implementation in chassis.py
- Added new file platform.py for platform2.0 API implementation.
…metry (sonic-net#4307)

maintains backward compatibility to search original x509 location
when telemetry table does not have certs

Signed-off-by: Guohan Lu <lguohan@gmail.com>
…U ACS-MSN4700 (sonic-net#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>
Commits on Mar 24, 2020
- [config] Add sflow to _reset_failed_services (sonic-net#850) 04648f5
- [fwutil]: Use overlay driver when mounting next image filesystem (sonic-net#825) 668c116
- Fix for adding L3 interface to Vlan group (sonic-net#826) 6e3679b
- [fwutil]: Fix component table layout. (sonic-net#831) 30adcbd 

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
* [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>
798ce2f [multi-asic]: Update reload of systemd services to support multi-asic platforms (sonic-net#856)
6f51428 [Mellanox] Fix thermal control issue: use natural sort for fan status and thermal status (sonic-net#836)
51d26ce [ntp]: support "show ntp" with mgmt vrf based on linux os version (sonic-net#858)

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
The following changes are included in this submodule advance

54b2510 [syncd] Use correct VID when GET will fail to obrain object type (sonic-net#577)
59b0430 [syncd] Unlock vendor api lock if enabling diag shell (sonic-net#571)
910d45e [vs] Add more logs when setting MTU on port (sonic-net#576)
c0d9947 [vs] Fix setting correct port mtu value (sonic-net#573)
fix sonic-net#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>
Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
SuvarnaMeenakshi and others added 27 commits March 31, 2020 10:06
Changes made to support multi-asic platform. Added multi-instance support for swss, syncd, database, bgp, teamd and lldp.
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>
- Updated to latest frr 7.2.1 from the master.
- Updated patches accordingly
* Fixbug: EVPN issue in FRR template
Suuported profiles 32x400G and 16x400G

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
… container (sonic-net#4354)

- This commit fixes the issue sonic-net#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>
* 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>
Add the port_config.ini and sai.profile, leveraging the same bcm file.

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
…onic-net#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>
…net#4372)

kernel module should be loaded outside container

Signed-off-by: Guohan Lu <lguohan@gmail.com>
Co-authored-by: Sujin Kang <sujkang@microsoft.com>
… they were set initially (sonic-net#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>
Signed-off-by: Guohan Lu <lguohan@gmail.com>
Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
…-net#4380)

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
Add branch 201911/201811 status support for Nephos platform
…4254)

- add "persistence" field for each redis instance in database_config.json
- we will use this information to decide if saving redis instance data while warm/fast reboot
   - before multiDB changes, SONiC uses "redis-cli save " to save all the data into rdb file on default instance on port 6379
   - with multiDB changes, we plan to implement "sonic-db-cli save" to save all data to corresponding rdb files on all listed redis instances which has "persistence" field set "yes"
…es (sonic-net#4395)

* Update README.md: improve build badge style
* Update README.md: add LGTM badges
* f4d9398 2020-04-07 | [vs] Set mto only on tap device (sonic-net#592) [Kamil Cudnik]
* 0ad13f5 2020-04-07 | [lgtm]: add lgtm static analysis configuration (sonic-net#589) [lguohan]
* c961260 2020-04-07 | add swss-common-{inc,lib} to specify the prefix of swss-common library (sonic-net#590) [lguohan]
* 2d68abc 2020-04-06 | [syncd] Load correct global context id (sonic-net#588) [Kamil Cudnik]
* cd82389 2020-04-06 | Return correct error code when port is in use (sonic-net#565) [Vasant Patil]
* 2189c2f 2020-04-02 | [syncd] Pass correct switch RID when staring diag shell (sonic-net#587) [Kamil Cudnik]
* 91792db 2020-04-01 | [syncd] Fix crash during stats polling (sonic-net#586) [Vitaliy Senchyshyn]
* d13521e 2020-04-01 | [meta] Flush fdb entries after flush api success (sonic-net#581) [Kamil Cudnik]
* 54b2510 2020-03-17 | [syncd] Use correct VID when GET will fail to obrain object type (sonic-net#577) [Kamil Cudnik]
* 59b0430 2020-03-16 | [syncd] Unlock vendor api lock if enabling diag shell (sonic-net#571) [Kamil Cudnik]
* 910d45e 2020-03-16 | [vs] Add more logs when setting MTU on port (sonic-net#576) [Kamil Cudnik]
* c0d9947 2020-03-13 | [vs] Fix setting correct port mtu value (sonic-net#573) [Kamil Cudnik]
FPGA driver crash fix for stale buffer in i2c transfer
LED firmware load issue fix.
10G port swapfix
psu/sfp bug fixes to report correct states/status of hw
…fan.py, thermal.py, psu.py to Platform based dictionaries
@madhanmellanox
Copy link
Owner Author

This is an internal PR and when trying to pull request, the PR got polluted with so many files and commits, so closing this PR.

madhanmellanox pushed a commit that referenced this pull request Jan 17, 2021
This update brings in the following commits.

86c1108 Enable arm architecture to build in addition to amd64 (sonic-net#37)
4acb2c3 fix bugs and enhance Transformer (sonic-net#35)
49e5a22 ygot related enhancements and fixes (sonic-net#34)
51224de Fix ietf yang search path for cvl schema builds (sonic-net#32)
3c6cdb3 CVL Changes #8: 'must' and 'when' expression evaluation (sonic-net#31)
dabf231 CVL Changes #7: 'leafref' evaluation (sonic-net#28)
6f9535f CVL Changes #6: Customized Xpath Engine integration (sonic-net#27)
5e2466b DB-Layer fixes/enhancements (sonic-net#26)
9a27302 CVL Changes #4: Implementation of new CVL APIs (sonic-net#22)
dbf1093 Translib support for authorization, yang versioning and Delete flag (sonic-net#21)
80f369e CVL Changes #5: YParser enhancement (sonic-net#23)
904ce18 CVL Changes #3: Multi-db instance support (sonic-net#20)
9d24a34 CVL Changes #2:  YValidator infra changes for evaluating xpath expression (sonic-net#19)
f3fc40f CVL Changes #1: Initial CVL code reorganization and common infra changes (sonic-net#18)
4922601 Bulk and RPC API support in translib (#16)
1d730df RFC7895 yang module library implementation (#15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.