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

[Celestica] Fix issues where the part of udev rule are not working as expect #6039

Merged
merged 13 commits into from
Nov 30, 2020

Conversation

sandycelestica
Copy link
Contributor

- Why I did it
Some udev scripts has no execute permission under admin which cause the cosutil could not get the prefix.
- How I did it
chmod the permission of popmsg.sh and udev_prefix.sh

- How to verify it
consutil show can show the port list as you rename them

- Which release branch to backport (provide reason below if selected)
master

- Description for the changelog
Change the platform-modules-haliburton.postinst.Add below:
sudo chmod +x /usr/local/bin/udev_prefix.sh
sudo chmod +x /usr/local/bin/popmsg.sh

- Test log as below
admin@sonic:$ ls
mytty.json
platform-modules-haliburton_0.9_amd64.deb
platform-modules-haliburton_1.0_amd64.deb
admin@sonic:
$ cd /usr/local/bin/
admin@sonic:/usr/local/bin$ ls -l *.sh
-rwxr-xr-x 1 root staff 2054 Jul 31 2020 finalize-warmboot.sh
-rwxr-xr-x 1 root staff 162 Jul 31 2020 host-ssh-keygen.sh
-rwxr-xr-x 1 root root 963 Jan 28 03:45 platform_api_mgnt.sh
-rw-r--r-- 1 root root 227 Aug 17 2018 popmsg.sh
-rwxr-xr-x 1 root staff 6240 Jul 31 2020 swss.sh
-rwxr-xr-x 1 root staff 5981 Jul 31 2020 syncd.sh
-rw-r--r-- 1 root root 485 Aug 17 2018 udev_prefix.sh
admin@sonic:/usr/local/bin$ cd ~
admin@sonic:$
admin@sonic:
$ sudo dpkg -i platform-modules-haliburton_1.0_amd64.deb
(Reading database ... 27246 files and directories currently installed.)
Preparing to unpack platform-modules-haliburton_1.0_amd64.deb ...
Unpacking platform-modules-haliburton (1.0) over (0.9) ...
Setting up platform-modules-haliburton (1.0) ...
Synchronizing state of platform-modules-haliburton.service with SysV service script with /lib/systemd/systemd-sysv-install.
........
admin@sonic:$
admin@sonic:
$ cd /usr/local/bin/
admin@sonic:/usr/local/bin$ ls -l *.sh
-rwxr-xr-x 1 root staff 2054 Jul 31 2020 finalize-warmboot.sh
-rwxr-xr-x 1 root staff 162 Jul 31 2020 host-ssh-keygen.sh
-rwxr-xr-x 1 root root 963 Jan 28 03:45 platform_api_mgnt.sh
-rwxr-xr-x 1 root root 227 Jan 28 03:45 popmsg.sh
-rwxr-xr-x 1 root staff 6240 Jul 31 2020 swss.sh
-rwxr-xr-x 1 root staff 5981 Jul 31 2020 syncd.sh
-rwxr-xr-x 1 root root 485 Jan 28 03:45 udev_prefix.sh

This is for consol server on celestica haliburton
…onsolserver

Update platform-modules-haliburton.install
Remove some debug codes
remove the debug info
remove debug info
To enable the execute permission of udev scripts
@Blueve
Copy link
Contributor

Blueve commented Nov 26, 2020

Seems like you are working on a old commit. You can run following commands to fix it:

git fetch origin
git reset --hard 148436d42e4e8371e374af39001b3a8a38bd5b0c
git cherry-pick 128a0968ae713d045f99b66014620b9c54ec84b5

Copy link
Contributor

@Blueve Blueve left a comment

Choose a reason for hiding this comment

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

Please update your PR with previous comments

Grant permission to udevrule scripts for udevprefix.rule generation
Fix port 13 - 48 plug out but not  pop out message issue.
udev rules update for port lost
@sandycelestica
Copy link
Contributor Author

Please update your PR with previous comments

Hi ,
I forked a new branch for my repository and would submit PR again.
And I found that the 50-ttyUSB-C0.rules also need to be updated(This must be a mistake I made before. ). There is an issue for port 13 to port 48 when these ports lost it would not popout messages. Could I update it?

Could I commit these two files in one time?

@Blueve
Copy link
Contributor

Blueve commented Nov 27, 2020

Sure, looks good to me : )
Could you also update the PR description? Then we can know what the extra fix is.
And you can also change the PR title to "[Celestica] Fix issues where the part of udev rule are not working as expect"
I will approve this after you updated the title and description, thanks!

Please update your PR with previous comments

Hi ,
I forked a new branch for my repository and would submit PR again.
And I found that the 50-ttyUSB-C0.rules also need to be updated(This must be a mistake I made before. ). There is an issue for port 13 to port 48 when these ports lost it would not popout messages. Could I update it?

Could I commit these two files in one time?

@sandycelestica sandycelestica changed the title [Celestica] Grant permission to udevrule scripts for udevprefix.rule generation [Celestica] Fix issues where the part of udev rule are not working as expect Nov 28, 2020
@sandycelestica
Copy link
Contributor Author

Mainly changes two files.
Update 50-ttyUSB-C0.rules for port 13 to 48 would not pop out left msg when been disconnected.
Update platform-modules-haliburton.postinst to grant the execute permission of prefix generate file.

@sandycelestica
Copy link
Contributor Author

sandycelestica commented Nov 28, 2020 via email

@Blueve
Copy link
Contributor

Blueve commented Nov 30, 2020

retest vsimage please

@Blueve Blueve self-requested a review November 30, 2020 02:44
@Blueve
Copy link
Contributor

Blueve commented Nov 30, 2020

retest vsimage please

@Blueve Blueve merged commit d475b96 into sonic-net:master Nov 30, 2020
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
… expect (sonic-net#6039)

* Update 50-ttyUSB-C0.rules
Remove some debug codes

* Update popmsg.sh
remove the debug info

* Update udev_prefix.sh
remove debug info

* Update platform-modules-haliburton.postinst
To enable the execute permission of udev scripts

* Update 50-ttyUSB-C0.rules
Fix port 13 - 48 plug out but not  pop out message issue.

Signed-off-by: Jing Kan [email protected]
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.

[console] udevprefix.conf not generated after plug-on usb console switch
2 participants