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

Can not delete the wg peer for the metadata is nil #1821

Open
mulspace opened this issue Oct 29, 2021 · 0 comments
Open

Can not delete the wg peer for the metadata is nil #1821

mulspace opened this issue Oct 29, 2021 · 0 comments

Comments

@mulspace
Copy link

mulspace commented Oct 29, 2021

Hi,

When I configure the wg and wg peer by vpp-agent, it works.

And when restart vpp-agent, it will try to delete the wg peer. And it is failed for the Metadata is nil.

The log is:
Oct 29 15:30:10 pop vpp-agent[489658]: 87. DELETE [DISCOVERED]:
Oct 29 15:30:10 pop vpp-agent[489658]: - key: config/vpp/wg/v1/peer/wg0/endpoint/172.20.60.80/54321
Oct 29 15:30:10 pop vpp-agent[489658]: - value: { public_key:"HF/PyzhqvfoXWeM7hRhhNBlVEG7OvltAZxKT5lyT4RU=" port:54321 endpoint:"172.20.60.80" wg_if_name:"wg0" allowed_ips:"10.0.0.2/32" }
Oct 29 15:30:10 pop vpp-agent[489658]: - error: failed to delete peer - metadata is nil

From the code, the WithMetadata is True for PeerDescriptor. And there is no MetadataFactory for it. At as result of it, the WgMetadata may be not saved when create wg peer.

@@ -89,21 +92,32 @@ func NewWgPeerDescriptor(wgHandler vppcalls.WgVppAPI, log logging.PluginLogger)
 // the KVScheduler.
 func (d *WgPeerDescriptor) GetDescriptor() *adapter.PeerDescriptor {
        return &adapter.PeerDescriptor{
               WithMetadata:         true,
+               MetadataMapFactory: d.MetadataFactory
        }
 }

Is there any fix/workaround for it.

Thanks.

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

No branches or pull requests

1 participant