Skip to content

sysrepo model changes aren't noticed without a netopeer2-server restart #139

@tmarsh-rvbd

Description

@tmarsh-rvbd

Summary:
I’ve been using the netopeer2-cli tool to query an instance of the dockerhub sysrepo-netopeer image (https://hub.docker.com/r/sysrepo/sysrepo-netopeer2/). When I delete a model from it, it seems that the server needs to be restarted before it starts to change its answers based on the new model list.

Detail:
Initially on the client, I can query the schema of a model:

> get-schema --model iana-if-type 
MODULE
module iana-if-type {
...

Then if I uninstall a model (iana-if-type) on the server:

root@c7e3ee60207b:/opt/dev# sysrepoctl --list
Sysrepo schema directory: /etc/sysrepo/yang/
Sysrepo data directory:   /etc/sysrepo/data/
(Do not alter contents of these directories manually)

Module Name                   | Revision   | Conformance | Data Owner          | Permissions | Submodules                    | Enabled Features
-----------------------------------------------------------------------------------------------------------------------------------------------
ietf-netconf-acm              | 2012-02-22 | Installed   | root:root           | 666         |                               |
ietf-netconf-notifications    | 2012-02-06 | Installed   | root:root           | 666         |                               |
ietf-netconf                  | 2011-06-01 | Imported    | root:root           | 666         |                               |
nc-notifications              | 2008-07-14 | Installed   | root:root           | 666         |                               |
notifications                 | 2008-07-14 | Installed   | root:root           | 666         |                               |
turing-machine                | 2013-12-27 | Installed   | root:root           | 666         |                               |
iana-if-type                  | 2014-05-08 | Installed   |                     |             |                               |
ietf-interfaces               | 2014-05-08 | Implemented | root:root           | 666         |                               |
ietf-ip                       | 2014-06-16 | Installed   |                     |             |                               |

root@c7e3ee60207b:/opt/dev# sysrepoctl --uninstall --module iana-if-type
Uninstalling the module 'iana-if-type'...
Deleted the schema file '/etc/sysrepo/yang/iana-if-type@2014-05-08.yang'.
Deleted the data files for module 'iana-if-type'.
Uninstall operation completed successfully.
root@c7e3ee60207b:/opt/dev# sysrepoctl --list
Sysrepo schema directory: /etc/sysrepo/yang/
Sysrepo data directory:   /etc/sysrepo/data/
(Do not alter contents of these directories manually)

Module Name                   | Revision   | Conformance | Data Owner          | Permissions | Submodules                    | Enabled Features
-----------------------------------------------------------------------------------------------------------------------------------------------
ietf-netconf-acm              | 2012-02-22 | Installed   | root:root           | 666         |                               |
ietf-netconf-notifications    | 2012-02-06 | Installed   | root:root           | 666         |                               |
ietf-netconf                  | 2011-06-01 | Imported    | root:root           | 666         |                               |
nc-notifications              | 2008-07-14 | Installed   | root:root           | 666         |                               |
notifications                 | 2008-07-14 | Installed   | root:root           | 666         |                               |
turing-machine                | 2013-12-27 | Installed   | root:root           | 666         |                               |
ietf-interfaces               | 2014-05-08 | Implemented | root:root           | 666         |                               |
ietf-ip                       | 2014-06-16 | Installed   |                     |             |                               |

I can still see it on the client:

> get-schema --model iana-if-type 
MODULE
module iana-if-type {
...

Rebooting the client doesn’t change the result. However if I kill netopeer2-server and wait for a restart (and then also restart the client), I do see the change:

> get-schema --model iana-if-type
ERROR
	type:     application
	tag:      invalid-value
	severity: error
	message:  The requested schema was not found.

>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions