sonic-net / sonic-mgmt-framework Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
In SONiC Architecture document, the presentation should point out that NAS and Switch State Services use same SAI API version.
In current SONiC project, sonic-sairedis uses create_vlan_member, remove_vlan_member for VLAN member management, but sonic-nas-ndi uses add_ports_to_vlan, remove_ports_from_vlan
admin@sonic:~ sonic-cli
Error: Unresolved PTYPE "MCLAG_KA_INTERVAL_RANGE" in PARAM "KA"
admin@sonic:~
Installing dependent packages in the Makefile (see here) can break a parallel SONiC image build, because it can cause parallel executions of dpkg
, which can cause failures. The build system has a dedicated lock to ensure only one make process can run dpkg
at a time (also not that these calls to apt-get install
do not have the -y
flag, so they require a human to press y
on the keyboard, which would cause the SONiC image build to fail, anyway).
In the image, we simply need to make sure the dependencies are installed in the build container as well as the host OS before building and installing sonic-mgmt-framework.
I suggest removing these lines and adding instructions for installing these dependencies in the README.md file of this repo. If you would like, you could also change these lines to perform the same checks, but instead of installing the packages, it could error out with a message stating that the dependency is not found.
After building the package, git status
indicates there are changes to go.sum:
diff --git a/go.sum b/go.sum
index 4270499..9cd8b44 100644
--- a/go.sum
+++ b/go.sum
@@ -8,10 +8,14 @@ github.com/antchfx/xmlquery v1.2.1 h1:wE4xjHrqOScP440wdv23Xkg0Gr8JryW0ptqodPH+y2
github.com/antchfx/xmlquery v1.2.1/go.mod h1:/+CnyD/DzHRnv2eRxrVbieRU/FIF6N0C+7oTtyUtCKk=
github.com/antchfx/xpath v1.1.2 h1:YziPrtM0gEJBnhdUGxYcIVYXZ8FXbtbovxOi+UW/yWQ=
github.com/antchfx/xpath v1.1.2/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
+github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
@@ -29,7 +33,20 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0 h1:aRz0NBceriICVtjhCgKkDvl+RudKu1CT6h0ZvUTrNfE=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/protobuf v3.11.4+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM=
github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
@@ -42,10 +59,19 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c h1:a380JP+B7xlMbEQOlha1buKhzBPXFqgFXplyWCEIGEY=
github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c/go.mod h1:t+O9It+LKzfOAhKTT5O0ehDix+MTqbtT0T9t+7zzOvc=
+github.com/openconfig/gnmi v0.0.0-20200307010808-e7106f7f5493/go.mod h1:jMSUQIR4z9WTtM58/QBHbElXAwbUnomFdty1aund1uY=
+github.com/openconfig/gnmi v0.0.0-20200617225440-d2b4e6a45802 h1:WXFwJlWOJINlwlyAZuNo4GdYZS6qPX36+rRUncLmN8Q=
+github.com/openconfig/gnmi v0.0.0-20200617225440-d2b4e6a45802/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A=
github.com/openconfig/goyang v0.0.0-20190924211109-064f9690516f h1:BaekRUaWpfaRBP3mShDZaNi4+EHbdli7D6YXc/TP3lo=
github.com/openconfig/goyang v0.0.0-20190924211109-064f9690516f/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU=
+github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU=
+github.com/openconfig/goyang v0.0.0-20200309174518-a00bece872fc h1:W6XYKuH3mxF5WFhsSQOPPN9DRDba1xz9lbUbQR3uHkg=
+github.com/openconfig/goyang v0.0.0-20200309174518-a00bece872fc/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU=
+github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs=
github.com/openconfig/ygot v0.6.1-0.20190723223108-724a6b18a922 h1:zBLb75mrLMxabjsAhPk/2qxbht+BwHKFWBvRAB4Fd2U=
github.com/openconfig/ygot v0.6.1-0.20190723223108-724a6b18a922/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs=
+github.com/openconfig/ygot v0.7.1 h1:kqDRYQpowXTr7EhGwr2BBDKJzqs+H8aFYjffYQ8lBsw=
+github.com/openconfig/ygot v0.7.1/go.mod h1:5MwNX6DMP1QMf2eQjW+aJN/KNslVqRJtbfSL3SO6Urk=
github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/pkg/profile v1.4.0 h1:uCmaf4vVbWAOZz36k1hrQD7ijGRzLwaME8Am/7a4jZI=
github.com/pkg/profile v1.4.0/go.mod h1:NWz/XGvpEW1FyYQ7fCx4dqYBLlfTcE+A9FLAkNKqjFE=
@@ -67,6 +93,8 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -85,15 +113,29 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20200319113533-08878b785e9c h1:5aI3/f/3eCZps9xwoEnmgfDJDhMbnJpfqeGpjVNgVEI=
+google.golang.org/genproto v0.0.0-20200319113533-08878b785e9c/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
+google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.20.1/go.mod h1:KqelGeouBkcbcuB3HCk4/YH2tmNLk6YSWA5LIWeI/lY=
+google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M=
It appears as though the file needs to be updated to reflect this.
'sonic-ext:db-name "APPL_DB";' does not work in sonic yang model, it seems that the function is not implemented.
It is possible to tag a VLAN or VLAN range on an interface without the VLAN actually existing. When you create the VLAN afterwards, it is not working and needs to be added again.
interface PortChannel10
switchport trunk allowed Vlan add 12
!
interface Vlan12
)sonic# show Vlan 12
Q: A - Access (Untagged), T - Tagged
NUM Status Q Ports Autostate Dynamic
12 Inactive Enable
I think the KLISH CLI should throw an error when you try to tag a VLAN that is not yet created. This will avoid both the situation described above, and will clarify for users that VLANs need to be created first.
Edit: This might also effect the 'all' tagging option
Try to add interface Ethernet0 as a VLAN Member under Vlan100 as untagged, using Restconf, it is accepted, and added in config_db.
Then, if we try to add Ethernet0 as a VLAN member under Vlan200 as untagged, again, it is accepted, and it is added in the CONFIG_DB.
This is not correct, as now Ethernet0 is using Vlan100 untagged and Vlan200 untagged at the same time.
The config CLI will not allow this, it will give user an error saying there's already one untagged vlan for Ethernet0.
How can we stop Restconf from accepting more than one untagged vlan on the same port ?
We tried playing around with some must() conditions in the sonic-vlan yang model, but we finally found out that the cvl does not read the VLAN_MEMBER table, if we try to add a new item in VLAN_MEMBER, so the must() condition cannot see the existing untagged vlans.
Any ideas ?
Hi,
Background: sonic-net/sonic-buildimage#14351
I tried compiling sonic-mgmt-framework with libcurl4-openssl instead of libcurl4-gnutls and things seem to work fine for me. Maybe we should consider dropping gnutls and using libcurl4-openssl as the rest of SONiC?
Ref 1:
"
On Fri, Jan 10, 2020 at 6:58 PM [email protected] wrote:
Right, we’re on the same page in that regard. This whole syspoll thing was implemented a while back. At the time, we didn’t have the docker-to-host dBus mechanism in place, and we were working with the “restriction” of running the mgmt-framework in the docker and not doing things directly on the host. The PR you’ve linked seems to introduce a host service that writes to the STATE_DB. This seems to be OK, as the PR was merged, so in hindsight we could have explored this option.
We have pending work to extract the data from the DB where possible, make dBus calls to the system when data is not available in the DB, and then get rid of the syspoll/file system approach entirely. However, that code is not part of Release_1.0
.
From: Guohan Lu [email protected]
Sent: Friday, January 10, 2020 3:42 PM
To: Yin, Jeff; [email protected]; Renuka Manavalan; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: [EXTERNAL] Re: New comments to be resolved
[EXTERNAL EMAIL]
Frankly speaking, file system is probably not the best place to carry such dynamic data. It is better to use database to store such data.
Mostly for the data is available in the state db now.
Check the pr here. https://github.com/Azure/sonic-buildimage/pull/3525/files
We also have syseeprom in the state db as well.
From: [email protected] [email protected]
Sent: Friday, January 10, 2020 11:55 AM
To: [email protected]; Renuka Manavalan [email protected]; [email protected]
Cc: Guohan Lu [email protected]; [email protected]; [email protected]
Subject: RE: [EXTERNAL] Re: New comments to be resolved
The data from /var/platform is required to service the below CLI show commands:
show system cpu
show system memory
show system processes
show system processes pid
show platform syseeprom
"
Hi SONiC-RESTAPI folks,
I was able to configure a virtual testbed of SONiC switches and below is just a snippet of some of the following commands:
"""
sonic> sudo config interface ip remove Ethernet16 10.0.0.8/31
sonic> sudo config interface ip add Ethernet16 10.10.1.2/31
sonic> sudo config interface ip add Loopback0 10.0.1.13/32
sonic> sudo vtysh
sonic> configure t
sonic> no router bgp 65100
sonic> router bgp 65021
sonic> bgp router-id 10.0.1.13
"""
Questions:
Can I push these configurations remotely via REST?
* If yes, can you kindly point to documentation on how? In particular, do I need to install rest specific containers as shown here https://github.com/Azure/sonic-restapi ?
* At the moment, I do see a "/usr/sbin/rest_server" process running and perhaps attached to port 443? So maybe all I do need is a REST client on the host to push the configs? If yes, can you point me to documentation setting up the client (Perhaps a "curl" example?)?
Thanks,
-Syd
When i run xml file , the result has display an error like: "ImportError: No module named openconfig_acl_client". I found in all of file but no result. can you help me about this trouble??? Thank you!
I cannot start sonic-cli. Runing the command sonic-cli
results in this error:
Error: Unresolved PTYPE "MCLAG_KA_INTERVAL_RANGE" in PARAM "KA"
I built sonic on April 1, 2023 using master branch. The build target platform is mellanox and I installed on a Mellanox SN2010. I enabled iccpd feature in the build config.
Output of show version
:
SONiC Software Version: SONiC.master.0-dirty-20230401.215816
Distribution: Debian 11.6
Kernel: 5.10.0-18-2-amd64
Build commit: 66d3586fd
Build date: Sat Apr 1 23:28:27 UTC 2023
Built by: tajadmin@ubuntu20
Platform: x86_64-mlnx_msn2010-r0
HwSKU: ACS-MSN2010
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1821X14175
Model Number: MSN2010-CB2F
Hardware Revision: A2
Uptime: 10:16:52 up 2:50, 1 user, load average: 0.41, 0.32, 0.34
Date: Sun 28 Aug 2022 10:16:52
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-orchagent latest 5faa8551e2ec 327MB
docker-orchagent master.0-dirty-20230401.215816 5faa8551e2ec 327MB
docker-fpm-frr latest c497031b75a1 345MB
docker-fpm-frr master.0-dirty-20230401.215816 c497031b75a1 345MB
docker-teamd latest 8c064c178e24 315MB
docker-teamd master.0-dirty-20230401.215816 8c064c178e24 315MB
docker-macsec latest 4362902a0556 318MB
docker-iccpd latest b767f01bb037 315MB
docker-iccpd master.0-dirty-20230401.215816 b767f01bb037 315MB
docker-syncd-mlnx latest 1289879266d6 729MB
docker-syncd-mlnx master.0-dirty-20230401.215816 1289879266d6 729MB
docker-platform-monitor latest 412f3d6015ac 730MB
docker-platform-monitor master.0-dirty-20230401.215816 412f3d6015ac 730MB
docker-dhcp-relay latest bb01481252bb 308MB
docker-eventd latest 671ad62321d2 298MB
docker-eventd master.0-dirty-20230401.215816 671ad62321d2 298MB
docker-snmp latest 90614554d27a 337MB
docker-snmp master.0-dirty-20230401.215816 90614554d27a 337MB
docker-sonic-p4rt latest b04e38099ca0 869MB
docker-sonic-p4rt master.0-dirty-20230401.215816 b04e38099ca0 869MB
docker-router-advertiser latest 53a279b8dfee 298MB
docker-router-advertiser master.0-dirty-20230401.215816 53a279b8dfee 298MB
docker-mux latest 7f8edd135588 347MB
docker-mux master.0-dirty-20230401.215816 7f8edd135588 347MB
docker-lldp latest 231ef218c26e 341MB
docker-lldp master.0-dirty-20230401.215816 231ef218c26e 341MB
docker-database latest d9642ae5a30a 298MB
docker-database master.0-dirty-20230401.215816 d9642ae5a30a 298MB
docker-sonic-telemetry latest f6c83d5c3663 597MB
docker-sonic-telemetry master.0-dirty-20230401.215816 f6c83d5c3663 597MB
docker-nat latest 7fb2610fc957 291MB
docker-nat master.0-dirty-20230401.215816 7fb2610fc957 291MB
docker-sflow latest 6851fed6b8be 289MB
docker-sflow master.0-dirty-20230401.215816 6851fed6b8be 289MB
docker-sonic-mgmt-framework latest e054c369bea7 416MB
docker-sonic-mgmt-framework master.0-dirty-20230401.215816 e054c369bea7 416MB
Output of show feature status
:
admin@sonic:~$ show feature status
Feature State AutoRestart SetOwner
-------------- --------------- -------------- ----------
bgp enabled enabled
database always_enabled always_enabled
dhcp_relay disabled enabled local
eventd enabled enabled
iccpd disabled enabled
lldp enabled enabled
macsec disabled enabled local
mgmt-framework enabled enabled
mux always_disabled enabled
nat disabled enabled
p4rt disabled enabled
pmon enabled enabled
radv enabled enabled
sflow disabled enabled
snmp enabled enabled
swss enabled enabled
syncd enabled enabled
teamd enabled enabled
telemetry enabled enabled
I see that issue #84 is identical but there is a PR that was supposed to resolve it. I'm re-opening the issue since I had this issue with both the custom build (with iccpd enabled) as well as the nightly build from March 13th, 2023.
This pull request addresses the issue of incomplete support for Yang models in the REST API on the SONiC target board. The changes made in this pull request ensure that all Yang models are properly supported by the REST API.
The problem revolves around the REST API on the SONiC target board, which is not providing full support for all the Yang models present in the usr/local/yang-model path. While some Yang models are successfully supported by the REST API in the rest_ui folder, we are experiencing limitations with other Yang models.
To overcome this issue thought of doing modifications in sonic-mgmt-framework by doing modification.
Modifications Made:
Added all the Yang models that require REST API support to the models/yangs/sonic directory in the sonic-mgmt-framework repository.
So is there any other modifications to be done in sonic-mgmt-framework to get support from rest api for yang models on SONiC target board. Can you please suggest some advice regarding tis issue?
Thank you for reviewing this pull request.
Hi I am facing an issue in compilation issue in sonic-mgmt-framework.
Docker Version: 20.10.2
Go version: go1.13.8
Steps : Compile the sonic code using make all (broadcom)---->>>Success
cd src/sonic-mgmt-framework
make clean
make all
------LOGS--------
$ make all
make -C models -f openapi_codegen.mk go-server-init
make[1]: Entering directory '/home/ws/SONIC/pb/sonic-buildimage/src/sonic-mgmt-framework/models'
make[1]: Nothing to be done for 'go-server-init'.
make[1]: Leaving directory '/home/ws/SONIC/pb/sonic-buildimage/src/sonic-mgmt-framework/models'
/usr/local/go/bin/go mod vendor
make: /usr/local/go/bin/go: Command not found
make: *** [Makefile:40: vendor/.done] Error 127
Looking for pointers to solve this issue.
When trying to get the list of OpenConfig interfaces, I get a 404 errror which reads more like an internal application problem:
$ curl -I -k -X GET "https://$IP/restconf/data/openconfig-interfaces:interfaces" -H "accept: application/yang-data+json"
HTTP/2 404
content-type: application/yang-data+json
content-length: 127
date: Fri, 30 Sep 2022 09:18:55 GMT
$ curl -k -X GET "https://$IP/restconf/data/openconfig-interfaces:interfaces" -H "accept: application/yang-data+json"
{"ietf-restconf:errors":{"error":[{"error-type":"application","error-tag":"invalid-value","error-message":"Entry not found"}]}}
Using "strace" shows that the problerm is related to a COUNTERS_PORT_NAME_MAP item in Redis:
[pid 12369] write(2, "E0930 09:47:56.851061 18 in"..., 102) = 102
| 00000 45 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 E0930 09:47:56.8 |
| 00010 35 31 30 36 31 20 20 20 20 20 20 31 38 20 69 6e 51061 18 in |
| 00020 74 66 5f 61 70 70 2e 67 6f 3a 37 31 39 5d 20 50 tf_app.go:719] P |
| 00030 6f 72 74 2d 4f 49 44 20 28 43 6f 75 6e 74 65 72 ort-OID (Counter |
| 00040 73 29 20 67 65 74 20 66 6f 72 20 61 6c 6c 20 74 s) get for all t |
| 00050 68 65 20 69 6e 74 65 72 66 61 63 65 73 20 66 61 he interfaces fa |
| 00060 69 6c 65 64 21 0a iled!. |
[pid 12369] epoll_ctl(4, EPOLL_CTL_DEL, 9, 0xc0057b2ae4) = 0
[pid 12369] close(9) = 0
[pid 12369] epoll_ctl(4, EPOLL_CTL_DEL, 10, 0xc0057b2ae4) = 0
[pid 12369] close(10) = 0
[pid 12369] write(2, "E0930 09:47:56.851635 18 ha"..., 178) = 178
| 00000 45 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 E0930 09:47:56.8 |
| 00010 35 31 36 33 35 20 20 20 20 20 20 31 38 20 68 61 51635 18 ha |
| 00020 6e 64 6c 65 72 2e 67 6f 3a 35 39 5d 20 5b 52 45 ndler.go:59] [RE |
| 00030 53 54 2d 33 33 5d 20 54 72 61 6e 73 6c 69 62 20 ST-33] Translib |
| 00040 65 72 72 6f 72 20 74 6c 65 72 72 2e 54 72 61 6e error tlerr.Tran |
| 00050 73 6c 69 62 52 65 64 69 73 43 6c 69 65 6e 74 45 slibRedisClientE |
| 00060 6e 74 72 79 4e 6f 74 45 78 69 73 74 20 2d 20 54 ntryNotExist - T |
| 00070 72 61 6e 73 6c 69 62 20 52 65 64 69 73 20 45 72 ranslib Redis Er |
| 00080 72 6f 72 3a 20 45 6e 74 72 79 20 64 6f 65 73 20 ror: Entry does |
| 00090 6e 6f 74 20 65 78 69 73 74 3a 20 43 4f 55 4e 54 not exist: COUNT |
| 000a0 45 52 53 5f 50 4f 52 54 5f 4e 41 4d 45 5f 4d 41 ERS_PORT_NAME_MA |
| 000b0 50 0a P. |
[pid 12369] write(2, "I0930 09:47:56.851940 18 ha"..., 243) = 243
| 00000 49 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 I0930 09:47:56.8 |
| 00010 35 31 39 34 30 20 20 20 20 20 20 31 38 20 68 61 51940 18 ha |
| 00020 6e 64 6c 65 72 2e 67 6f 3a 37 32 5d 20 5b 52 45 ndler.go:72] [RE |
| 00030 53 54 2d 33 33 5d 20 53 65 6e 64 69 6e 67 20 72 ST-33] Sending r |
| 00040 65 73 70 6f 6e 73 65 20 34 30 34 2c 20 74 79 70 esponse 404, typ |
| 00050 65 3d 61 70 70 6c 69 63 61 74 69 6f 6e 2f 79 61 e=application/ya |
| 00060 6e 67 2d 64 61 74 61 2b 6a 73 6f 6e 2c 20 64 61 ng-data+json, da |
| 00070 74 61 3d 7b 22 69 65 74 66 2d 72 65 73 74 63 6f ta={"ietf-restco |
| 00080 6e 66 3a 65 72 72 6f 72 73 22 3a 7b 22 65 72 72 nf:errors":{"err |
| 00090 6f 72 22 3a 5b 7b 22 65 72 72 6f 72 2d 74 79 70 or":[{"error-typ |
| 000a0 65 22 3a 22 61 70 70 6c 69 63 61 74 69 6f 6e 22 e":"application" |
| 000b0 2c 22 65 72 72 6f 72 2d 74 61 67 22 3a 22 69 6e ,"error-tag":"in |
| 000c0 76 61 6c 69 64 2d 76 61 6c 75 65 22 2c 22 65 72 valid-value","er |
| 000d0 72 6f 72 2d 6d 65 73 73 61 67 65 22 3a 22 45 6e ror-message":"En |
| 000e0 74 72 79 20 6e 6f 74 20 66 6f 75 6e 64 22 7d 5d try not found"}] |
| 000f0 7d 7d 0a }}. |
[pid 12369] write(2, "I0930 09:47:56.852237 18 ro"..., 106) = 106
| 00000 49 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 I0930 09:47:56.8 |
| 00010 35 32 32 33 37 20 20 20 20 20 20 31 38 20 72 6f 52237 18 ro |
| 00020 75 74 65 72 2e 67 6f 3a 31 32 38 5d 20 5b 52 45 uter.go:128] [RE |
| 00030 53 54 2d 33 33 5d 20 47 65 74 4f 70 65 6e 63 6f ST-33] GetOpenco |
| 00040 6e 66 69 67 49 6e 74 65 72 66 61 63 65 73 49 6e nfigInterfacesIn |
| 00050 74 65 72 66 61 63 65 73 20 74 6f 6f 6b 20 33 37 terfaces took 37 |
| 00060 2e 31 38 35 34 39 33 6d 73 0a .185493ms. |
The SONiC specific interface module returns proper data:
$ curl -k -X GET "https://$IP/restconf/data/sonic-interface:sonic-interface" -H "accept: application/yang-data+json" | json_pp|head -30
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2627 100 2627 0 0 47763 0 --:--:-- --:--:-- --:--:-- 47763
{
"sonic-interface:sonic-interface" : {
"INTERFACE" : {
"INTERFACE_IPADDR_LIST" : [
{
"ip_prefix" : "10.0.0.0/31",
"portname" : "Ethernet0"
},
{
"ip_prefix" : "10.0.0.50/31",
"portname" : "Ethernet100"
},
{
"ip_prefix" : "10.0.0.52/31",
"portname" : "Ethernet104"
},
{
"ip_prefix" : "10.0.0.54/31",
"portname" : "Ethernet108"
},
{
"ip_prefix" : "10.0.0.56/31",
"portname" : "Ethernet112"
},
{
"ip_prefix" : "10.0.0.58/31",
"portname" : "Ethernet116"
},
{
"ip_prefix" : "10.0.0.6/31",
I'm running this against a nightly VM image (sonic-vs.img).
Status: Waiting for required files from Broadcom.
Expect before next feature PR.
when i start the following docker for vs
docker-sonic-mgmt-framework:latest
I am not able to find the sonic-cli (logs as follows)
root@d9f47d71300d:/# find . -name sonic_cli
root@d9f47d71300d:/#
Please suggest what can be checked to identify the issue
Hi folks,
I have a basic query related to sonic-management-framework.
What I understood is, it intern run the rest server and through rest client, using this container we can configure the redis DB.
If that is so, how it is different from sonic-restapi ?
Thanks,
Amaresh
I sent a GET request. such as:
GET https://{{SERVER_IP}}/restconf/sonic-acl:sonic-acl/ACL_TABLE/aaa
But return 404. why?
404 page not found
I notice this repo has implicit dependency on python wheels PyYAML and lxml during build.
https://github.com/Azure/sonic-buildimage/blob/7d02f799ef79d02e659fe1cfc70ae43a28c1bd7c/sonic-slave-buster/Dockerfile.j2#L412-L416
Please capture the dependency information in this repo, better to build the scripts (CLI/clitree/scripts) into a standalone wheel. And then the final deb package will use that wheel as a build dependency (not a runtime dependency).
I see lxml upgrades frequently. This way will make future life easier, no need to modify slave Dockerfile much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.