-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[orchagent]: Export platform information before orchagent run. #835
Conversation
Export platform information in environment to be able to write vendor specific code.
@@ -1,5 +1,9 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# Export platform information. Required to be able to write | |||
# vendor specific code. | |||
export platform=`sonic-cfggen -m /etc/sonic/minigraph.xml -v onie_switch_asic` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use the asic_type? line 7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has different output:
root@arc-switch1026:/home/admin# sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type
mellanox
root@arc-switch1026:/home/admin# sonic-cfggen -m /etc/sonic/minigraph.xml -v onie_switch_asic
mlnx
Everywere in swss code mlnx is expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this change ASAP to be able to run images on MLNX platforms. If it is critical please let me know and I'll change code here and in swss to use asic_type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definition of platform:
https://github.com/Azure/sonic-swss/blob/27c49a0bf3a71556b553aa30fe2a7c1cdb996142/orchagent/copporch.cpp#L16
https://github.com/Azure/sonic-swss/blob/476772db125f3791a986d8c7d6f89b6d812e6234/orchagent/routeorch.cpp#L17
Usage:
https://github.com/Azure/sonic-swss/blob/27c49a0bf3a71556b553aa30fe2a7c1cdb996142/orchagent/copporch.cpp#L117
https://github.com/Azure/sonic-swss/blob/476772db125f3791a986d8c7d6f89b6d812e6234/orchagent/routeorch.cpp#L51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @oleksandrivantsiv , Could you create a pull request to switch the code in swss to use mellanox instead? I think that could be a cleaner solution. After that we could clean up code here.
Export platform information in environment to be able to write vendor specific code.
* 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>
* [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>
…et#835) For some platforms which implement the eeprom plugin by inheriting from TlvInfoDecoder, the line t.getattr('read_eeprom_db', None) == None: results in an error: AttributeError: 'board' object has no attribute 'getattr' The cause for that is that TlvInfoDecoder inherits from object, and looks like for object and derived classes there is no __getattr__. Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
6cfb3ecb0248768da0a91e5f7fb4477c5da7eb4e (HEAD -> 201911, origin/201911) [build]: allow to use extra inc/lib location to build the package (#595) 40d34872d3b7f354adac67f084eebf6ee467f779 Merge pull request #846 from xumia/azp-201911 76ac50f147a7d820b19d8d7628a67f2fe4f5159b Disable the build test 6c9cf655b8b5b152cab1d578e05eddf8238b81b0 Fix branch reference error ca8d81d37a9b0294098f161b036d330d9ff461e0 [ci]: download artifacts from master branch (#768) 0cbf4d55c67a9f8f52715f95536f3588acf06c4a [ci]: use sonicbld pool (#766) b6f1265ee9bd86f8a5e909a6f1e9b2384497c906 [ci]: add build for arm64 and armhf (#757) 9ec0a7da64d479b124815edc5b505fb88b2532a0 CI: add azure pipeline CI/CD (#754) 1436dbe02cd3c56f796c6b3398d4075cd05d97e0 Fix RIF issue (#835) Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Export platform information in environment to be able to write vendor
specific code.