Skip to content

Commit

Permalink
[pcie.yaml] Move pcie configuration file path to platform directory (s…
Browse files Browse the repository at this point in the history
…onic-net#6475)

- Why I did it
The pcie configuration file location is under plugin directory not under platform directory.
sonic-net#6437

- How I did it

Move all pcie.yaml configuration file from plugin to platform directory.
Remove unnecessary timer to start pcie-check.service
Move pcie-check.service to sonic-host-services
- How to verify it
Verify on the device
  • Loading branch information
sujinmkang authored and yxieca committed Mar 3, 2021
1 parent 1ef1736 commit edd7fa1
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ platform/**/*-none-any.whl
platform/**/.pybuild
platform/**/debian/*
platform/**/build
platform/**/*.ko
platform/**/*.mod.c
platform/**/*.mod.o
platform/**/*.o
platform/**/*.d
platform/**/*.cmd
platform/**/*.order
platform/broadcom/sonic-platform-modules-dell/s5232f/sonic_platform/ipmihelper.py
platform/broadcom/sonic-platform-modules-dell/s6100/modules/dell_ich.c
platform/broadcom/sonic-platform-modules-dell/s6100/modules/dell_s6100_lpc.c
Expand Down
9 changes: 0 additions & 9 deletions files/build_templates/pcie-check.timer

This file was deleted.

4 changes: 0 additions & 4 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,6 @@ sudo cp $IMAGE_CONFIGS/constants/constants.yml $FILESYSTEM_ROOT/etc/sonic/
sudo cp $IMAGE_CONFIGS/sudoers/sudoers $FILESYSTEM_ROOT/etc/
sudo cp $IMAGE_CONFIGS/sudoers/sudoers.lecture $FILESYSTEM_ROOT/etc/

# Copy systemd timer configuration
sudo cp $BUILD_TEMPLATES/pcie-check.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable pcie-check.timer

# Copy pcie-check service files
sudo cp $IMAGE_CONFIGS/pcie-check/pcie-check.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
echo "pcie-check.service" | sudo tee -a $GENERATED_SERVICE_FILE
Expand Down
3 changes: 3 additions & 0 deletions files/image_config/pcie-check/pcie-check.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ After=rc.local.service database.service
[Service]
Type=simple
ExecStart=/usr/bin/pcie-check.sh

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion files/image_config/pcie-check/pcie-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function check_and_rescan_pcie_devices()
PCIE_CHK_CMD='sudo pcieutil check | grep "$RESULTS"'
PLATFORM=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)

if [ ! -f /usr/share/sonic/device/$PLATFORM/plugins/pcie.yaml ]; then
if [ ! -f /usr/share/sonic/device/$PLATFORM/pcie.yaml ]; then
debug "pcie.yaml does not exist! Can't check PCIe status!"
exit
fi
Expand Down

0 comments on commit edd7fa1

Please sign in to comment.