Stratum pre-built container

19 views
Skip to first unread message

Deval Bhamare

unread,
Feb 24, 2020, 9:53:21 AM2/24/20
to briga...@onosproject.org

Hi,


I am trying to find Stratum pre-built docker image for Linux 4.4.0-173-generic x86_64 , however couldn't find it. Can you please tell me whether Stratum is not supported on Generic and only runs on ONL version? 


I tried stratumproject/stratum-bf:8.9.1-4.14.49-OpenNetworkLinux , but it failed with error:


cat: /etc/onl/platform: No such file or directory

Use default flag file

Cannot find /usr/local/share/stratum/.json

 


Maybe because the Linux doesn't support ONL? What may be the solution? Please let me know. 



Thanks,

Deval

Carmelo Cascone

unread,
Feb 24, 2020, 6:25:11 PM2/24/20
to Deval Bhamare, briga...@onosproject.org
Hi Deval,

I suggest you ask on the stratum-dev mailing list or Slack channel:

This mailing list is for discussions related to P4/P4Runtime support in ONOS.

Thanks
Carmelo

-- 
You received this message because you are subscribed to the Google Groups "P4 brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-p4+...@onosproject.org.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-p4/3219e60081e54a23950b45fb513ca36e%40kau.se.

Deval Bhamare

unread,
Feb 25, 2020, 9:58:01 AM2/25/20
to Carmelo Cascone, briga...@onosproject.org

Thanks Carmelo.


Regards,


Deval.



From: Carmelo Cascone <car...@opennetworking.org>
Sent: Tuesday, February 25, 2020 1:25:08 AM
To: Deval Bhamare
Cc: briga...@onosproject.org
Subject: Re: [brigade-p4] Stratum pre-built container
 

Deval Bhamare

unread,
Feb 26, 2020, 5:10:04 AM2/26/20
to car...@opennetworking.org, briga...@onosproject.org

Sub: ONOS Pipeconf App


Hello Carmelo, 

I was going through the below link where you suggest to write a pipeconf for customised P4 program. 

I am a bit confused and would like to request you to explain it a little more. Below is my understanding about pipeconf and fabric-tofino I have downloaded the fabric-tofino repo from https://github.com/opencord/fabric-tofino

1. As a first step, the tutorial asks to download Onos from https://github.com/opennetworkinglab/onos. As I can see, this Onos has pipeconf and mytunnel code in apps/p4-tutorial/

2. Now in /fabric-tofino-1.0.0 we have code under src/main/java and src/main/p4. My first doubt is, when you say, you need to develop the pipeconf app, does it mean we have to modify this Java code in fabric-tofino/ src/main/java/..../ (modify PipeconfLoader.java and  package-info.java)? What will I need besides my java code? For example, pom.xml, my p4 code? Do I have to include fabric.p4 from fabric-tofino with my modified app as well? 

3. Or do I modify Java code in pipeconf in Onos folder above?  For example, I modify files in onos/apps/p4-tutorial/pipeconf/.. and place my customised app folder mytunnel2 in apps/p4-tutorial/ and compile the code? How do I compile it? Where will my oar will be placed? How to generate pom.xml, if that is the case? I can see BUILD file but no pom.xml. Do I build using these files? 

4. What does exactly Fabric.p4 do? If I am writing my own P4 code and pipeconf for that, do I need to include my P4 code as well and replace fabric.p4? Or just writing pipeconf is enough? 

Lots of confusion here. I hope you get what I am trying to achieve and can help me with this. Waiting for the reply. Thank you in advance. 

Regards,

Deval.



Deval Bhamare

unread,
Feb 28, 2020, 5:47:48 AM2/28/20
to car...@opennetworking.org, briga...@onosproject.org

Dear Carmelo,


Sending a gentle reminder for this issue. 


I have been able to made a little progress. Now I have related txt, bin and json files under the folder resources. When I try to compile my modified pipeconf code, it given error:


 package org.onosproject.p4runtime.api does not exist



Thank you for your help.


Deval.


From: Deval Bhamare
Sent: Wednesday, February 26, 2020 12:10:01 PM
To: car...@opennetworking.org
Cc: briga...@onosproject.org
Subject: ONOS Pipeconf App
 

Davide Scano

unread,
Feb 28, 2020, 7:14:48 AM2/28/20
to P4 brigade, car...@opennetworking.org, Deval....@kau.se
Hi Deval,

I read your previous post (26 Feb) and I suggest to you to read these guides:

They were very helpful to me for understanding how can I work with ONOS and P4. 
I read your latest post but I don't understand what you tried to do, could you better explain which is your goal/project and what youtried to do?

Best,
ds

Deval Bhamare

unread,
Feb 28, 2020, 8:30:33 AM2/28/20
to Davide Scano, P4 brigade, car...@opennetworking.org

Hello Davide, 


So what I ma trying is to modify pipeconf code for my specific P4 app. I have been referring to the tutorial here:

https://github.com/opencord/fabric-tofino


I have the modified pipeconf code as well as the needed files such as tofino.bin, context.json, and p4info.txt in place under the folder /onos/apps/p4-tutorial/pipeconf/src/main/resources (it means I don\t have to perform the P4 compilation step like in the tutorial)


Now I am trying to create OAR file for my modified code using MVN with command mvn clean install. My modified code includes  

import org.onosproject.p4runtime.api.P4RuntimeClient;

import org.onosproject.p4runtime.api.P4RuntimeController;


However while installing with mvn it gives me error 


package org.onosproject.p4runtime.api does not exist

package org.onosproject.driver.pipeline

...



I have also complied the onos code with bazel before this step. 


Thanks,

Deval.



From: Davide Scano <0ice...@gmail.com>
Sent: Friday, February 28, 2020 2:14:48 PM
To: P4 brigade
Cc: car...@opennetworking.org; Deval Bhamare
Subject: Re: ONOS Pipeconf App
 

Deval Bhamare

unread,
Feb 28, 2020, 11:17:46 AM2/28/20
to Davide Scano, Carmelo Cascone, briga...@onosproject.org

Hello Davide, 


SO just for a quick results, I adapted the Dirty (first) approach and created an myapp folder in onos/apps. I created all the required files there. I did bazel build onos from Onos_root directory. 


Bazel executed fine, with build successful, but strangely there is no OAR file created for my app. 


From: Davide Scano <0ice...@gmail.com>
Sent: Friday, February 28, 2020 6:05:02 PM
To: Deval Bhamare
Subject: Re: [brigade-p4] ONOS Pipeconf App
 
Hi Deval,

Sorry for the last email, I’m not an expert of Bazel but when I changed some piece of code/ create new class I had to rebuild onos and then the modification are applied, so I think that in this way you creates OAR file update.

Best
Ds

Il giorno 28 feb 2020, alle ore 16:44, Davide Scano <0ice...@gmail.com> ha scritto:

Hi Deval,

You can work in two way:

1) the dirty one, i.e modifing directly the onos apps. This means that you have to rebuild onos every times etc
2) the clean one, creating an external application (https://wiki.onosproject.org/display/ONOS/Template+Application+Tutorial), that you can install and activate into onos. In other word you can start onos and than thanks to the command onos-app install you can install your application.

Best 
Ds

Il giorno 28 feb 2020, alle ore 16:33, Deval Bhamare <Deval....@kau.se> ha scritto:

Okay, thanks. Never used bazel before. 

Also it creates OAR file in target which can be pushed to ONOS then, right? 

~DB

From: Davide Scano <0ice...@gmail.com>
Sent: Friday, February 28, 2020 5:27:40 PM
To: Deval Bhamare
Subject: Re: [brigade-p4] ONOS Pipeconf App
 
Hi,

Yes, because you have to rebuild the code. Basically is the same concept of maven.

Ds
Il giorno 28 feb 2020, alle ore 16:22, Deval Bhamare <Deval....@kau.se> ha scritto:

OKay, so just bazel build onos will build all of my apps as well? 

Thanks,

Deval.


From: Davide Scano <0ice...@gmail.com>
Sent: Friday, February 28, 2020 5:04:28 PM
To: Deval Bhamare
Subject: Re: [brigade-p4] ONOS Pipeconf App
 
Hi,

1) If you use Intellij with the Bazel plugin ( see the attachment)
2)  otherwise I thin that you can use  bazel build onos 

Thanks 
Ds

<Schermata 2020-02-28 alle 16.03.21.png>

Il giorno 28 feb 2020, alle ore 15:50, Deval Bhamare <Deval....@kau.se> ha scritto:

Hi again, 

So I can see some BUILD files in each apps folder, for example in :

/onos/apps/p4-tutorial/mytunnel


SO can you please tell me how can I build the app with Bazel and this BUILD file? 

Thanks
DB

From: Davide Scano <0ice...@gmail.com>
Sent: Friday, February 28, 2020 4:01:28 PM
To: Deval Bhamare
Subject: Re: [brigade-p4] ONOS Pipeconf App
 
Hi Deval,

1) Have you tried to comment/remove package org.onosproject.p4runtime.api? Because seems that you using a package that isn’t defined in the folder where you have defined your java files/classes.
2) If you haven’t create a new onos application you have to check the dependencies in the .BUILD file utilized by Bazel
    If you have create a new onos application you have inserted this dependencies?
   
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-protocols-p4runtime-model</artifactId>
<version>${onos.version}</version>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-protocols-p4runtime-api</artifactId>
<version>${onos.version}</version>
</dependency>

Sorry if I bother you with all these emails/questions

Best,
Ds

Il giorno 28 feb 2020, alle ore 14:53, Deval Bhamare <Deval....@kau.se> ha scritto:

Hi, 

as far as P4 code is considered, we have written completely new P4 code. We have been able to build it and produce txt, json files to be included in the OAR package, as it is done in the current tutorial at https://github.com/opencord/fabric-tofino

Now we want to control that P4 code through ONOS (such as populating the tables etc.). For that the only way is writing customized pipeconf java app. 

For this, I am trying to modify existing pipconf code in onos/apps/p4-tutorial/pipeconf

After modifying it, I have created a pom file for it and trying to compile it with MVN to create OAR file. It gives me the mentioned errors. 





From: Davide Scano <0ice...@gmail.com>
Sent: Friday, February 28, 2020 3:41:00 PM
To: Deval Bhamare
Subject: Re: [brigade-p4] ONOS Pipeconf App
 
Hi Deval.

I have a question,  you have created a new Onos application or you have modified the onos applications p4-tutorial?

Thanks
Ds

-- 
You received this message because you are subscribed to the Google Groups "P4 brigade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-p4+...@onosproject.org.

Deval Bhamare

unread,
Feb 28, 2020, 2:08:43 PM2/28/20
to Davide Scano, Carmelo Cascone, briga...@onosproject.org

Thanks. 


The solution is you need to update modules.bzl  to add your app in it so that Bazel knows. 


Now I am stuck I next one, which is a known issue in JAVA 11. Error is: 


error: package javax.xml.bind does not exist


As suggested on forums I degraded to JAVA 8, but it is still there. Some forums suggest to update dependencies with Maven in Pom. That is to add below:


<dependency>
  <groupId>javax.xml.bind</groupId>
  <artifactId>jaxb-api</artifactId>
  <version>2.3.0</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.bind</groupId>
  <artifactId>jaxb-core</artifactId>
  <version>2.3.0</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.bind</groupId>
  <artifactId>jaxb-impl</artifactId>
  <version>2.3.0</version>
</dependency>


What is the equivalent of the same for Bazel? How do I modify the Build file exactly? 


Thanks,


Deval.





From: Davide Scano <0ice...@gmail.com>
Sent: Friday, February 28, 2020 6:21:16 PM

To: Deval Bhamare
Subject: Re: [brigade-p4] ONOS Pipeconf App
 
 Hi Deval,

I don’t know how to solve this issue, but if you looking for that in the onos google group developer and discuss probably you will find something.

Best
Da

On 28 Feb 2020, at 5:17 PM, Deval Bhamare <Deval....@kau.se> wrote:


Reply all
Reply to author
Forward
0 new messages