Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File name too long issue while building openconfig-network-instance.yang #140

Closed
venkatmahalingam opened this issue Sep 27, 2019 · 6 comments
Assignees

Comments

@venkatmahalingam
Copy link
Collaborator

venkatmahalingam commented Sep 27, 2019

I'm getting the following build error (File name too long) while compiling the openconfig-network-instance.yang (in yang folder and various dependent YANGs in common folder), can you please take a look?

[main] INFO io.swagger.codegen.AbstractGenerator - writing file /sonic/src/sonic-mgmt-framework/models/../build/rest_server/codegen/openconfig-network-instance/go/model_get_openconfig_network_instance_network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state.go
Exception in thread "main" java.lang.RuntimeException: Could not generate model 'get_openconfig_network_instance_network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state'
       at io.swagger.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:425)
       at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:751)
       at io.swagger.codegen.cmd.Generate.run(Generate.java:285)
       at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
Caused by: java.io.FileNotFoundException: /sonic/src/sonic-mgmt-framework/models/../build/rest_server/codegen/openconfig-network-instance/go/model_get_openconfig_network_instance_network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state.go (File name too long)
       at java.io.FileOutputStream.open0(Native Method)
       at java.io.FileOutputStream.open(FileOutputStream.java:270)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
       at io.swagger.codegen.AbstractGenerator.writeToFile(AbstractGenerator.java:32)
       at io.swagger.codegen.DefaultGenerator.processTemplateToFile(DefaultGenerator.java:780)
       at io.swagger.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:412)
       ... 3 more
Makefile:90: recipe for target '../build/rest_server/codegen/openconfig-network-instance/.yangapi_done' failed
make[4]: *** [../build/rest_server/codegen/openconfig-network-instance/.yangapi_done] Error 1
make[4]: Leaving directory '/sonic/src/sonic-mgmt-framework/models'
Makefile:57: recipe for target '/sonic/src/sonic-mgmt-framework/build/rest_server/main' failed
make[3]: *** [/sonic/src/sonic-mgmt-framework/build/rest_server/main] Error 2
make[3]: Leaving directory '/sonic/src/sonic-mgmt-framework/src/rest'
Makefile:83: recipe for target 'rest-server' failed
make[2]: *** [rest-server] Error 2
make[2]: Leaving directory '/sonic/src/sonic-mgmt-framework'
dh_auto_build: make -j1 returned exit code 2
debian/rules:3: recipe for target 'binary' failed
make[1]: *** [binary] Error 2
make[1]: Leaving directory '/sonic/src/sonic-mgmt-framework'
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
[  FAIL LOG END  ] [ target/debs/stretch/sonic-mgmt-framework_1.0-01_amd64.deb ]
slave.mk:329: recipe for target 'target/debs/stretch/sonic-mgmt-framework_1.0-01_amd64.deb' failed
make: *** [target/debs/stretch/sonic-mgmt-framework_1.0-01_amd64.deb] Error 1
Makefile.work:191: recipe for target 'target/debs/stretch/sonic-mgmt-framework_1.0-01_amd64.deb' failed
make[1]: *** [target/debs/stretch/sonic-mgmt-framework_1.0-01_amd64.deb] Error 2
make[1]: Leaving directory '/neteng/vmahalingam/NGOS/arlo/sonic-buildimage'
Makefile:6: recipe for target 'target/debs/stretch/sonic-mgmt-framework_1.0-01_amd64.deb' failed
make: *** [target/debs/stretch/sonic-mgmt-framework_1.0-01_amd64.deb] Error 2
@jeff-yin
Copy link
Collaborator

jeff-yin commented Oct 2, 2019

@faraazbrcm any update? Did Venkat assign it to the right person?

@venkatmahalingam
Copy link
Collaborator Author

@jeff-yin I got the private changes from @faraazbrcm, the build is fine now.

@faraazbrcm
Copy link
Collaborator

Fixed in the latest version of master

@linemma
Copy link

linemma commented May 5, 2020

I'm getting this build error, too. Could you please help me fix this error?
Which file should be updated so that the error will not occur?
Thanks.

@faraazbrcm
Copy link
Collaborator

@linemma you need to update sonic-buildimage/src/sonic-mgmt-framework/tools/pyang/pyang_plugins/openapi.py file
If the LATEST in the master is not fixing it, please use the attached file

openapi.py.zip
unzip the content and use it.

Also, it requires a python module mmh3 (https://pypi.org/project/mmh3/) installed in the build system
sonic-buildimage/sonic-slave-stretch/Dockerfile.j2
sonic-buildimage/sonic-slave/Dockerfile.j2

@linemma
Copy link

linemma commented May 6, 2020

@faraazbrcm, thank you! After I use the new openapi.py, it can build success.

dell-engops pushed a commit that referenced this issue Jul 25, 2022
…#140)

* [JIRA SONIC-61689] Port-group - REST support for per group GET

Signed-off-by: Prasanth Kunjum Veettil <[email protected]>
Change-Id: I4eab63e726fa0c9b607d33eddd2c755b9f523600

* [JIRA SONIC-61845] On unconfiguring VRF VNI map, deleting the VNI field from CONFIG DB VRF Table.
Done Following UT.
1. KLISH CLI
2. click Client
3. REST API
4. IPv4 and IPv6 traffic test.

Change-Id: I019d2a6df2d4377ab32cffb7dff2280150e63755

* [JIRA SONIC-62681] 2x50G: Output for "show interface advertise Eth" cuts off the word "Advertisement"

Signed-off-by: Dante Su <[email protected]>
Change-Id: I736f77ed1416939f6dcddc7a040d8650481ea5f9

* [JIRA SONIC-62862] Backporting SONIC-61223. With user added explicit snooping configuration on Vlan, actioner has called PATCH with default value for the no form of the user configuration, this has resulted in running configuration showing default value when there is no explicit configuration for the default

- Fixed actioner script to trigger DELETE for the snooping configuration instead of PATCH with the default values.
- Fix added in l2mcmgrd to fill snooping configuration IPC message by reading redisDB update instead of keeping separate local cache for snooping configurations which comes before snooping enable.

FT run scheduled for IGMP Snooping - http://10.193.81.56:9008/opt/projects/scheduler/jobs/4.0.0/17319/

Change-Id: I3ace4e6eca5cb7608d48bb9e3a11bb1c4976e4d9

* [JIRA SONIC-63234] - Corrected the order of deletion of v4 relay parameters

Change-Id: Iabfb45271afb7754829ef42f91dfbed6c59379b8

Co-authored-by: Prasanth Kunjum Veettil <[email protected]>
Co-authored-by: Tapash Das <[email protected]>
Co-authored-by: Dante Su <[email protected]>
Co-authored-by: Ashok Krishnegowda <[email protected]>
Co-authored-by: Sonic Build <[email protected]>
Co-authored-by: sonicmergeuser <[email protected]>
Co-authored-by: Akhilesh Samineni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants