This script sets up console utilities on the bmc to access switch console#25674
This script sets up console utilities on the bmc to access switch console#25674apoorv-arista wants to merge 1 commit intosonic-net:masterfrom
Conversation
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| udevadm trigger | ||
|
|
||
| echo "sonic udev setup complete." | ||
| echo " Rules symlinked: ${RULES_DEST} -> ${RULES_SRC}" |
There was a problem hiding this comment.
How does this support this requirement that BMC should be able to log the console of the switch CPU all the time and export those logs ?
That is there has to be "read only" access (logging everything including the commands entered) and a "read/write" (normal console access)
There was a problem hiding this comment.
The console logging can be implemented in elsewhere with socat proxy
Here we need a virtual tty device with 0666 permission opened so user can connect to a line without root permission.
There was a problem hiding this comment.
Commit 40f4febf70f3217b844712c7fcea81377fc49fe6 has brought in the proposed mechanism here to #24898
Just an heads up.
|
|
||
| # --- Enable console --- | ||
| echo "Enabling console ..." | ||
| sudo config console enable |
There was a problem hiding this comment.
Do we need touch the config here? Or this suppose to be a kind of default config in BMC system? Do we need persist this config?
|
Please create commit with -s option so the commit is signed. To fix the existing DCO issue, you can do git commit --amend -s on your work branch with this commit on top, and force push to your fork afterwards. |
This script assumes the presense of the following files in the following formats available at the platfomr directory for any particular vendor.
Platform directory location for configuration file
Udev rules to alias out the console devices to a uniform alias
Contents of Udevprefixconf for consutil cli
This helps the consutil cli in enumerating the console device
These two files could be put in the platform directory for each vendor with the following file names :-
And the script in the PR would be packaged as a systemd platform-independent service, which would initialise the console upon the device boot.