-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adding stack to errors #560
Conversation
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
a1f0e33
to
1f7c3f2
Compare
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
return netns.Get() | ||
nsHandle, err := netns.Get() | ||
if err != nil { | ||
return -1, errors.Wrap(err, "failed to create net NS handle") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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>
There was a problem hiding this 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 ;)
…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>
…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>
…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>
Related to networkservicemesh/sdk#705