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

RESTCONF request updates only running datastore in device #1219

Closed
sekobey opened this issue Jan 13, 2023 · 3 comments
Closed

RESTCONF request updates only running datastore in device #1219

sekobey opened this issue Jan 13, 2023 · 3 comments

Comments

@sekobey
Copy link

sekobey commented Jan 13, 2023

Hi,

Describe the bug
I am making a RESTCONF call to the device to update a YANG module's data. For example; I want to update the hostname of the device via the PATCH request below:

curl --location --request PATCH 'http://localhost:8888/restconf/data/network-topology:network-topology/topology=topology-netconf/node=3608014978/yang-ext:mount/ietf-system:system' \
--header 'accept: application/yang-data+json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'Content-Type: application/json' \
--data-raw '{
  "ietf-system:system": {
    "hostname": "test"
  }
}
'

It successfully updates the running data-store in the device. However, when I reboot the device, all changes are gone. Because, this RESTCONF call does not update startup data-store in the device. In RFC 8040, there is a passage as follows:

If the NETCONF server supports :startup, the RESTCONF server MUST
automatically update the non-volatile startup configuration
datastore, after the "running" datastore has been altered as a
consequence of a RESTCONF edit operation.

I think, lighty.io should guarantee that changes must be persisted to startup data-store according RFC 8040 spec.

Thanks.

Branch
15.x

To Reproduce
RESTCONF call:

curl --location --request PATCH 'http://localhost:8888/restconf/data/network-topology:network-topology/topology=topology-netconf/node=3608014978/yang-ext:mount/ietf-system:system' \
--header 'accept: application/yang-data+json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'Content-Type: application/json' \
--data-raw '{
  "ietf-system:system": {
    "hostname": "test"
  }
}

Expected behavior
Any update on device that is made via RESTCONF call must be recorded to startup data-store (if exists) in additional to running data-store. In this way, changes will be permanent.

Environment (please complete the following information):

  • OS: Mac OS Monterey 12.6
  • Java Version: 11.0.16
  • Maven version: 3.6.3
@ihrasko
Copy link
Collaborator

ihrasko commented Feb 3, 2023

Thank you for your report. The bug is most probably present in RESTCONF/NETCONF component in OpenDaylight. https://jira.opendaylight.org/browse/NETCONF-948 tracks this.

@sekobey
Copy link
Author

sekobey commented Feb 9, 2023

Ok, thank you.

@ihrasko
Copy link
Collaborator

ihrasko commented Jun 9, 2023

ODL issue https://jira.opendaylight.org/browse/NETCONF-948 has been closed.

We assume that this is not a bug in ODL/lighty.io as its device responsibility to maintain its startup datastores.
Please ask your vendor to make the device RFC8040 compliant.

We hope that this helps.

Best.

@ihrasko ihrasko closed this as completed Jun 9, 2023
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

2 participants