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

Adding stack to errors #560

Merged

Conversation

wazsone
Copy link
Contributor

@wazsone wazsone commented Jan 26, 2023

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
@wazsone wazsone force-pushed the feature/adding-errors-stack branch from a1f0e33 to 1f7c3f2 Compare January 26, 2023 17:02
@wazsone wazsone changed the title Feature/adding errors stack Adding stack to errors Jan 26, 2023
@wazsone wazsone marked this pull request as ready for review January 26, 2023 17:21
@wazsone wazsone self-assigned this Jan 27, 2023
@wazsone wazsone marked this pull request as draft February 1, 2023 09:20
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
@wazsone wazsone marked this pull request as ready for review February 1, 2023 17:08
return netns.Get()
nsHandle, err := netns.Get()
if err != nil {
return -1, errors.Wrap(err, "failed to create net NS handle")
Copy link
Member

Choose a reason for hiding this comment

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

NOTE: we are getting netns

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@denis-tingaikin Thank you, done

@@ -56,7 +63,7 @@ func RunIn(current, target netns.NsHandle, runner func() error) error {

curr, err := netns.Get()
if err != nil {
return err
return errors.Wrap(err, "failed to create net NS handle")
Copy link
Member

Choose a reason for hiding this comment

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

NOTE: we are getting netns

}
if err = netlinkHandle.LinkSetHardwareAddr(l, macAddr); err != nil {
return errors.Wrapf(err, "failed to set MAC address for the VF: %v", macAddr)
}
if err = netlinkHandle.LinkSetUp(l); err != nil {
return errors.WithStack(err)
return errors.Wrapf(err, "failed to enable link device %s", l.Attrs().Name)
Copy link
Member

Choose a reason for hiding this comment

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

failed to setup link for the interface %v

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@denis-tingaikin Thank you, done

@@ -71,13 +70,13 @@ func setKernelHwAddress(ctx context.Context, conn *networkservice.Connection, is
return nil
}
if err = netlinkHandle.LinkSetDown(l); err != nil {
return errors.WithStack(err)
return errors.Wrapf(err, "failed to disable link device %s", l.Attrs().Name)
Copy link
Member

Choose a reason for hiding this comment

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

failed to set down link for the interface %v

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

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

There is still comments, please consider in the separate PR.

UPD: NVM, I did read to quick ;)

@denis-tingaikin denis-tingaikin merged commit a321f02 into networkservicemesh:main Feb 18, 2023
nsmbot pushed a commit to networkservicemesh/sdk-sriov that referenced this pull request Feb 18, 2023
…k-kernel@main

PR link: networkservicemesh/sdk-kernel#560

Commit: a321f02
Author: Denis Tingaikin
Date: 2023-02-18 14:02:34 +0300
Message:
  - Merge pull request #560 from wazsone/feature/adding-errors-stack
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-l7-proxy that referenced this pull request Feb 18, 2023
…k-kernel@main

PR link: networkservicemesh/sdk-kernel#560

Commit: a321f02
Author: Denis Tingaikin
Date: 2023-02-18 14:02:34 +0300
Message:
  - Merge pull request #560 from wazsone/feature/adding-errors-stack
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-vpp that referenced this pull request Feb 18, 2023
…k-kernel@main

PR link: networkservicemesh/sdk-kernel#560

Commit: a321f02
Author: Denis Tingaikin
Date: 2023-02-18 14:02:34 +0300
Message:
  - Merge pull request #560 from wazsone/feature/adding-errors-stack
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
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.

2 participants