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

Madskucreate #3

Closed
wants to merge 69 commits into from
Closed

Madskucreate #3

wants to merge 69 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 <[email protected]>
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 <[email protected]>
* [AS9716-32D]:Support 0x57 and 0x56 eeprom

* Add checking sysfs use 0x57 or 0x56

Co-authored-by: Jostar Yang <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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
```
* [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) [[email protected]]
* 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 <[email protected]>
…t#4311)

only simple/none are supported currently

Signed-off-by: Guohan Lu <[email protected]>
)

- 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 <[email protected]>
…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 <[email protected]>

* remove redundant line

* [Mellanox]Correct type, buffer size

Co-authored-by: Nazarii Hnydyn <[email protected]>
Co-authored-by: junchao <[email protected]>
Co-authored-by: Stephen Sun <[email protected]>
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 <[email protected]>
* [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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
antony-rheneus and others added 27 commits April 3, 2020 10:25
Suuported profiles 32x400G and 16x400G

Signed-off-by: Antony Rheneus <[email protected]>
… 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 <[email protected]>
* 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 <[email protected]>

* minor fix for isolation port setting

Signed-off-by: shine.chen <[email protected]>

* iccpd docker would start on demand

Signed-off-by: shine.chen <[email protected]>

* Add x attribute on mclagdctl file

Signed-off-by: shine.chen <[email protected]>

* add warm-reboot support for MCLAG

Signed-off-by: shine.chen <[email protected]>

* merge to master branch and reformat iccpd file

Signed-off-by: shine.chen <[email protected]>

* fix some bugs and make peer-link configuration optional

Signed-off-by: shine.chen <[email protected]>

* refactor code per Brcm review

Signed-off-by: shine.chen <[email protected]>

* correct a typo

Signed-off-by: shine.chen <[email protected]>

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

Signed-off-by: shine.chen <[email protected]>

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

Signed-off-by: shine.chen <[email protected]>

* fix a typo

Signed-off-by: shine.chen <[email protected]>

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

Signed-off-by: shine.chen <[email protected]>

* optimize some code

Signed-off-by: shine.chen <[email protected]>

* fix some bugs for warm-reboot

Signed-off-by: shine.chen <[email protected]>

* refine log level

Signed-off-by: shine.chen <[email protected]>

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

Signed-off-by: shine.chen <[email protected]>

* remove iccpd dependency with teamd

Signed-off-by: shine.chen <[email protected]>

* print log level when dump mclag status

Signed-off-by: shine.chen <[email protected]>

* revise per community review

Signed-off-by: shine.chen <[email protected]>

Co-authored-by: shine.chen <[email protected]>
Co-authored-by: shine.chen <[email protected]>
Add the port_config.ini and sai.profile, leveraging the same bcm file.

Signed-off-by: Zhenggen Xu <[email protected]>
…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 <[email protected]>
…net#4372)

kernel module should be loaded outside container

Signed-off-by: Guohan Lu <[email protected]>
… 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 <[email protected]>
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
* [Juniper QFX5210] Fix Python errors
* Remove unnecessary 'pass'
Fix Python indentation error
Add newline at EOF
…onaries and functions in script files like sfputil.py, chassis.py, fan.py, thermal.py and psu.py
@madhanmellanox
Copy link
Owner Author

This is an internal PR and when trying to do a pull request, the PR got polluted with so many 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.