Closed Lllyh69 closed 1 week ago
I update netopeer2 to the latest release these days, and I encountered the same problem,
You are right that the value in the output is the old one for some reason but everything else looks fine, quite strange. Can you actually check the value, using sysrepocfg -X
, for example?
It is my xml:ietf-mac-cfg.xml
<bridges xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"
xmlns:brtc="urn:nxp:dn:storage:yang:nxp-bridge-vlan-tc-flower"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<bridge>
<name>br1</name>
<bridge-type>provider-edge-bridge</bridge-type>
<address nc:operation="replace">d7-ad-62-c5-49-ae</address>
</bridge>
</bridges>
If I use:
sysrepocfg -d running -m ieee802-dot1q-bridge -X
I still get the old output:d6-ad-62-c5-49-ae
<bridges xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">
<bridge>
<name>br1</name>
<address>d6-ad-62-c5-49-ae</address>
<bridge-type>provider-edge-bridge</bridge-type>
</bridge>
</bridges>
However, I was able to modify the value of l
in the examples.yang
with some operations。I also think it is quite strange!
This must be some incompatibility on your end, mixed sysrepo installations or something similar, it does not make sense.
Is there any method to debug this issue?
I think I've uninstall the old version of sysrepo, by executing make uninstall
and make clean
.
And whereis sysrepocfg
and whereis sysrepoctl
only output one path.
sysrepocfg -V
is "sysrepocfg - sysrepo configuration manipulation tool, compiled with libsysrepo v2.2.170 (SO v7.24.11)"
Now I can successfully change the sysrepo running datastore by
sysrepocfg --edit=something.xml
But I can't change the sysrepo running datastore by the command below in netopeer2-cli
edit-config --target running --config=something.xml
I can also change the sysrepo running datastore by:
sysrepocfg --edit=$FILE -d running -f xml -m ieee802-dot1q-bridge -v2
But I can't change the sysrepo running datastore by:edit-config
I am sorry but I am not able to help, I have never seen such an issue and since it occurred after updating, it must be caused by the old version, somehow.
But I haven't downloaded the old version, I've been using the latest version since the beginning. This question is so confusing to me.
The only explanation is that netopeer2-server
is linked with a different sysrepo than sysrepocfg
, I cannot help with that. But if you are certain your setup is correct, try using a fresh VM and install everything from scratch. If it does not work this way, post your exact installation steps so that I can reproduce it.
Hello, this is my steps to reproduce the problem. My host machine: ubuntu 22.04.
Prepare these files: O-RAN.WG4.MP-YANGs-R003-v14.00.zip test_files.zip
# on host machine, create and run docker container
docker pull ubuntu:latest
docker run -it --name new_netopeer2 ubuntu:latest /bin/bash
# copy prepared files from host to docker container
docker cp O-RAN.WG4.MP-YANGs-R003-v14.00.zip test_files.zip <container-id>:/root
# In docker container, install needed softwares
apt update
apt upgrade
apt install -y vim cmake libssh-dev wget unzip libpcre2-dev curl libcurl4-openssl-dev build-essential pkg-config
# install latest netopeer2 release
cd /opt
wget https://github.com/CESNET/libyang/archive/refs/tags/v2.2.8.zip -O libyang-2.2.8.zip
unzip libyang-2.2.8.zip
cd libyang-2.2.8/
mkdir build
cd build
cmake ../
make
make install
cd ../..
wget https://github.com/CESNET/libnetconf2/archive/refs/tags/v3.0.17.zip -O libnetconf2-3.0.17.zip
unzip libnetconf2-3.0.17.zip
cd libnetconf2-3.0.17/
mkdir build
cd build
cmake ../
make
make install
cd ../..
wget https://github.com/sysrepo/sysrepo/archive/refs/tags/v2.2.170.zip -O sysrepo-2.2.170.zip
unzip sysrepo-2.2.170.zip
cd sysrepo-2.2.170/
mkdir build
cd build
cmake ../
make
make install
cd ../..
ldconfig
sysrepoctl -l
wget https://github.com/CESNET/netopeer2/archive/refs/tags/v2.2.19.zip -O netopeer2-2.2.19.zip
unzip netopeer2-2.2.19.zip
cd netopeer2-2.2.19/
mkdir build
cd build
cmake ../
make
make install
cd ../..
# in docker container, install o-ran yangs and prepare test user and nacm.
cd /root
unzip O-RAN.WG4.MP-YANGs-R003-v14.00.zip -d O-RAN.WG4.MP-YANGs-R003-v14.00
unzip test_files.zip
adduser testuser
bash test_deploy.sh
# now you can run netopeer2-server and try to edit the o-ran-sync.yang from netopeer2-cli
netopeer2-server
netopeer2-cli
> connect --host 127.0.0.1 --login testuser
> get --filter-xpath /o-ran-sync:*
# the configuration below should be added to sysrepo successfully
> edit-config --target running --config=sync_ptp_cfg_24.xml
> get --filter-xpath /o-ran-sync:*
# the configuration below can not be applied to sysrepo
> edit-config --target running --config=sync_ptp_cfg_25.xml
> get --filter-xpath /o-ran-sync:*
I have reinstalled netoppeer2 with a new VM as you suggested, and I still have the problem of not being able to modify the configuration data. Here are my steps to install netoppeer2: I used Ubuntu22.04 LTS Download the latest versions of netopeer2, libyang, sysrepo, libnetconf2. Compile libyang --> libnetconf2 --> sysrepo.
unzip netopeer2.zip
unzip libyang.zip
unzip sysrepo.zip
unzip libnetconf2.zip
cd libyang
Mkdir build
cd build
Cmake ..
make
sudo make install
cd
cd libnetconf2
Mkdir build
cd build
Cmake ..
make
sudo make install
cd
cd sysrepo
Mkdir build
cd build
Cmake ..
make
sudo make install
cd
After compiling, add the lib library to the system lib.
sudo ln -s /usr/local/lib/libsysrepo.so.7 /lib/
sudo ln -s /usr/local/lib/libnetconf2.so.4 /lib/
sudo ln -s /usr/local/lib/libyang.so.3 /lib/
Finally, compile netopeer2.
cd netopeer2
Mkdir build
cd build
Cmake ..
make
sudo make install
The only problem is that incmake..
During the process, occurred Not Found Uncrusity
, but still successfully compiled.
After compiling netoppeer2 can also implementnetopeer2_test
, everything is fine.
Then I installed ieee802-dot1q-bridge
and other yang models
, shut down the NACM service, and the above problems occurred.
Sorry, I forgot to ask you to try using the current devel
branches instead of master
, there were some issues in this release (although I do not think as severe as this) that should be fixed now.
Do netopeer2, libyang, libnetconf2, sysrepo all need to install the devel
branches?
Yes, ideally, to prevent any problems.
Thank you!
I used the devel
version of sysrepo and netopeer2, and now I can successfully modify the configuration by edit-config
!
Hi, I encountered an issue when attempting to modify the configuration. Initially, I initialized a part of the "ieee802-dot1q-bridge" model as follows:
However, when I tried to use
edit-config
to modify the "address" to "d7-ad-62-c5-49-ae", I encountered some issues:Server Logs:
Listener Output:
I find that the configuration changes did not succeed, but there is no indication of what went wrong. Please help me.
Thanks!!