Skip to content

Commit 1cc70d0

Browse files
authored
Revert "[201811] Check platform reboot cause to see if any reset happened during fast/warm-reboot (#8912)"
This reverts commit a80319e.
1 parent b39f6b3 commit 1cc70d0

File tree

7 files changed

+141
-291
lines changed

7 files changed

+141
-291
lines changed

files/build_templates/database.service.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Description=Database container
33
Requires=docker.service
44
After=docker.service
5-
After=rc-local.service
65

76
[Service]
87
User=root

files/build_templates/docker_image_ctl.j2

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ function getMountPoint()
55
echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print '' if len(mnts) == 0 else os.path.basename(mnts[0]['Source'])" 2>/dev/null
66
}
77

8-
function isPlatformReset()
9-
{
10-
output=$(python -c "import sonic_platform.platform; p = sonic_platform.platform.Platform(); c = p.get_chassis(); hw_rc_major, hw_rc_minor = c.get_reboot_cause(); print(hw_rc_major)" 2>/dev/null)
11-
12-
if [[ "${output}" != "Non-Hardware" ]]; then
13-
return 0
14-
else
15-
return 1
16-
fi
17-
}
18-
198
function getBootType()
209
{
2110
# same code snippet in files/scripts/syncd.sh
@@ -32,9 +21,6 @@ function getBootType()
3221
*)
3322
TYPE='cold'
3423
esac
35-
if isPlatformReset; then
36-
TYPE='cold'
37-
fi
3824
echo "${TYPE}"
3925
}
4026

@@ -73,7 +59,7 @@ function postStartAction()
7359
fi
7460

7561
if [[ "$BOOT_TYPE" == "fast" ]]; then
76-
# set the FAST_REBOOT|system key to expire in 3 minutes
62+
# set the key to expire in 3 minutes
7763
redis-cli -n 6 SET "FAST_REBOOT|system" "1" "EX" "180"
7864
fi
7965

files/build_templates/sonic_debian_extension.j2

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,6 @@ sudo cp $IMAGE_CONFIGS/process-reboot-cause/process-reboot-cause.service $FILES
268268
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable process-reboot-cause.service
269269
sudo cp $IMAGE_CONFIGS/process-reboot-cause/process-reboot-cause $FILESYSTEM_ROOT/usr/bin/
270270

271-
# Copy determine-reboot-cause service files
272-
sudo cp $IMAGE_CONFIGS/process-reboot-cause/determine-reboot-cause.service $FILESYSTEM_ROOT/etc/systemd/system/
273-
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable determine-reboot-cause.service
274-
sudo cp $IMAGE_CONFIGS/process-reboot-cause/determine-reboot-cause $FILESYSTEM_ROOT/usr/bin/
275-
276271
## Install package without starting service
277272
## ref: https://wiki.debian.org/chroot
278273
sudo tee -a $FILESYSTEM_ROOT/usr/sbin/policy-rc.d > /dev/null <<EOF

files/build_templates/swss.service.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Requires=nps-modules-4.9.0-14-amd64.service
88
{% endif %}
99
After=database.service updategraph.service
1010
After=interfaces-config.service
11-
After=pmon.service
1211
Before=ntp-config.service
1312
StartLimitIntervalSec=1200
1413
StartLimitBurst=3

files/image_config/process-reboot-cause/determine-reboot-cause

Lines changed: 0 additions & 248 deletions
This file was deleted.

files/image_config/process-reboot-cause/determine-reboot-cause.service

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)