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

[aboot]: refactor boot0.j2 to support one image SONiC-to-SONiC upgrade #557

Merged
merged 2 commits into from
May 1, 2017

Conversation

lguohan
Copy link
Collaborator

@lguohan lguohan commented May 1, 2017

No description provided.

@lguohan lguohan changed the title [aboot]: refactor boot0.j2 to support one image upgrade [aboot]: refactor boot0.j2 to support one image SONiC-to-SONiC upgrade May 1, 2017
@@ -120,6 +120,17 @@ platform_specific() {
fi
}

# check the hash file in the image, and determine to install or just skip
GIT_REVISION=$(unzip -p "$swipath" .imagehash)
LOCAL_IMAGEHASH=$(cat $image_path/.imagehash 2>/dev/null || true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2>/dev/null || true [](start = 44, length = 20)

No need to handle stderr and return code.
https://www.gnu.org/software/bash/manual/bashref.html#Command-Substitution

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works. I can revisit it later, but I do not want to change this for this pr.

@@ -24,7 +24,7 @@ kernel_params=kernel-params

aboot_machine="arista_unknown"

target_path=/mnt/flash
[ -z "$target_path" ] && target_path=/mnt/flash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it more readable to rewrite similar blocks by 'if-else'.
The shortcuts is useful for simple error handling, but confusing for complex conditions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if target_path is null, then assign target_path. It is the simplest logic.

@lguohan lguohan merged commit 72a039b into sonic-net:master May 1, 2017
@lguohan lguohan deleted the arista branch November 6, 2017 04:29
lguohan added a commit to lguohan/sonic-buildimage that referenced this pull request Sep 20, 2018
swss:

* 13df5a9 2018-09-19 | [cfgmgr]: Add vrfmgrd (sonic-net#621) (HEAD, origin/master, origin/HEAD) [Marian Pritsak]
* 54a7c9a 2018-09-18 | [portsorch]: Remove m_ifindex from Port class (sonic-net#624) [Shuotian Cheng]
* e765c12 2018-09-17 | [aclorch]: Remove error message when match not found (sonic-net#618) [stepanblyschak]
* 07f4cd8 2018-09-14 | Enable vxlan test (sonic-net#620) [pavel-shirshov]
* 9fda944 2018-09-14 | Warm reboot: Add support for orchagent pre-shutdown warm-restart state check (sonic-net#562) [Jipan Yang]
* 41e61bd 2018-09-14 | Warm reboot: port state sync up (sonic-net#557) [Jipan Yang]
* bf38bec 2018-09-14 | [vxlan tunnel]: Don't create encap mapper. Currently not supported (sonic-net#613) [pavel-shirshov]
* 528295d 2018-09-14 | [mirrororch]: Remove the queue initialization for different platforms (sonic-net#614) [Shuotian Cheng]
* 5af88ab 2018-09-14 | Temporarily disable two test cases to unblock others (sonic-net#617) [Qi Luo]
* 60a9d61 2018-09-08 | Support warm-restart for neighsyncd (sonic-net#599) [zhenggen-xu]
* 387eac6 2018-09-08 | [mirrororch]: Change Mellanox GRE type to 0x8949 (sonic-net#610) [Shuotian Cheng]
* 7114352 2018-09-07 |  Store mirror session state in StateDB (sonic-net#609) [Qi Luo]
* fa2b5d9 2018-09-06 | [test]: Mark VLAN related mirror test invalid in Debian Jessie (sonic-net#608) [Shuotian Cheng]
* 6d40d85 2018-09-06 | [mirrororch]: Fix bug: return false when SAI API call fails (sonic-net#607) [Shuotian Cheng]
* cbc5a05 2018-09-05 | [mirrororch]: Enable mirror session destination to point into VLAN (sonic-net#595) [Shuotian Cheng]

swss-common:

* c6c9a9b 2018-09-19 | Add new macro STATE_FDB_TABLE_NAME (sonic-net#233) (HEAD, origin/master, origin/HEAD) [Qi Luo]
* 41b6e18 2018-09-13 | NotificationProducer.send() returns the number of clients that received the message (sonic-net#231) [Qi Luo]

sairedis:

* 5ef97ca 2018-09-11 | Fix findBridgeVlanForPortVlan for 1Q bridge (sonic-net#345) (HEAD) [Qi Luo]
* e402ff6 2018-09-11 | update SAI header (sonic-net#344) [lguohan]
* fd75e54 2018-09-11 | sairedis: add while loop to make syncd processEvent() handle as many entries as possible in one event call (sonic-net#335) [Dong Zhang]
* 50e1915 2018-08-29 | [misc]: Fix typos (sonic-net#342) [Shuotian Cheng]
* 2322375 2018-08-29 | Use syncd -u option (sonic-net#341) [Qi Luo]
* 2c2a13c 2018-08-28 | Cleanup usage (sonic-net#340) [Qi Luo]
* 7cd75c0 2018-08-26 | [saimeta]: Fix typo: > then -> >; don't exists -> doesn't exist (sonic-net#339) [Shuotian Cheng]

Signed-off-by: Guohan Lu <gulv@microsoft.com>
lguohan added a commit that referenced this pull request Sep 21, 2018
swss:

* 13df5a9 2018-09-19 | [cfgmgr]: Add vrfmgrd (#621) (HEAD, origin/master, origin/HEAD) [Marian Pritsak]
* 54a7c9a 2018-09-18 | [portsorch]: Remove m_ifindex from Port class (#624) [Shuotian Cheng]
* e765c12 2018-09-17 | [aclorch]: Remove error message when match not found (#618) [stepanblyschak]
* 07f4cd8 2018-09-14 | Enable vxlan test (#620) [pavel-shirshov]
* 9fda944 2018-09-14 | Warm reboot: Add support for orchagent pre-shutdown warm-restart state check (#562) [Jipan Yang]
* 41e61bd 2018-09-14 | Warm reboot: port state sync up (#557) [Jipan Yang]
* bf38bec 2018-09-14 | [vxlan tunnel]: Don't create encap mapper. Currently not supported (#613) [pavel-shirshov]
* 528295d 2018-09-14 | [mirrororch]: Remove the queue initialization for different platforms (#614) [Shuotian Cheng]
* 5af88ab 2018-09-14 | Temporarily disable two test cases to unblock others (#617) [Qi Luo]
* 60a9d61 2018-09-08 | Support warm-restart for neighsyncd (#599) [zhenggen-xu]
* 387eac6 2018-09-08 | [mirrororch]: Change Mellanox GRE type to 0x8949 (#610) [Shuotian Cheng]
* 7114352 2018-09-07 |  Store mirror session state in StateDB (#609) [Qi Luo]
* fa2b5d9 2018-09-06 | [test]: Mark VLAN related mirror test invalid in Debian Jessie (#608) [Shuotian Cheng]
* 6d40d85 2018-09-06 | [mirrororch]: Fix bug: return false when SAI API call fails (#607) [Shuotian Cheng]
* cbc5a05 2018-09-05 | [mirrororch]: Enable mirror session destination to point into VLAN (#595) [Shuotian Cheng]

swss-common:

* c6c9a9b 2018-09-19 | Add new macro STATE_FDB_TABLE_NAME (#233) (HEAD, origin/master, origin/HEAD) [Qi Luo]
* 41b6e18 2018-09-13 | NotificationProducer.send() returns the number of clients that received the message (#231) [Qi Luo]

sairedis:

* 5ef97ca 2018-09-11 | Fix findBridgeVlanForPortVlan for 1Q bridge (#345) (HEAD) [Qi Luo]
* e402ff6 2018-09-11 | update SAI header (#344) [lguohan]
* fd75e54 2018-09-11 | sairedis: add while loop to make syncd processEvent() handle as many entries as possible in one event call (#335) [Dong Zhang]
* 50e1915 2018-08-29 | [misc]: Fix typos (#342) [Shuotian Cheng]
* 2322375 2018-08-29 | Use syncd -u option (#341) [Qi Luo]
* 2c2a13c 2018-08-28 | Cleanup usage (#340) [Qi Luo]
* 7cd75c0 2018-08-26 | [saimeta]: Fix typo: > then -> >; don't exists -> doesn't exist (#339) [Shuotian Cheng]

Signed-off-by: Guohan Lu <gulv@microsoft.com>
stcheng added a commit that referenced this pull request Jul 5, 2019
0ed90ba - [policerorch]: Fix return code comparison error (#968) (1 minutes ago) <Shuotian Cheng)
80fcada -  remove crm acl_counters when acl_table removed (#918) (3 hours ago) <JaredLius>
bd3651f - [aclorch]: Fix matching MIRROR_DSCP throws unnecessary errors (#966) (2 minutes ago) <Shuotian Cheng>
0af226a - [aclorch]: Add MIRROR_DSCP table type (#906) (4 weeks ago) <Shuotian Cheng>
9005962 - [vstest]: Update the mirror session state table name (#917) (5 weeks ago) <Shuotian Cheng>
c4e3e54 - [policerorch]: Add PolicerOrch to bundle with mirror session (#889) (6 weeks ago) <Shuotian Cheng>
ee49926 - [Makefile]: Remove header files from source files (#883) (8 weeks ago) <Shuotian Cheng>
f889f80 - [aclorch]: Add ICMP type/code match for v4/v6 (#868) (8 weeks ago) <Shuotian Cheng>
9931450 - [aclorch]: Add MIRRORv6 and MIRRORv4v6 support for ACL table (#825) (9 weeks ago) <Shuotian Cheng>
a1ab18c - [mirrororch]: Fix comments typo (#863) (9 weeks ago) <Shuotian Cheng>

sonic-swss-common
485db07 - [schema]: Add SWITCH_CAPABILITY_TABLE (#276) (6 weeks ago) <Shuotian Cheng>        
3f49b20 - [schema]: Add POLICER configuration table (#277) (6 weeks ago) <Shuotian Cheng>    
539b87d - [schema]: Add STATE_MIRROR_SESSION_TABLE_NAME (#278) (6 weeks ago) <Shuotian Cheng>

sonic-utilities
dc52015 - [Sonic-utilities]: Added commands to view acl and port running configs (#557) (6 days ago) <Prem Prakash>
635dc88 - [config]: Add config acl add/remove table command (#541) (4 weeks ago) <Shuotian Cheng>
dcdc922 - [show]: Add show policer command (#540) (4 weeks ago) <Shuotian Cheng>                                        
128462a - [config]: Add --policer option for mirror session (#537) (6 weeks ago) <Shuotian Cheng>                       
38da7f3 - [acl_loader]: Add policer attribute in show mirror_session command (#538) (6 weeks ago) <Shuotian Cheng>      
f95ff00 - [acl_loader]: Do not apply default DENY rule for MIRRORV6 table (#522) (6 weeks ago) <Shuotian Cheng>

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
lguohan pushed a commit that referenced this pull request Jul 17, 2019
* ee56d54 2019-07-16 | [fast-reboot] Stop services after killing containers to prevent automatic restart (#572) (HEAD -> master, origin/master, origin/HEAD) [Joe LeVeque]
* c718cab 2019-07-17 | [acl_loader]: Fix show mirror_session error (#580) [JaredLius]
* 2764c6c 2019-07-16 | [Mellanox] Improve the prompt of the Mellanox sdk sniffer command. (#546) [Stephen Sun]
* 5a5b74d 2019-07-10 | Generate interface table to have an entry for default VRF (#525) [Prince Sunny]
* c30e9ff 2019-07-10 | [show] Don't abort in InterfaceAliasConverter ctor if PORT table doesn't exist (#571) [Joe LeVeque]
* 1aac696 2019-07-10 | [fast reboot] stop removing opennsl module before reboot (#560) [Ying Xie]
* 37823d4 2019-07-09 | Modified CLI doc for 201904 release, changed the config interface command, etc., (#561) [kannankvs]
* 77ae6b8 2019-07-03 | [PR template] Add reminder to update Command Line Reference Guide if modifying user-facing commands (#569) [Joe LeVeque]
* dc52015 2019-06-25 | [Sonic-utilities]: Added commands to view acl and port running configs (#557) [Prem Prakash]
* c7f45c3 2019-06-19 | [warm-reboot] Use retryCount option of orchagent_restart_check program (#555) [Jipan Yang]
* c6a08f7 2019-06-17 | [scripts]: add support to db_migrator for non-default unix socket (#551) [Lawrence Lee]
* 98e087f 2019-06-06 | [show]: Edit comment (#549) [Vasant Patil]
* 5667a90 2019-06-06 | [intfutil] Fix error when <interface name> specified in show interface related commands (#548) [Gord Chen]
* b7fcb1f 2019-06-04 | Add buffer pool watermark support in watermarkstat and counterpoll (#521) [Wenda Ni]
* 635dc88 2019-06-03 | [config]: Add config acl add/remove table command (#541) [Shuotian Cheng]
* dcdc922 2019-06-03 | [show]: Add show policer command (#540) [Shuotian Cheng]
* 82ef3ec 2019-06-01 | IP Address validation check (#530) [Tapash Das]
* 1f326ad 2019-05-31 | [show] Remove ability to clear counters from 'show' commands (#518) [Joe LeVeque]
* 669d36d 2019-06-01 | Add SONIC CLI Manual (#533) [kannankvs]
* 7657001 2019-06-01 | 'show vlan config' not displaying the VLAN members, after the clear config and reload with default l2 configuration. (#457) [RAMA CHANDRA REDDY GADDAM]
* 9493883 2019-05-28 | use vlan members (#542) [trzhang-msft]
* 128462a 2019-05-22 | [config]: Add --policer option for mirror session (#537) [Shuotian Cheng]
* 38da7f3 2019-05-22 | [acl_loader]: Add policer attribute in show mirror_session command (#538) [Shuotian Cheng]
* f95ff00 2019-05-22 | [acl_loader]: Do not apply default DENY rule for MIRRORV6 table (#522) [Shuotian Cheng]
* 50b7256 2019-05-21 | [sonic_installer] If asked to install an image which is already installed, simply set as default (#534) [Joe LeVeque]
* d823062 2019-05-20 | [201811] enable DB migrator code (#536) [Ying Xie]
* 7f7f384 2019-05-10 | update scheme variable name (#531) [trzhang-msft]
* c66315a 2019-05-10 | Config interface Loopback0 ip add/del is not working (#443) [Kiran Kumar Kella]
* 430d4b8 2019-05-10 | decode-syseeprom : added new option to show the Product Name. (#496) [Olivier Singla]
Kalimuthu-Velappan pushed a commit to Kalimuthu-Velappan/sonic-buildimage that referenced this pull request Sep 12, 2019
sonic-net#557)

[show] Add commands to view acl and port running configs
lguohan pushed a commit that referenced this pull request Jan 29, 2020
567191f [sairedis] Add knob to disable recording statistics API calls (#547)
8513506 Create Switch and SwitchContainer classes (#549) …
e991281 Update .gitignore (#551)
84b0eed [sairedis] Skip recording GET operations on AVAILABLE attributes (#550) …
634e4e3 [meta] Return OBJECT_IN_USE when removing port is in use (#553)
2961bd3 [syncd] Fix rpc server flag condition (#557)
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this pull request Mar 23, 2020
* Warm start: port state sync up
* Use Table::hget() to simplify the oper_status retrieval processing.
* Add more comment for port state sync up
* Use m_oper_status field of Port class instead of reading port oper status rom appDB.
* Add common function for port oper status update
* Throw execption upon port oper status get error
* Add VS test for port state sync up
dmytroxshevchuk pushed a commit to dmytroxshevchuk/sonic-buildimage that referenced this pull request Aug 31, 2020
bocon13 pushed a commit to pins/sonic-buildimage-public that referenced this pull request Nov 22, 2021
Incorporates:

95aec72 2021-11-19 [PINS] Add Bazel support for external projects (sonic-net#557)
1dfe06f 2021-11-18 P4Runtime : Status Code additions (sonic-net#545)
8c93532 2021-11-18 Ported Marvell armhf build on amd64 host for debian buster to use cross-comp… (sonic-net#501)
74264d9 2021-11-17 [PINS] Add AppDB ACL schema values shared between the P4RT app and P4Orch (sonic-net#556)
a18618f 2021-11-15 [schema] Add vnet route tunnel and advertise network tables for state db (sonic-net#560)
155770e 2021-11-12 [VS test] Increase test timeout (sonic-net#559)
2b11dea 2021-11-08 [PINS] Update Redis schema to match P4Orch (sonic-net#548)
be7d483 2021-11-08 [schema] add ACL_TABLE_TYPE table (sonic-net#546)

Signed-off-by: Don Newton <don@opennetworking.org>
prsunny pushed a commit that referenced this pull request Nov 23, 2021
[sonic-swss-common] submodule update:
95aec72 2021-11-19 [PINS] Add Bazel support for external projects (#557)
1dfe06f 2021-11-18 P4Runtime : Status Code additions (#545)
8c93532 2021-11-18 Ported Marvell armhf build on amd64 host for debian buster to use cross-comp… (#501)
74264d9 2021-11-17 [PINS] Add AppDB ACL schema values shared between the P4RT app and P4Orch (#556)
a18618f 2021-11-15 [schema] Add vnet route tunnel and advertise network tables for state db (#560)
155770e 2021-11-12 [VS test] Increase test timeout (#559)
2b11dea 2021-11-08 [PINS] Update Redis schema to match P4Orch (#548)
be7d483 2021-11-08 [schema] add ACL_TABLE_TYPE table (#546)

Signed-off-by: Don Newton <don@opennetworking.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants