Skip to content

Instantly share code, notes, and snippets.

@ryandgoulding
Created June 16, 2015 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryandgoulding/d6d94cad53f230019a37 to your computer and use it in GitHub Desktop.
Save ryandgoulding/d6d94cad53f230019a37 to your computer and use it in GitHub Desktop.
<rgoulding___> Good Morning Ed
<edwarnicke> Good morning :)
<edwarnicke> How may I help you?
<rgoulding___> I saw your discussion with Flavio and Kyle concerning https://bugs.opendaylight.org/show_bug.cgi?id=3680 . You had mentioned having something that could make the ODL startup delay a lot better in general. I was wondering if you were actively working this issue? I am seeing this as well.
<edwarnicke> Very actively
<edwarnicke> Its been what has been occupying my attention the past few days
<edwarnicke> That said, if you are interested in listening, it would probably be nice to explain the problem and the solution I'm working on :)
<rgoulding___> Okay, great thanks. I am definitely not as much of a maven/karaf ninja as you, but I'd love to hear what you are doing!
<edwarnicke> So here's the root problem:
<edwarnicke> How do you make sure ODL can startup in 'offline' mode
<edwarnicke> Getting this right has two benefits
<edwarnicke> 1) You can startup in offline mode
<edwarnicke> 2) Because you can start up in offline mode, you aren't downloading anything when you install and ODL feature
<edwarnicke> #2 is what leads to the startup speedup
<edwarnicke> Because downloading things is *slow*
<edwarnicke> With me so far?
<rgoulding___> yes, I follow you
<edwarnicke> So in Helium
<edwarnicke> I put in a hack to do this
<edwarnicke> Which was that everybody listed the depedencies for their feature (bundles, other feature projects, config files) in their pom.xml for their feature/ project
<edwarnicke> And then in integation
<edwarnicke> We had maven copy all of the dependencies to the zip file
<edwarnicke> This was hacky
<edwarnicke> And fragile
<edwarnicke> (and way overincluded stuff in the system/ directory)
<edwarnicke> But it worked in Helium
<edwarnicke> Oh
<edwarnicke> Let me step back one step
<edwarnicke> system/ is where karaf puts bundles etc
<rgoulding___> yup, I understand so far :)
<edwarnicke> Does that all make sense so far?
<edwarnicke> Cool :)
<edwarnicke> So
<edwarnicke> The problem with this (and I knew it when I did it)
<edwarnicke> Is that maven for a given (groupId,artifactId,classifer,type) only installs *one* version
<edwarnicke> And it tends to pick the oldest one (there is a lot of complexity on the edges here, but for our purposes, 'the oldest one' is a fine shorthand)
<edwarnicke> Now mostly we avoid this by trying to get everyone to use the versions of things in odlparent
<edwarnicke> But that breaks down if someone depends on something that depends on something etc
<edwarnicke> *so*
<edwarnicke> We hit that big time in Lithium
<edwarnicke> So I am now fixing this properly
<edwarnicke> By writing a small maven plugin
<edwarnicke> That recurses through the feature files
<edwarnicke> And installs all their bundle/configfile etc stuff in system/
<edwarnicke> Make sense?
<rgoulding___> Okay, so all the necessary artifacts are put in system/ at compile time?
<edwarnicke> That's the plan :)
<edwarnicke> (it incidently will make the zip file much smaller because it won't overinclude ;) )
<rgoulding___> Sounds like a change that will net a large benefit to the overall system.
<rgoulding___> Thanks for taking this one on :)
<edwarnicke> As well as fixing a serious bug
<edwarnicke> Because the thing about offline mode
<edwarnicke> Is its not just about 'offline'
<edwarnicke> Its also about 'I deploy behind a firewall' which is a very common deployment case
<rgoulding___> Yes; I have run into this as well. Random dependencies will fail to get downloaded.
<edwarnicke> Yep
<edwarnicke> Its nasty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment