sysrepo / sysrepo

YANG-based configuration and operational state data store for Unix/Linux applications

Home Page:http://www.sysrepo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module installation kill sysrepo and now even (sysrepoctl -l) is not working

alex2024git opened this issue · comments

Hi,
I run into an issue during yang module install:

root@6487ebf5352e:/opt/dev# sysrepoctl -v3 -i /opt/dev/iana-if-type.yang --owner=root:root --permissions=644
[INF] Connection 20 created.
[INF] Module "iana-if-type" was installed.
[ERR] JSON DS file: Retrieving user "root:root" passwd entry failed (No such user).
[ERR] Callback "init" of plugin "JSON DS file" for module "iana-if-type" failed.
sysrepoctl error: Failed to install modules (Item not found)
[INF] No datastore changes to apply.
root@6487ebf5352e:/opt/dev# sysrepoctl -l
[ERR] Data model "iana-if-type@2013-07-04" not found in local searchdirs.
[ERR] Loading "iana-if-type" module failed. (/)
sysrepoctl error: Failed to connect (libyang error)
For more details you may try to increase the verbosity up to "-v3".
root@6487ebf5352e:/opt/dev# sysrepoctl -i iana-if-type.yang
[ERR] Data model "iana-if-type@2013-07-04" not found in local searchdirs.
[ERR] Loading "iana-if-type" module failed. (/)
sysrepoctl error: Failed to connect (libyang error)
For more details you may try to increase the verbosity up to "-v3".
root@6487ebf5352e:/opt/dev#

So now it all failed to work at all. Even if i run sysrepoctl -l - it fails.

This is your likely root cause:

[ERR] JSON DS file: Retrieving user "root:root" passwd entry failed (No such user).

Double-check that your OS image has properly configured mapping between UIDs and user names. As a first step, check /etc/passwd and /etc/group. If you're using plugins for glibc's NSS, check the nsswitch settings as well. As a test, try getent passwd root, getent passwd 0, getent group root and getent group 0.

This problem should be fixed and a failed installation should revert all the changes so that sysrepo continues to work. To install the module in your case, you need to separate owner and the group such as --owner root --group root.