[Openstack] Duplication of code in nova and cinder

2012-12-11 Thread Sam Morrison
I attempted to create a volume from an image in cinder and was getting this 
strange error, turns out it was because I had my glance servers specified as 
https://glanceserver:9292

In cinder the version of images/glance.py is older than the one in nova and is 
missing the ssl support additions.
https://bugs.launchpad.net/cinder/+bug/1089147

My real question is why is there one version is nova and one version in cinder. 
I also think there is quite a bit more unnecessary duplication.
Should it all go into oslo? 

Cheers,
Sam


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Duplication of code in nova and cinder

2012-12-11 Thread John Griffith
On Tue, Dec 11, 2012 at 4:24 PM, Sam Morrison sorri...@gmail.com wrote:

 I attempted to create a volume from an image in cinder and was getting
 this strange error, turns out it was because I had my glance servers
 specified as https://glanceserver:9292

 In cinder the version of images/glance.py is older than the one in nova
 and is missing the ssl support additions.
 https://bugs.launchpad.net/cinder/+bug/1089147

 My real question is why is there one version is nova and one version in
 cinder. I also think there is quite a bit more unnecessary duplication.
 Should it all go into oslo?

 Cheers,
 Sam


 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp

Hi Sam,

Short answer is yes.  Need to check scoping etc and make sure that it
does in fact fit within the parameters of OSLO.  It's something I thought
of a couple weeks ago but to be honest it's been low on my list personally
and nobody else that I know of has shown an interest in picking it up.

You'll notice another image related item we're *borrowing* from Nova
(cinder.image.image_utils).  In both cases there are slight modifications
to fit Cinder's use case that given a bit of work could easily be shared.

John
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Duplication of code in nova and cinder

2012-12-11 Thread John Griffith
On Tue, Dec 11, 2012 at 4:36 PM, John Griffith
john.griff...@solidfire.comwrote:



 On Tue, Dec 11, 2012 at 4:24 PM, Sam Morrison sorri...@gmail.com wrote:

 I attempted to create a volume from an image in cinder and was getting
 this strange error, turns out it was because I had my glance servers
 specified as https://glanceserver:9292

 In cinder the version of images/glance.py is older than the one in nova
 and is missing the ssl support additions.
 https://bugs.launchpad.net/cinder/+bug/1089147

 My real question is why is there one version is nova and one version in
 cinder. I also think there is quite a bit more unnecessary duplication.
 Should it all go into oslo?

 Cheers,
 Sam


 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp

 Hi Sam,

 Short answer is yes.  Need to check scoping etc and make sure that it
 does in fact fit within the parameters of OSLO.  It's something I thought
 of a couple weeks ago but to be honest it's been low on my list personally
 and nobody else that I know of has shown an interest in picking it up.

 You'll notice another image related item we're *borrowing* from Nova
 (cinder.image.image_utils).  In both cases there are slight modifications
 to fit Cinder's use case that given a bit of work could easily be shared.

 John


BTW, we can update to include the SSL changes your bug references right
away.  Long term, I'd like to go with the OSLO approach.

John
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Duplication of code in nova and cinder

2012-12-11 Thread Joshua Harlow
Related to this, how do we in the future stop such code-copying from happening 
in the first place?

Is it just that there needs to be a place for this (oslo?) that can be updated 
more quickly, or something similar?

I'm always sorta 'weirded out' when people say that they copied some code in 
the name of 'it was quicker' or we are just 'borrowing it'.

From: John Griffith 
john.griff...@solidfire.commailto:john.griff...@solidfire.com
Date: Tuesday, December 11, 2012 3:36 PM
To: Sam Morrison sorri...@gmail.commailto:sorri...@gmail.com
Cc: OpenStack mailing list 
openstack@lists.launchpad.netmailto:openstack@lists.launchpad.net
Subject: Re: [Openstack] Duplication of code in nova and cinder



On Tue, Dec 11, 2012 at 4:24 PM, Sam Morrison 
sorri...@gmail.commailto:sorri...@gmail.com wrote:
I attempted to create a volume from an image in cinder and was getting this 
strange error, turns out it was because I had my glance servers specified as 
https://glanceserver:9292

In cinder the version of images/glance.py is older than the one in nova and is 
missing the ssl support additions.
https://bugs.launchpad.net/cinder/+bug/1089147

My real question is why is there one version is nova and one version in cinder. 
I also think there is quite a bit more unnecessary duplication.
Should it all go into oslo?

Cheers,
Sam


___
Mailing list: https://launchpad.net/~openstack
Post to : 
openstack@lists.launchpad.netmailto:openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp
Hi Sam,

Short answer is yes.  Need to check scoping etc and make sure that it does in 
fact fit within the parameters of OSLO.  It's something I thought of a couple 
weeks ago but to be honest it's been low on my list personally and nobody else 
that I know of has shown an interest in picking it up.

You'll notice another image related item we're *borrowing* from Nova 
(cinder.image.image_utils).  In both cases there are slight modifications to 
fit Cinder's use case that given a bit of work could easily be shared.

John
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Duplication of code in nova and cinder

2012-12-11 Thread Huang Zhiteng
On Wed, Dec 12, 2012 at 8:56 AM, Joshua Harlow harlo...@yahoo-inc.com wrote:
 Related to this, how do we in the future stop such code-copying from
 happening in the first place?

 Is it just that there needs to be a place for this (oslo?) that can be
 updated more quickly, or something similar?

 I'm always sorta 'weirded out' when people say that they copied some code in
 the name of 'it was quicker' or we are just 'borrowing it'.
But you have to admit 'it is quicker'.  My experience is getting
common code into Oslo and then port to project usually take two times
longer time to merge, in best case.

 From: John Griffith john.griff...@solidfire.com
 Date: Tuesday, December 11, 2012 3:36 PM
 To: Sam Morrison sorri...@gmail.com
 Cc: OpenStack mailing list openstack@lists.launchpad.net
 Subject: Re: [Openstack] Duplication of code in nova and cinder



 On Tue, Dec 11, 2012 at 4:24 PM, Sam Morrison sorri...@gmail.com wrote:

 I attempted to create a volume from an image in cinder and was getting
 this strange error, turns out it was because I had my glance servers
 specified as https://glanceserver:9292

 In cinder the version of images/glance.py is older than the one in nova
 and is missing the ssl support additions.
 https://bugs.launchpad.net/cinder/+bug/1089147

 My real question is why is there one version is nova and one version in
 cinder. I also think there is quite a bit more unnecessary duplication.
 Should it all go into oslo?

 Cheers,
 Sam


 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp

 Hi Sam,

 Short answer is yes.  Need to check scoping etc and make sure that it does
 in fact fit within the parameters of OSLO.  It's something I thought of a
 couple weeks ago but to be honest it's been low on my list personally and
 nobody else that I know of has shown an interest in picking it up.

 You'll notice another image related item we're *borrowing* from Nova
 (cinder.image.image_utils).  In both cases there are slight modifications to
 fit Cinder's use case that given a bit of work could easily be shared.

 John

 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp




-- 
Regards
Huang Zhiteng

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Duplication of code in nova and cinder

2012-12-11 Thread Joshua Harlow
Isn't that a lets fix the slowness instead of continue bad behavior.

Fix the root problem and don't bypass it in the first place?

Then said root problem is solved for everyone and isn't pushed into the
future (as is typically done).

On 12/11/12 5:31 PM, Huang Zhiteng winsto...@gmail.com wrote:

On Wed, Dec 12, 2012 at 8:56 AM, Joshua Harlow harlo...@yahoo-inc.com
wrote:
 Related to this, how do we in the future stop such code-copying from
 happening in the first place?

 Is it just that there needs to be a place for this (oslo?) that can be
 updated more quickly, or something similar?

 I'm always sorta 'weirded out' when people say that they copied some
code in
 the name of 'it was quicker' or we are just 'borrowing it'.
But you have to admit 'it is quicker'.  My experience is getting
common code into Oslo and then port to project usually take two times
longer time to merge, in best case.

 From: John Griffith john.griff...@solidfire.com
 Date: Tuesday, December 11, 2012 3:36 PM
 To: Sam Morrison sorri...@gmail.com
 Cc: OpenStack mailing list openstack@lists.launchpad.net
 Subject: Re: [Openstack] Duplication of code in nova and cinder



 On Tue, Dec 11, 2012 at 4:24 PM, Sam Morrison sorri...@gmail.com
wrote:

 I attempted to create a volume from an image in cinder and was getting
 this strange error, turns out it was because I had my glance servers
 specified as https://glanceserver:9292

 In cinder the version of images/glance.py is older than the one in nova
 and is missing the ssl support additions.
 https://bugs.launchpad.net/cinder/+bug/1089147

 My real question is why is there one version is nova and one version in
 cinder. I also think there is quite a bit more unnecessary duplication.
 Should it all go into oslo?

 Cheers,
 Sam


 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp

 Hi Sam,

 Short answer is yes.  Need to check scoping etc and make sure that it
does
 in fact fit within the parameters of OSLO.  It's something I thought of
a
 couple weeks ago but to be honest it's been low on my list personally
and
 nobody else that I know of has shown an interest in picking it up.

 You'll notice another image related item we're *borrowing* from Nova
 (cinder.image.image_utils).  In both cases there are slight
modifications to
 fit Cinder's use case that given a bit of work could easily be shared.

 John

 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp




-- 
Regards
Huang Zhiteng


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Duplication of code in nova and cinder

2012-12-11 Thread Huang Zhiteng
On Wed, Dec 12, 2012 at 9:34 AM, Joshua Harlow harlo...@yahoo-inc.com wrote:
 Isn't that a lets fix the slowness instead of continue bad behavior.

 Fix the root problem and don't bypass it in the first place?

 Then said root problem is solved for everyone and isn't pushed into the
 future (as is typically done).

I'm not saying copying is the right thing to do.  I totally agree we
should avoid doing this.  Fixing the slowness is also important.  Oslo
core devs, please take a look at the review queue, I've patches there
for you. :)
-- 
Regards
Huang Zhiteng

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Duplication of code in nova and cinder

2012-12-11 Thread John Griffith
On Tue, Dec 11, 2012 at 6:34 PM, Joshua Harlow harlo...@yahoo-inc.comwrote:

 Isn't that a lets fix the slowness instead of continue bad behavior.

 Fix the root problem and don't bypass it in the first place?

 Then said root problem is solved for everyone and isn't pushed into the
 future (as is typically done).

 On 12/11/12 5:31 PM, Huang Zhiteng winsto...@gmail.com wrote:

 On Wed, Dec 12, 2012 at 8:56 AM, Joshua Harlow harlo...@yahoo-inc.com
 wrote:
  Related to this, how do we in the future stop such code-copying from
  happening in the first place?
 
  Is it just that there needs to be a place for this (oslo?) that can be
  updated more quickly, or something similar?
 
  I'm always sorta 'weirded out' when people say that they copied some
 code in
  the name of 'it was quicker' or we are just 'borrowing it'.
 But you have to admit 'it is quicker'.  My experience is getting
 common code into Oslo and then port to project usually take two times
 longer time to merge, in best case.
 
  From: John Griffith john.griff...@solidfire.com
  Date: Tuesday, December 11, 2012 3:36 PM
  To: Sam Morrison sorri...@gmail.com
  Cc: OpenStack mailing list openstack@lists.launchpad.net
  Subject: Re: [Openstack] Duplication of code in nova and cinder
 
 
 
  On Tue, Dec 11, 2012 at 4:24 PM, Sam Morrison sorri...@gmail.com
 wrote:
 
  I attempted to create a volume from an image in cinder and was getting
  this strange error, turns out it was because I had my glance servers
  specified as https://glanceserver:9292
 
  In cinder the version of images/glance.py is older than the one in nova
  and is missing the ssl support additions.
  https://bugs.launchpad.net/cinder/+bug/1089147
 
  My real question is why is there one version is nova and one version in
  cinder. I also think there is quite a bit more unnecessary duplication.
  Should it all go into oslo?
 
  Cheers,
  Sam
 
 
  ___
  Mailing list: https://launchpad.net/~openstack
  Post to : openstack@lists.launchpad.net
  Unsubscribe : https://launchpad.net/~openstack
  More help   : https://help.launchpad.net/ListHelp
 
  Hi Sam,
 
  Short answer is yes.  Need to check scoping etc and make sure that it
 does
  in fact fit within the parameters of OSLO.  It's something I thought of
 a
  couple weeks ago but to be honest it's been low on my list personally
 and
  nobody else that I know of has shown an interest in picking it up.
 
  You'll notice another image related item we're *borrowing* from Nova
  (cinder.image.image_utils).  In both cases there are slight
 modifications to
  fit Cinder's use case that given a bit of work could easily be shared.
 
  John
 
  ___
  Mailing list: https://launchpad.net/~openstack
  Post to : openstack@lists.launchpad.net
  Unsubscribe : https://launchpad.net/~openstack
  More help   : https://help.launchpad.net/ListHelp
 
 
 
 
 --
 Regards
 Huang Zhiteng

 The reality is that sometimes copying (or borrowing) code from another
project is in fact that best way to go.  Personally my opinion is that in
some cases, if there's a module that's needed that exists in another
OpenStack project but is not available in OSLO then by all means it should
be used (as it has here).  At the same time there are cases where a major
component (for example the filter scheduler patch in Cinder) should be held
up until the common code is in fact available in OSLO.  There's also a
third case where the patch should move forward as is, but a BP should be
submitted against OSLO (IMO).

With respect to how to address bad behavior, I think that's a bit strong
of a term (especially since I'm guilty of copying/borrowing files from
Nova).  Keep in mind that Cinder started as a *copy* of Nova, and while
it's growing and we're making adjustments and corrections as we go, the
reality is there's going to be things like this that come up, especially
for the first release cycle or two of Cinder.

Thanks,
John
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp