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

bcmsh is blocking bcmcmd, and no timeout either #1762

Closed
zhenggen-xu opened this issue Jun 1, 2018 · 7 comments
Closed

bcmsh is blocking bcmcmd, and no timeout either #1762

zhenggen-xu opened this issue Jun 1, 2018 · 7 comments

Comments

@zhenggen-xu
Copy link
Collaborator

zhenggen-xu commented Jun 1, 2018

Description

/var/run/sswsyncd/sswsyncd.socket seems to only allow one client, this is problematic especially when we have bcmsh enabled. If some one is using bcmsh, and bcmcmd will hang there. Ever worse, bcmsh does not time-out, so bcmcmd could be blocked there forever until you kill the bcmsh.

Steps to reproduce the issue:

  1. run bcmsh
    a# bcmsh
    Press Enter to show prompt.
    Press Ctrl+C to exit.
    drivshell>

  2. bcmcmd ps
    <== stuck here

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@lguohan
Copy link
Collaborator

lguohan commented Aug 12, 2018

what's your expectation?

@lguohan
Copy link
Collaborator

lguohan commented Aug 12, 2018

we can only support one client at one time. The drivshell is not designed to support multiple shells.

@zhenggen-xu
Copy link
Collaborator Author

If only one shell is supported, if we start bcmsh, we should print the "warning" messages so people will be careful of using it as it could block regular CLI.

Second, if someone runs bcmsh today and close the terminal, no timeout was done, bcmcmd etc will be blocked forever. We should enable time out to close bcmsh automatically, or at least bcmcmd related CLI should detect bcmsh and print messages to let user act.

@lguohan
Copy link
Collaborator

lguohan commented Aug 13, 2018

address in #1921 . add inactivity timer.

bcmcmd has default timemout, it will not block forever.

@lguohan lguohan closed this as completed Aug 13, 2018
@zhenggen-xu
Copy link
Collaborator Author

zhenggen-xu commented Aug 13, 2018

Based on my testing, there was no default timeout, I connect socat to the UNIX socket and kill the terminal, it never (at least hours) exits and no bcmcmd command can run after that unless you kill that socat session.

@svc-acs
Copy link
Collaborator

svc-acs commented Aug 14, 2018

can you elaborate, did you test #1921.

@zhenggen-xu
Copy link
Collaborator Author

The comments were for bcmsh testing before the changes in #1921. After the changes, it should be fine. You can close this.

vivekrnv added a commit to vivekrnv/sonic-buildimage that referenced this issue Sep 15, 2021
Signed-off-by: Vivek Reddy Karri <[email protected]>

ce11545 [config reload] Removed job-mode for sonic.target restart (sonic-net#1820)
f76f672 [fdbshow]: Fix typo in comment (sonic-net#1809)
17208a0 [ci]: Support PR coverage (sonic-net#1806)
c2c2354 fix wrong code indent in sfputil (sonic-net#1808)
47a9a0f [portconfig] Validate duplicate speed value and interface type value (sonic-net#1745)
f1086ee [sonic_installer]Add --skip-platform-check option for sonic_installer when image mismatch (sonic-net#1791)
c007d65 [warm-reboot] Add new preboot health check: verify database integrity (sonic-net#1785)
41e31e8 Fix PatchApplier init order (sonic-net#1762)
qiluo-msft pushed a commit that referenced this issue Sep 28, 2021
0d538d3 [ci]: Support code diff coverage (#1834)
48887d1 [config] support for configuring muxcable to standby mode of operation (#1837)
2088a9a Provide support to install platform extensions (#1578)
c97fe54 Add check_db_integrity script to setup.py (#1828)
c0b9917 [debug dump util] COPP Module Added (#1670)
826311c [techsupport] Removed interactive option for docker commands and Improved Error Reporting (#1723)
ce11545 [config reload] Removed job-mode for sonic.target restart (#1820)
f76f672 [fdbshow]: Fix typo in comment (#1809)
17208a0 [ci]: Support PR coverage (#1806)
c2c2354 fix wrong code indent in sfputil (#1808)
47a9a0f [portconfig] Validate duplicate speed value and interface type value (#1745)
f1086ee [sonic_installer]Add --skip-platform-check option for sonic_installer when image mismatch (#1791)
c007d65 [warm-reboot] Add new preboot health check: verify database integrity (#1785)
41e31e8 Fix PatchApplier init order (#1762)
2416175 [config reload] Fix config reload failure due to sonic.target job cancellation (#1814)
2b12aad [portstat, intfstat] added rates and utilization (#1750)
26e700a [debug dump util] Techsupport addition (#1669)
9f2326e [debug dump util] Base Skeleton and Click Class added (#1668)
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this issue Feb 5, 2022
…rt auto negotiation (sonic-net#1762)

- What I did
Update the speed used for headroom calculating according to port auto-negotiation change.
The speed taken into the calculation is now called effective speed in the code.

- Why I did it
One logic was to take the configured speed into account when calculating the headroom because it's the maximum possible speed at which a port runs.
As port auto-negotiation supported, this logic needs to be updated accordingly:
The maximum possible speed is no longer the configured one with auto-negotiation enabled.
So the speed taken into account should be:

If port auto-negotiation is enabled:
maximum speed in adv_speeds if it is configured
maximum speed in supported_speeds otherwise
Otherwise: the configured speed

- How I verified it
Run regression test and vs test.

Signed-off-by: Stephen Sun [email protected]
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this issue Apr 28, 2022
#### What I did
Otherwise PatchSorter will see both config_wrapper, patch_wrapper as None.

#### How I did it

#### How to verify it

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants