Giter Club home page Giter Club logo

Comments (15)

Lllyh69 avatar Lllyh69 commented on August 17, 2024 1

Thank you!
I used the devel version of sysrepo and netopeer2, and now I can successfully modify the configuration by edit-config!

from netopeer2.

satomhxl avatar satomhxl commented on August 17, 2024

I update netopeer2 to the latest release these days, and I encountered the same problem,

from netopeer2.

michalvasko avatar michalvasko commented on August 17, 2024

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?

from netopeer2.

Lllyh69 avatar Lllyh69 commented on August 17, 2024

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!

from netopeer2.

michalvasko avatar michalvasko commented on August 17, 2024

This must be some incompatibility on your end, mixed sysrepo installations or something similar, it does not make sense.

from netopeer2.

satomhxl avatar satomhxl commented on August 17, 2024

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

from netopeer2.

Lllyh69 avatar Lllyh69 commented on August 17, 2024

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

from netopeer2.

michalvasko avatar michalvasko commented on August 17, 2024

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.

from netopeer2.

Lllyh69 avatar Lllyh69 commented on August 17, 2024

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.

from netopeer2.

michalvasko avatar michalvasko commented on August 17, 2024

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.

from netopeer2.

satomhxl avatar satomhxl commented on August 17, 2024

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:*

from netopeer2.

Lllyh69 avatar Lllyh69 commented on August 17, 2024

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 implement netopeer2_test, everything is fine.
Then I installed ieee802-dot1q-bridge and other yang models, shut down the NACM service, and the above problems occurred.

from netopeer2.

michalvasko avatar michalvasko commented on August 17, 2024

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.

from netopeer2.

Lllyh69 avatar Lllyh69 commented on August 17, 2024

Do netopeer2, libyang, libnetconf2, sysrepo all need to install the develbranches?

from netopeer2.

michalvasko avatar michalvasko commented on August 17, 2024

Yes, ideally, to prevent any problems.

from netopeer2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.