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

op-mode: T5633, T6465: fix error when op cmd interrupted, updates some system call syntax #3731

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

Giggum
Copy link
Contributor

@Giggum Giggum commented Jun 27, 2024

Change Summary

Replaces previous PR which I closed by accident: #3700

Summary:
Add exception catching for broken pipe error to exit gracefully when user stops program output. Resolves T5633: Bug 1 and 3

Corrects syntax for invoked "show ipv6 route bgp" command

Updates syntax for invoked show system image version / show system image storage to new CLI syntax

Note: Bug 2 identified in T5633 is non-breaking but has not been solved in this PR. I've narrowed the issue down to the underlying vyatta-op-cmd-wrapper shell code. I'm proposing to open a new Maniphest ticket specifically on this bug and close T5633 when PR is merged that way it's separated from this work and still visible as a bug to be fixed in the future.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T5633 bugs 1 and 3
https://vyos.dev/T6465

Related PR(s)

Component(s) name

Proposed changes

See above for changes.

How to test

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@Giggum Giggum requested a review from a team as a code owner June 27, 2024 17:19
@Giggum
Copy link
Contributor Author

Giggum commented Jun 27, 2024

Apologies, I accidentally deleted my branch and it closed the previous PR below (#3700) so duplicating it again for a merge.

Before
Pressing 'q' to exit during op-command output yielded a BrokenPipeError. This issue affects VyOS 1.4 as well see output below:

vyos@vyos:~$ sh tech-support report

--------------------------------
VyOS Version and Package Changes
--------------------------------
Version:          VyOS 1.5-rolling-202310021845
Release train:    current

Built by:         [email protected]
Built on:         Mon 02 Oct 2023 20:06 UTC
Build UUID:       51c6bd24-f741-4df2-8dc2-053ffa2e992c
Build commit ID:  86f80f99c57240

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    b78d1414-6c0b-485c-b20a-7418cf5668c7

Copyright:        VyOS maintainers and contributors

Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf>
BrokenPipeError: [Errno 32] Broken pipe


vyos@vyos:~$ show tech-support report

--------------------------------
VyOS Version and Package Changes
--------------------------------
Version:          VyOS 1.4.0
Release train:    sagitta
Release flavor:   generic

Built by:         Sentrium S.L.
Built on:         Tue 04 Jun 2024 09:23 UTC
Build UUID:       5e6ae0c4-4d17-4b69-9247-b4ba44a3e3c2
Build commit ID:  35dd8ae6522c78-dirty

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Dell Inc.
Hardware model:   OptiPlex 3060
Hardware S/N:     (redacted)
Hardware UUID:    (redacted)

Copyright:        VyOS maintainers and contributors

------------------
Configuration file
------------------
container {
    name adguardhome {
        allow-host-networks
        capability "net-bind-service"
        image "docker.io/adguard/adguardhome:latest"
        restart "always"
        volume adguardhome-conf {
            destination "/opt/adguardhome/conf"
qException ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
vyos@vyos:~$ q

After
No error when 'q' pressed to exit running of op-command


vyos@vyos:~$ show tech-support report

--------------------------------
VyOS Version and Package Changes
--------------------------------
Version:          VyOS 1.5-rolling-202406060020
Release train:    current
Release flavor:   generic

Built by:         [email protected]
Built on:         Thu 06 Jun 2024 03:11 UTC
Build UUID:       e0cb746f-5572-4aaf-8d6c-536ac82e5957
Build commit ID:  9c2ec5e3d31713

Architecture:     x86_64
Boot via:         installed image
System type:      QEMU guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    b165d52d-5db7-4edb-990a-09d083799a23

Copyright:        VyOS maintainers and contributors

------------------
Configuration file
------------------
interfaces {
    ethernet eth0 {
        address "dhcp"
        address "2001:db8:3456::1/48"
        mtu "1492"
        offload {
            gro
            gso
vyos@vyos:~$ 

Copy link

❌ VyOS CLI smoketests cancelled!

@sever-sever
Copy link
Member

@Mergifyio backport circinus sagitta

Copy link
Contributor

mergify bot commented Jun 28, 2024

@sever-sever sever-sever merged commit a095a3c into vyos:current Jun 28, 2024
19 of 24 checks passed
mergify bot pushed a commit that referenced this pull request Jun 28, 2024
…lls to new cli syntax (#3731)

(cherry picked from commit a095a3c)
mergify bot pushed a commit that referenced this pull request Jun 28, 2024
…lls to new cli syntax (#3731)

(cherry picked from commit a095a3c)
c-po added a commit that referenced this pull request Jun 28, 2024
op-mode: T5633, T6465: fix error when op cmd interrupted, updates some system call syntax (backport #3731)
c-po added a commit that referenced this pull request Jul 1, 2024
op-mode: T5633, T6465: fix error when op cmd interrupted, updates some system call syntax (backport #3731)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants