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

Add support to convert the VFAT file system on Arista switches to EXT4 #201

Merged
merged 1 commit into from
Jan 24, 2017
Merged

Conversation

byu343
Copy link
Contributor

@byu343 byu343 commented Jan 20, 2017

This commit will convert the existing file system of flash drive on Arista switches from VFAT to EXT4 in the booting of SONiC. It will take the whole flash and therefore remove the recovery partition. There is a check in the script making sure that the conversion operation will not happen on a non-Arista switch or if the existing file system is not VFAT.

}

# Extract kernel parameters
set -- $(cat /proc/cmdline)
Copy link
Collaborator

@qiluo-msft qiluo-msft Jan 21, 2017

Choose a reason for hiding this comment

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

what does 'set --' mean? #Closed

Copy link
Contributor Author

@byu343 byu343 Jan 23, 2017

Choose a reason for hiding this comment

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

set is parsing = from a string.
The -- is to stop the option argument parsing for safeness.
You can see the difference from the examples below.
grep --help | grep -q
grep --help | grep -- -q #Closed

echo "Error: timeout in waiting for $root_dev"
exit 1
fi
blkid | grep "$root_dev.*vfat" -q || exit 0
Copy link
Collaborator

@qiluo-msft qiluo-msft Jan 21, 2017

Choose a reason for hiding this comment

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

Could you also filter the specific partition label, or other things indicating Arista prepared partition? I think the 'grep' is too loose here. #Closed

Copy link
Contributor Author

@byu343 byu343 Jan 23, 2017

Choose a reason for hiding this comment

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

This is actually done in our script.
The check of Aboot=... kernel cmdline ensures that this is an Arista Switch. To differentiate Arista boxes from other platforms we use this parameter.
Here we obtain root=... from Aboot and it is stored as root_dev in this script, which is the root flash device. #Closed

# set -x
total_mem=$(free | awk '/^Mem:/{print $2}')
tmpfs_size=$(( $total_mem / 20 * 17 ))
free_mem_thres=$(( $total_mem / 20 * 18 ))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these parameters good for any Arsita switches? What is the rule behind the numbers?

Copy link
Contributor Author

@byu343 byu343 Jan 23, 2017

Choose a reason for hiding this comment

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

The script need a memory-based tmpfs to backup and restore the files in the flash during the conversion. The size of created tmpfs is expected to be as large as possible to backup all files in the flash, but it is constrained by the free memory available.

In the script, tmpfs_size is the size of tmpfs to create, and we expect that the free memory space is at least free_mem_thres, which is tmpfs_size + some extra.

According to our testing, the script with the current settings can always create a tmpfs, and never fail at the check of free memory space (line 123). (The script runs as the early stage of booting, so an extremely large portion of the memory should be free.) A special case is that when tmpfs_size is smaller than the total size of files in the flash (line 136), as there is not enough space to backup all files, the booting will continue without any change to the file system and partition. (But this will never happen on the boxes with 2G flash and 4G memory.)

Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments. Thanks for the contribution!

@qiluo-msft
Copy link
Collaborator

Your pull request comments are quite useful. Please add them as code comment.

@qiluo-msft qiluo-msft dismissed their stale review January 23, 2017 18:46

No blocking issues.

@stcheng stcheng merged commit 6d8f576 into sonic-net:master Jan 24, 2017
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this pull request Mar 23, 2020
monaliusa pushed a commit to monaliusa/sonic-buildimage that referenced this pull request Aug 7, 2020
dmytroxshevchuk pushed a commit to dmytroxshevchuk/sonic-buildimage that referenced this pull request Aug 31, 2020
…ound in map!" (sonic-net#201)

Attribute SAI_QUEUE_ATTR_INDEX added into attribute map
for object type SAI_OBJECT_TYPE_QUEUE

Signed-off-by: Denis Maslov <Denis.Maslov@cavium.com>
xumia pushed a commit to xumia/sonic-buildimage-1 that referenced this pull request Feb 16, 2021
This commit provides the following improvements to the Marvell armhf builds
performed by Jenkins.

1. Improve build performance by attempting a build using SONIC_BUILD_JOBS=4. If
   that fails then try SONIC_BUILD_JOBS=2. If that fails then try
   SONIC_BUILD_JOBS=1. If that fails we are done.

2. Disable concurrent builds from the same branch. This strives to avoid a
   current armhf build limitation where multiple builds executed on the same
   build machine interfere with each other.
abdosi added a commit that referenced this pull request Mar 15, 2021
d81828c6740f2d4fca59fe3ec1d0adb1088a9dbb (HEAD -> 201911, origin/201911) Updated lldpRemManAddrTable to use all the management ip address associated with interface. (#201)
093a3c2c5bc688ddc5e5362dc657f19175e12ce8 Fix fdb_vlanmac() on corner cases (#193)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to abdosi/sonic-buildimage that referenced this pull request Mar 20, 2021
c20bf60 Qi Luo  Mon Mar 15 14:28:31 2021 -0700  Implement rfc4363 FdbUpdater for lag inside vlan (sonic-net#203)
292024a abdosi  Mon Mar 15 12:15:21 2021 -0700  Updated lldpRemManAddrTable to use all the management ip address associated with interface. (sonic-net#201)
9b83459 liushilongbuaa  Fri Mar 12 14:35:23 2021 +0800  [CI] Setup dummy azure pipeline (sonic-net#198)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit that referenced this pull request Mar 25, 2021
c20bf60 Qi Luo  Mon Mar 15 14:28:31 2021 -0700  Implement rfc4363 FdbUpdater for lag inside vlan (#203)
292024a abdosi  Mon Mar 15 12:15:21 2021 -0700  Updated lldpRemManAddrTable to use all the management ip address associated with interface. (#201)
9b83459 liushilongbuaa  Fri Mar 12 14:35:23 2021 +0800  [CI] Setup dummy azure pipeline (#198)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
yxieca pushed a commit that referenced this pull request Mar 26, 2021
c20bf60 Qi Luo  Mon Mar 15 14:28:31 2021 -0700  Implement rfc4363 FdbUpdater for lag inside vlan (#203)
292024a abdosi  Mon Mar 15 12:15:21 2021 -0700  Updated lldpRemManAddrTable to use all the management ip address associated with interface. (#201)
9b83459 liushilongbuaa  Fri Mar 12 14:35:23 2021 +0800  [CI] Setup dummy azure pipeline (#198)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
stephenxs added a commit to stephenxs/sonic-buildimage that referenced this pull request Apr 1, 2021
Unset CONFIG_THERMAL_STATISTICS to prevent kernel crash (sonic-net#199)
[net] Disable prio and cls cgroups to make working cgroup2 sock matching (sonic-net#198)
[doc]: Fix typos in README (sonic-net#206)
[Mellanox] Backport patch to remove critical trip point from thermal zones (sonic-net#201)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
stephenxs added a commit to stephenxs/sonic-buildimage that referenced this pull request Apr 1, 2021
b67c2782 [Mellanox] Backport patch to remove critical trip point from thermal zones (sonic-net#201)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
lguohan pushed a commit that referenced this pull request Apr 1, 2021
Unset CONFIG_THERMAL_STATISTICS to prevent kernel crash (#199)
[net] Disable prio and cls cgroups to make working cgroup2 sock matching (#198)
[doc]: Fix typos in README (#206)
[Mellanox] Backport patch to remove critical trip point from thermal zones (#201)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
lguohan pushed a commit that referenced this pull request Apr 2, 2021
b67c2782 [Mellanox] Backport patch to remove critical trip point from thermal zones (#201)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
c20bf60 Qi Luo  Mon Mar 15 14:28:31 2021 -0700  Implement rfc4363 FdbUpdater for lag inside vlan (sonic-net#203)
292024a abdosi  Mon Mar 15 12:15:21 2021 -0700  Updated lldpRemManAddrTable to use all the management ip address associated with interface. (sonic-net#201)
9b83459 liushilongbuaa  Fri Mar 12 14:35:23 2021 +0800  [CI] Setup dummy azure pipeline (sonic-net#198)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
Unset CONFIG_THERMAL_STATISTICS to prevent kernel crash (sonic-net#199)
[net] Disable prio and cls cgroups to make working cgroup2 sock matching (sonic-net#198)
[doc]: Fix typos in README (sonic-net#206)
[Mellanox] Backport patch to remove critical trip point from thermal zones (sonic-net#201)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
lguohan added a commit to lguohan/sonic-buildimage that referenced this pull request Jul 14, 2021
* 664f0e2 2021-07-14 | [xrcvd]: Removed undefined symbol 'sfp_status_helper' (sonic-net#204) (HEAD, origin/202012) [Prince George]
* 1b2d016 2021-06-16 | [CI] sonic-config-engine now depends on SONiC YANG packages (sonic-net#194) [Joe LeVeque]
* 1cf5996 2021-07-14 | Introduce mgmtinit delay after transceiver module insertion (sonic-net#201) [Prince George]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
lguohan added a commit that referenced this pull request Jul 14, 2021
* 664f0e2 2021-07-14 | [xrcvd]: Removed undefined symbol 'sfp_status_helper' (#204) (HEAD, origin/202012) [Prince George]
* 1b2d016 2021-06-16 | [CI] sonic-config-engine now depends on SONiC YANG packages (#194) [Joe LeVeque]
* 1cf5996 2021-07-14 | Introduce mgmtinit delay after transceiver module insertion (#201) [Prince George]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
c20bf60 Qi Luo  Mon Mar 15 14:28:31 2021 -0700  Implement rfc4363 FdbUpdater for lag inside vlan (sonic-net#203)
292024a abdosi  Mon Mar 15 12:15:21 2021 -0700  Updated lldpRemManAddrTable to use all the management ip address associated with interface. (sonic-net#201)
9b83459 liushilongbuaa  Fri Mar 12 14:35:23 2021 +0800  [CI] Setup dummy azure pipeline (sonic-net#198)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Unset CONFIG_THERMAL_STATISTICS to prevent kernel crash (sonic-net#199)
[net] Disable prio and cls cgroups to make working cgroup2 sock matching (sonic-net#198)
[doc]: Fix typos in README (sonic-net#206)
[Mellanox] Backport patch to remove critical trip point from thermal zones (sonic-net#201)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Aug 25, 2021
This PR updates the following commits in sonic-platform-daemons

e038bc2 [xcvrd] initial support for integrating vendor specfic class objects for calling Y-Cable API's inside xcvrd (sonic-net#197)
57e3d78 Fix issue#8230 (sonic-net#210)
f63fc94 [thermalctld] Use interval set in thermal policy if available (sonic-net#164)
8b2227d [CI] Sum up Azp unit test code coverage (sonic-net#209)
b880c48 [xrcvd]: Added unit test for sfp oir events (sonic-net#205)
4a32b5a [y-cable] fix for logging the xcvrd metrics before writing the state to the State-DB (sonic-net#208)
53e1532 (origin/shilong-test) Add str conversion for numeric xcvr info fields to xcvrd (sonic-net#200)
03a4add Introduce mgmtinit delay after transceiver module insertion (sonic-net#201)

This PR updates the following commits in sonic-platform-common
0dc71c1 Add y-cable driver for simulated mux (sonic-net#213)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
vdahiya12 added a commit that referenced this pull request Aug 30, 2021
This PR updates the following commits in sonic-platform-daemons

e038bc2 [xcvrd] initial support for integrating vendor specfic class objects for calling Y-Cable API's inside xcvrd (#197)
57e3d78 Fix issue#8230 (#210)
f63fc94 [thermalctld] Use interval set in thermal policy if available (#164)
8b2227d [CI] Sum up Azp unit test code coverage (#209)
b880c48 [xrcvd]: Added unit test for sfp oir events (#205)
4a32b5a [y-cable] fix for logging the xcvrd metrics before writing the state to the State-DB (#208)
53e1532 (origin/shilong-test) Add str conversion for numeric xcvr info fields to xcvrd (#200)
03a4add Introduce mgmtinit delay after transceiver module insertion (#201)

This PR updates the following commits in sonic-platform-common
0dc71c1 Add y-cable driver for simulated mux (#213)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
lguohan pushed a commit that referenced this pull request Oct 24, 2021
8bb9c5a (HEAD -> master, origin/master, origin/HEAD) Add retry reading/setting mux status to simulated y-cable driver (#221)
2ebd786 [sfp-refactor] Add initial support for SFF-8636 in sonic_xcvr (#218)
221fb8a Fix QSFP-DD power class mask (#212)
4598d40 [Y-Cable][Broadcom] upgrade to support Broadcom Y-Cable API to release 1.2 (#217)
0fdd198 [sfp-refactor] Add initial support for SFF-8436 in sonic_xcvr (#215)
a09f5a3 [sfp-refactor] Add new sonic_xcvr package for common transceiver logic (#201)
7ca4f51 Update SFP index definition (#214)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
mlok-nokia pushed a commit to mlok-nokia/sonic-buildimage that referenced this pull request Jan 24, 2022
…t#201)

As per CMIS spec : http://www.qsfp-dd.com/wp-content/uploads/2021/05/CMIS5p0.pdf (see D.1.3 Software Configuration and Initialization) after module is inserted, delay of 2 seconds is required for MgmtInit to complete.

Signed-off-by: Prince George <prgeor@microsoft.com>
SuvarnaMeenakshi pushed a commit to SuvarnaMeenakshi/sonic-buildimage that referenced this pull request Mar 16, 2022
…ciated with interface. (sonic-net#201)

Fixes:-
sonic-net#7036
sonic-net#6636

Updated to use prefix of 16 byte instead of 6 byte for Ipv6 Management Address. Confirmed with other Vendor Nos

Fixed lookup() so that get-next work correctly from test-cases.

Updated all files to use new utility API ip2byte_tuple()
snider-nokia pushed a commit to snider-nokia/sonic-buildimage that referenced this pull request Apr 6, 2023
sonic-net#201)

First-cut changes to provide platform independent support for different transceivers in SONiC platforms.
vivekrnv pushed a commit to vivekrnv/sonic-buildimage that referenced this pull request Apr 28, 2023
…zones (sonic-net#201)

1. 0027-mlxsw-core-Remove-critical-trip-point-from-thermal-z.patch

    Disable software thermal protection by removing critical trip points
    for the all thermal zones.

    According to the system requirements software should never perform
    system thermal protection, since all the systems implement two levels
    of thermal protection: the first one is performed by firmware, the
    second, in case firmware was not able to perform protection, by
    hardware, while the temperature threshold for hardware protection is
    higher than for firmware.

    In both cases, when critical temperature is reached, system will be
    shutdown.

    Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>

It has been verified on Mellanox devices

Signed-off-by: Stephen Sun <stephens@nvidia.com>
yxieca pushed a commit that referenced this pull request May 5, 2023
#14939)

src/linkmgrd

* 700939c - (HEAD -> 202205, origin/202205) [codeql] remove hard coded line numbers in sed commands (#203) (27 hours ago) [Jing Zhang]
* 71a2a3c - [active-standby][bsl] fix no mux probe issue (#201) (27 hours ago) [Jing Zhang]
* 32720cf - Support linking to swss logger (#182) (27 hours ago) [Longxiang Lyu]
qiluo-msft pushed a commit that referenced this pull request May 17, 2023
#14862)

#### Why I did it
src/linkmgrd
```
* 35f7d1c - (HEAD -> 202012, origin/202012) [202012][active-standby][bsl] fix no mux probe issue #201 (#206) (2 weeks ago) [Jing Zhang]
* be701fb - [202012] pick codeql fixes (#207) (2 weeks ago) [Jing Zhang]
* 0b42cec - Enable debug symbols (#199) (3 weeks ago) [Longxiang Lyu]
```
mssonicbld added a commit that referenced this pull request Jun 22, 2023
#15576)

#### Why I did it
src/linkmgrd
```
* fc6e299 - (HEAD -> 202211, origin/202211) [active-standby] Enforce switchover based on heartbeats when mux probe keeps failing (#184) (2 hours ago) [Jing Zhang]
* 5c6332d - Re-handle pre-init mux config notification after state machine init (#202) (2 hours ago) [Longxiang Lyu]
* c49a5ef - [active-standby][bsl] fix no mux probe issue (#201) (2 hours ago) [Jing Zhang]
* 2d62ef1 - Enable debug symbols (#199) (2 hours ago) [Longxiang Lyu]
* f952b64 - [active-active] Add mux server state correction mechanism (#191) (2 hours ago) [Longxiang Lyu]
* e6b1bfc - [ci] fix azure pipeline (#190) (2 hours ago) [Jing Zhang]
* 615ed21 - [active-standby] Enforce switchover based on heartbeats when mux probe keeps failing (#184) (2 hours ago) [Jing Zhang]
* 3adfc69 - [active-active] add state transition handler for (LinkProber: Unknown, MuxState: Active, LinkState: Down) (#179) (2 hours ago) [Jing Zhang]
* 6fb9a0b - loose link down swithcover condition (#178) (2 hours ago) [Jing Zhang]
* 8ffbd8a - [ci] Fix apt-get install unable locate package issue. (#177) (2 hours ago) [Liu Shilong]
* 3dfbdd7 - [active-active] link operational down didn't trigger toggle to standby if `MuxUnknown` event arrives first.  (#175) (2 hours ago) [Jing Zhang]
* 68c06d9 - [active-active] Toggle to standby if default route is missing (#171) (2 hours ago) [Longxiang Lyu]
* 1592cd3 - [active-active] fix issue that interfaces get stuck in `active` if service starts up with link state down (#169) (2 hours ago) [Jing Zhang]
* a96105f - Fix the warning of unused variables (#167) (2 hours ago) [Longxiang Lyu]
* 984ffe3 - Fix mux config when gRPC connection is lost (#166) (2 hours ago) [Longxiang Lyu]
* 4d0b457 - [active-active] force switch when config == active && target state == active (#164) (2 hours ago) [Jing Zhang]
* 32bd2bb - Use github code scanning instead of LGTM (#157) (2 hours ago) [Liu Shilong]
* 6f23fe2 - [active-active] update linkmgr health label definition (#163) (3 hours ago) [Jing Zhang]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

None yet

3 participants