Re: <module>-impl project code file generation


Michal Cmarada
 

Hi,

From the logs I can see that TCP ports seem to work so it's just a problem with SSH. Not sure what exact configuration is in config/netconf.json, but for each HC instance you should change both TCP,SSH ports and notification name. You can also adjust the number of netty-threads to increase performance. See https://wiki.fd.io/view/CSIT/Honeycomb/HC_performance. Also verify if ports are not being blocked or used by other apps. I will try to test something similar but it might take a while.
The other option is to download netconf source code (https://git.opendaylight.org/gerrit/#/admin/projects/netconf) and try to debug it. You should be able to run honeycomb in debug mode (honeycomb-debug, port: 5005) and connect remote debugger in your IDE. Good place to start should be NetconfSSHProvider.java or NetconfNorthboundSshServer.java

It might be useful to enable trace logs on org.opendaylight.netconf. Try to avoid using trace on org.opendaylight, there will be too much logs to process.
If you find a bug in HC, report back or feel free to propose patch to honeycomb, any help is greatly appreciated.


Michal Cmarada
Engineer - Software
mcmarada@...
Tel:

Cisco Systems, Inc.

Slovakia
cisco.com

Think before you print.
This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
http://www.cisco.com/c/en/us/about/legal/terms-sale-software-license-agreement/company-registration-information.html

-----Original Message-----
From: saravanan.a75@... <saravanan.a75@...>
Sent: Tuesday, November 27, 2018 2:48 PM
To: Michal Cmarada -X (mcmarada - PANTHEON TECHNOLOGIES at Cisco) <mcmarada@...>; Marek Grądzki <margradz@...>; honeycomb-dev@...
Subject: RE: [honeycomb-dev] <module>-impl project code file generation

Team,
I have increased log level, I could see below lines and after that server instances hangs:
2018-11-27 09:43:59.673 UTC [main] INFO i.f.h.n.n.NetconfSshServerProvider - Starting NETCONF SSH
2018-11-27 09:43:59.744 UTC [netconf-netty-0] INFO i.f.h.n.n.NetconfTcpServerProvider - Netconf TCP endpoint started successfully at /127.0.0.1:60001
2018-11-27 09:43:59.752 UTC [main] WARN io.netty.bootstrap.ServerBootstrap - Unknown channel option 'SO_BACKLOG' for channel '[id: 0xa55a593b]'
2018-11-27 09:43:59.839 UTC [main] DEBUG o.o.p.framework.AbstractDispatcher - Initiated server AbstractBootstrap$PendingRegistrationPromise@16134476(incomplete) at local:50001.
2018-11-27 09:44:01.611 UTC [main] INFO o.a.s.c.u.s.b.BouncyCastleSecurityProviderRegistrar - getOrCreateProvider(BC) created instance of org.bouncycastle.jce.provider.BouncyCastleProvider
2018-11-27 09:44:01.615 UTC [main] DEBUG o.a.s.c.util.security.SecurityUtils - register(EdDSA) not registered - enabled=true, supported=false


I see the same behavior even if I run the honeycomb in multiple docker containers.
Can you pls let me know how to resolve this issue? If kernel or honeycomb settings need to be tweaked, pls guide me.
Regards,
Saran



-----Original Message-----
From: Saravanan A (TECH)
Sent: Monday, November 26, 2018 8:38 PM
To: 'Michal Cmarada -X (mcmarada - PANTHEON TECHNOLOGIES at Cisco)' <mcmarada@...>; Marek Grądzki <margradz@...>; honeycomb-dev@...
Subject: RE: [honeycomb-dev] <module>-impl project code file generation

Hello Team,

Thanks for your support so far.
I have developed the honeycomb agent. I am interested only in netconf ssh and I want to run multiple instances in same server.
So I changed netconf ssh port to 50001, 50002 , and so on. I have separate folder structure for each instance like hc_50001/, hc_50002/, etc.

When I start 5 instances, 2 of them are starting immediately. The other 3 instances are waiting for 5 or sometimes 10 minutes to come up fully.

When I checked the log, they are stuck after printing following log lines. Can you pls let me know how to resolve this issue? If kernel or honeycomb settings need to be tweaked, pls guide me.

~/Netconf-HC-Agents$ tail -f hc_50003/var/log/honeycomb/honeycomb.log
2018-11-26 14:07:16.001 UTC [main] INFO i.f.h.binding.init.ProviderTrait - Providing: io.fd.honeycomb.northbound.netconf.HoneycombNotification2NetconfProvider@29f38091
2018-11-26 14:07:16.015 UTC [main] INFO i.f.h.n.n.HoneycombNotification2NetconfProvider - Exposing HONEYCOMB_NETCONF notification stream: honeycomb
2018-11-26 14:07:16.015 UTC [pool-10-thread-3] INFO o.o.r.NbrListChangeNotifnSender - Starting notification stream for interfaces
2018-11-26 14:07:16.016 UTC [main] INFO i.f.h.binding.init.ProviderTrait - Providing: io.fd.honeycomb.northbound.netconf.NettyThreadGroupProvider@106b014e
2018-11-26 14:07:16.318 UTC [main] INFO i.f.h.binding.init.ProviderTrait - Providing: io.fd.honeycomb.northbound.netconf.NetconfServerDispatcherProvider@79eeff87
2018-11-26 14:07:16.378 UTC [main] INFO i.f.h.binding.init.ProviderTrait - Providing: io.fd.honeycomb.northbound.netconf.NetconfTcpServerProvider@2668c286
2018-11-26 14:07:16.379 UTC [main] INFO i.f.h.binding.init.ProviderTrait - Providing: io.fd.honeycomb.northbound.netconf.NetconfSshServerProvider@2abc8034
2018-11-26 14:07:16.379 UTC [main] INFO i.f.h.n.n.NetconfSshServerProvider - Starting NETCONF SSH
2018-11-26 14:07:17.276 UTC [main] WARN io.netty.bootstrap.ServerBootstrap - Unknown channel option 'SO_BACKLOG' for channel '[id: 0x5be1dfe9]'
2018-11-26 14:07:18.620 UTC [main] INFO o.a.s.c.u.s.b.BouncyCastleSecurityProviderRegistrar - getOrCreateProvider(BC) created instance of org.bouncycastle.jce.provider.BouncyCastleProvider

I am using below Ubuntu version:
$ uname -a
Linux sb4-honeycomb-sim 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


Regards,
Saran




Sensitivity: Internal & Restricted

-----Original Message-----
From: Michal Cmarada -X (mcmarada - PANTHEON TECHNOLOGIES at Cisco) [mailto:mcmarada@...]
Sent: Thursday, November 8, 2018 9:06 PM
To: Saravanan A (TECH) <saravanan.a75@...>; Marek Grądzki <margradz@...>; honeycomb-dev@...
Subject: RE: [honeycomb-dev] <module>-impl project code file generation

** This mail has been sent from an external source **

Hi,

1. Get-config should be reading data from internal honeycomb datastore (configuration datastore), that is why the translation classes are not called. Only Get actually reads data from the device and calls the translation classes (operational datastore).
2. Yes there are several options to edit the configuration of the device:
a) config/data.json can be used for this, but its primary function is to store configured data in the event of failures and honeycomb restart.
b) Configuring the device via netconf is common way of configuring devices, you can send the configuration and it will be stored in internal configuration datastore in honeycomb, you should be then able to get this configuration data using get-config as you mentioned earlier
c) Configuration using Restconf, is often easy and very fast way to write or read data from device. It is very simple and if you take a look at HC2VPP project (honeycomb agent for VPP) there are a lot of postman collections that you can use to test how this is done (https://gerrit.fd.io/r/#/admin/projects/hc2vpp). There are some demos and other examples in hc2vpp/examples, even for netconf using ncclient.

There is also a developer guide in our documentation for HC2VPP which can clear a lot of questions for you. Take a look here: https://docs.fd.io/hc2vpp/1.18.07/hc2vpp-parent/release-notes-aggregator/release_notes.html#_devel_guide There is a section about developing sample plugin for HC2vpp to write and read simple configuration based on a simple yang model for a VPP device.

I think you are working on a very similar agent to HC2VPP just for other type of device, so you should find a lot of stuff that you need there.


Michal Cmarada
Engineer - Software
mcmarada@...
Tel:

Cisco Systems, Inc.



Slovakia
cisco.com

Think before you print.
This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
http://www.cisco.com/c/en/us/about/legal/terms-sale-software-license-agreement/company-registration-information.html

-----Original Message-----
From: honeycomb-dev@... <honeycomb-dev@...> On Behalf Of saravanan.a75@...
Sent: Thursday, November 8, 2018 1:51 PM
To: Marek Grądzki <margradz@...>; honeycomb-dev@...
Subject: Re: [honeycomb-dev] <module>-impl project code file generation

Hello Team,

I could implement honeycomb agent and test basic operations.
However I have few pending tasks/issues.

1. When I run get-config command, the control is not coming to any of the implemented classes. Only for 'get' command, the control is coming to implemented classes. Is it possible to get control for get-config operation?

2. If I want to edit the device configuration from backend, how to do it? I am seeing 2 options:

a) I modified the config/data.json file and tried reloading it. Is this doable and better way? Is there any sample/example implementation available?
For e.g., as per https://wiki.fd.io/view/Honeycomb/Persistence link, it says "It is necessary to store the configuration in human readable format to enable users to perform manual edits e.g. XML or JSON.". After the config data tree file is edited, how to restore it in honeycomb agent without restarting agent.

b) Another way is that I can send the device configuration through netconf session and commit. Can I do this from the honeycomb agent itself? Is there any sample/example implementation available?

If you can point me on how to proceed, it will be great help.

Regards,
Saran



Sensitivity: Internal & Restricted

-----Original Message-----
From: Marek Grądzki [mailto:margradz@...]
Sent: Monday, September 10, 2018 2:43 AM
To: Saravanan A (Communications-Telecom Equipment) <saravanan.a75@...>; honeycomb-dev@...
Subject: Re: [honeycomb-dev] <module>-impl project code file generation

** This mail has been sent from an external source. Treat hyperlinks and attachments in this email with caution**

+ honeycomb-dev@...
niedz., 9 wrz 2018 o 23:12 Marek Grądzki <margradz@...> napisał(a):

Saran,

the model looks valid.
I don't remember if I ever used top level list.
The ietf models used in hc2vpp have top level container defined.

Not sure if InstanceIdentifier provides methods suitable for your
usecase, but you might try to use KeyedInstanceIdentifier.builder.

InstanceIdentifer and KeyedInstanceIdentifier are concepts from ODL
Yangtools (https://wiki.opendaylight.org/view/YANG_Tools:Main)

Regards,
Marekśr., 5 wrz 2018 o 11:31 saravanan.a75@...
<saravanan.a75@...> napisał(a):

Hello Merek,

I am implementing impl classes for my Yang model.

I have a yang model in which “list fap-service “ is present immediately in “module bbf-tr-196-2-0-3-full”.
module bbf-tr-196-2-0-3-full {
list fap-service {
...
}
}

Hope this is valid yang model, I see a problem in honeycomb implementation for " final class FapServiceCrudService implements CrudService<FapService>".

@Override
public List<FapService> readAll() throws ReadFailedException {
LOG.info("RANSIM FapServiceCrudService readAll called");
// read all data under parent node,in this case {@link ModuleState}
return Collections.singletonList(
readSpecific(InstanceIdentifier.create(FapServices.class).child(FapService.class, new FapServiceKey("FapNode1"))));
}
}

What I should specify in the parent node class? If I have a top level container with name " fap-services " than, above code works. If we don't have such container what I should give as parent class?

Is honeycomb expect top level container always like below?

module bbf-tr-196-2-0-3-full {
container fap-services {
list fap-service {
...
}
}
}


Regards,
Saran


Sensitivity: Internal & Restricted

-----Original Message-----
From: Marek Grądzki [mailto:margradz@...]
Sent: Friday, August 31, 2018 11:55 AM
To: Saravanan A (Communications-Telecom Equipment)
<saravanan.a75@...>
Cc: honeycomb-dev@...
Subject: Re: [honeycomb-dev] <module>-impl project code file
generation

** This mail has been sent from an external source. Treat hyperlinks
and attachments in this email with caution**

Hello Saran,

generating netconf agent based on custom model is not supported.

But feel free to create jira ticket if you are interested in the feature.
Contributions to design/implementation are welcomed!

Currently Honeycomb plugin archetype generates maven project structure, code and documentation only for the sample model (parametrized by root artifact id):
https://git.fd.io/honeycomb/tree/tools/archetype/src/main/resources/
archetype-resources/__rootArtifactId__-api/src/main/yang/__rootArtif
actId__.yang

Here is relevant patch where you can find more info:
https://gerrit.fd.io/r/#/c/2429/

You can find more examples in:
https://docs.fd.io/honeycomb/1.18.10-SNAPSHOT/release-notes-aggregat
or/release_notes.html#_devel_guide
https://git.fd.io/honeycomb/tree/samples

Please also take a look at https://wiki.fd.io/view/Hc2vpp which is Honeycomb agent for VPP.

Regards,
Marek

śr., 29 sie 2018 o 05:16 saravanan.a75@... <saravanan.a75@...> napisał(a):

Hello Team,



I am using honeycomb 18.07 version. Trying to bring up Netconf server for my own yang model file.



I modified the “honeycomb/enodebsim/enodebsim-api/src/main/yang/enodebsim.yang” file with my yang content.

Then I did the following:

$cd honeycomb/

$ rm enodebsim/pom.xml enodebsim/enodebsim-api/pom.xml

$ vi pom.xml #removed the enodebsim from Module list

$ mvn -X archetype:generate
-DarchetypeGroupId=io.fd.honeycomb.tools
-DarchetypeArtifactId=honeycomb-plugin-archetype
-DarchetypeVersion=1.18.10-SNAPSHOT -DinteractiveMode=false
-DgroupId=org.onap.ransim -DartifactId=enodebsim
-Dversion=1.0.0-SNAPSHOT -Dpackage=org.onap.ransim

$cd honeycomb/enodebsim/

$mvn clean install



This generated the java files for my new yang model. However the code generated in “honeycomb/enodebsim/enodebsim-impl” is not referring my new yang model. It still uses the old sample yang model.



Will the generate netconf agent automatically includes new yang model into capabilities?



Pls let me know if I missed any steps. If you can share the link/doc explaining what needs to be done for custom yang model simulation?





Regards,
Saran





Sensitivity: Internal & Restricted

The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of
the
addressee(s) and may contain proprietary, confidential or
privileged information. If you are not the intended recipient, you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this
message and any attachments. WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email.
www.wipro.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#816):
https://lists.fd.io/g/honeycomb-dev/message/816
Mute This Topic: https://lists.fd.io/mt/25070762/675181
Group Owner: honeycomb-dev+owner@...
Unsubscribe: https://lists.fd.io/g/honeycomb-dev/unsub
[margradz@...]
-=-=-=-=-=-=-=-=-=-=-=-
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of
the addressee(s) and may contain proprietary, confidential or
privileged information. If you are not the intended recipient, you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message
and any attachments. WARNING: Computer viruses can be transmitted
via email. The recipient should check this email and any attachments
for the presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
www.wipro.com
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com

Join honeycomb-dev@lists.fd.io to automatically receive all group messages.