Re: [openstack-dev] [glance] docs: architecture or hw_architecture

2017-08-23 Thread Clint Byrum
Excerpts from Dean Troyer's message of 2017-08-23 13:48:07 -0500:
> On Wed, Aug 23, 2017 at 12:33 PM, Brian Rosmaita
>  wrote:
> > My point is just that Glance went one way on this, Nova went a
> > different way, and users are left hanging.  My secondary point is that
> > it might be useful to catalog these things in the metadata definitions
> > service so that we all stay on the same page better.
> 
> This is a great example of why attributes that are actually used
> elsewhere should be defined in the API rather than just picked out of
> a collection of metadata/properties.

Note that there was at least an effort at one time to create a
definitive place to share tags across OpenStack projects and across
clouds:

https://wiki.openstack.org/wiki/Graffiti

I don't know where this is at these days, but I would agree that I'd
rather see any guarantees a service provides documented and expressed in
its API. When one project's objects are referenced in anothers' API,
that's a good place for those two projects to work very closely
together. It looks like that didn't quite happen here. A quick doc fix
should resolve the matter, or is the use of 'architecture' now in other
places?

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [glance] docs: architecture or hw_architecture

2017-08-23 Thread Dean Troyer
On Wed, Aug 23, 2017 at 12:33 PM, Brian Rosmaita
 wrote:
> My point is just that Glance went one way on this, Nova went a
> different way, and users are left hanging.  My secondary point is that
> it might be useful to catalog these things in the metadata definitions
> service so that we all stay on the same page better.

This is a great example of why attributes that are actually used
elsewhere should be defined in the API rather than just picked out of
a collection of metadata/properties.

dt

-- 

Dean Troyer
dtro...@gmail.com

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [glance] docs: architecture or hw_architecture

2017-08-23 Thread Brian Rosmaita
On Wed, Aug 23, 2017 at 10:54 AM, Markus Zoeller
 wrote:
> On 23.08.2017 14:47, Brian Rosmaita wrote:
>> 'architecture' is one of the "common image properties" that was
>> introduced in Folsom in an effort to standardize use of image
>> metadata.  It's not a mistake in the Glance docs, it's just that Nova
>> is looking for a differently named property.
>>
>> Glance has had a metadata definitions service [0,1] since Juno.  It
>> provides a common API for vendors, admins, services, and users to
>> meaningfully define available key / value pair metadata that can be
>> used on different types of resources (images, artifacts, volumes,
>> flavors, aggregates, and other resources). A definition includes a
>> property’s key, its description, its constraints, and the resource
>> types to which it can be associated.  It's probably a better place to
>> store this kind of information than in documentation.  I think it's
>> under-utilized.
>>
>> [0] https://developer.openstack.org/api-ref/image/v2/metadefs-index.html
>> [1] https://docs.openstack.org/glance/latest/user/metadefs-concepts.html
>
>
> OK, I agree that the information to do it right is available:
>
> "The keys have different prefixes on images than on flavors.
> On flavors keys are prefixed with hw:, but on images the keys
> are prefixed with hw_."
>
> It's just not *that* easy to find and to deduct. I was looking for that
> information as an operator, to allow the Nova scheduler to do its work
> in a mixed arch environment (x86 + s390x) based on image properties.
>
> I still don't fully get it. In which use-case is `architecture` the
> correct property to set?

It depends on what you mean by "correct". If you're just describing
what's in the image, it works fine.  If you expect it to actually do
something, then you need to use the hw_ one.

My point is just that Glance went one way on this, Nova went a
different way, and users are left hanging.  My secondary point is that
it might be useful to catalog these things in the metadata definitions
service so that we all stay on the same page better.

cheers,
brian

> Regards, Markus Zoeller (markus_z)
>
>> On Wed, Aug 23, 2017 at 5:45 AM, Markus Zoeller
>>  wrote:
>>> On 22.08.2017 17:10, Markus Zoeller wrote:
 I'm wondering if there is an issue in the docs which describe the
 possible image metadata properties:
 https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html#

 This document says to use `architecture` (e.g. x86_64 or s390x or ppc64)
 but the Nova scheduler image properties filter uses `hw_architecture`
 (note the *hw_* prefix):
 https://github.com/openstack/nova/blob/4a7502a5c9e84a8c8cef7f355d72425b26b8c379/nova/scheduler/filters/image_props_filter.py#L44

 Is that simply a mistake in the Glance docs or do I miss some kind of
 conversion between those metadata keys?

>>>
>>> Looks like only `hw_architecture` works in my x86 + s390x environment.
>>> I'm going to push an update to the Glance docs + an update to the
>>> `os_image` Ansible module which uses `cpu_arch` in its documentation:
>>> http://docs.ansible.com/ansible/latest/os_image_module.html
>>>
>>> --
>>> Regards, Markus Zoeller (markus_z)
>>>
>>>
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [glance] docs: architecture or hw_architecture

2017-08-23 Thread Markus Zoeller
On 23.08.2017 14:47, Brian Rosmaita wrote:
> 'architecture' is one of the "common image properties" that was
> introduced in Folsom in an effort to standardize use of image
> metadata.  It's not a mistake in the Glance docs, it's just that Nova
> is looking for a differently named property.
> 
> Glance has had a metadata definitions service [0,1] since Juno.  It
> provides a common API for vendors, admins, services, and users to
> meaningfully define available key / value pair metadata that can be
> used on different types of resources (images, artifacts, volumes,
> flavors, aggregates, and other resources). A definition includes a
> property’s key, its description, its constraints, and the resource
> types to which it can be associated.  It's probably a better place to
> store this kind of information than in documentation.  I think it's
> under-utilized.
> 
> [0] https://developer.openstack.org/api-ref/image/v2/metadefs-index.html
> [1] https://docs.openstack.org/glance/latest/user/metadefs-concepts.html


OK, I agree that the information to do it right is available:

"The keys have different prefixes on images than on flavors.
On flavors keys are prefixed with hw:, but on images the keys
are prefixed with hw_."

It's just not *that* easy to find and to deduct. I was looking for that
information as an operator, to allow the Nova scheduler to do its work
in a mixed arch environment (x86 + s390x) based on image properties.

I still don't fully get it. In which use-case is `architecture` the
correct property to set?

-- 
Regards, Markus Zoeller (markus_z)

> On Wed, Aug 23, 2017 at 5:45 AM, Markus Zoeller
>  wrote:
>> On 22.08.2017 17:10, Markus Zoeller wrote:
>>> I'm wondering if there is an issue in the docs which describe the
>>> possible image metadata properties:
>>> https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html#
>>>
>>> This document says to use `architecture` (e.g. x86_64 or s390x or ppc64)
>>> but the Nova scheduler image properties filter uses `hw_architecture`
>>> (note the *hw_* prefix):
>>> https://github.com/openstack/nova/blob/4a7502a5c9e84a8c8cef7f355d72425b26b8c379/nova/scheduler/filters/image_props_filter.py#L44
>>>
>>> Is that simply a mistake in the Glance docs or do I miss some kind of
>>> conversion between those metadata keys?
>>>
>>
>> Looks like only `hw_architecture` works in my x86 + s390x environment.
>> I'm going to push an update to the Glance docs + an update to the
>> `os_image` Ansible module which uses `cpu_arch` in its documentation:
>> http://docs.ansible.com/ansible/latest/os_image_module.html
>>
>> --
>> Regards, Markus Zoeller (markus_z)
>>
>>


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [glance] docs: architecture or hw_architecture

2017-08-23 Thread Brian Rosmaita
'architecture' is one of the "common image properties" that was
introduced in Folsom in an effort to standardize use of image
metadata.  It's not a mistake in the Glance docs, it's just that Nova
is looking for a differently named property.

Glance has had a metadata definitions service [0,1] since Juno.  It
provides a common API for vendors, admins, services, and users to
meaningfully define available key / value pair metadata that can be
used on different types of resources (images, artifacts, volumes,
flavors, aggregates, and other resources). A definition includes a
property’s key, its description, its constraints, and the resource
types to which it can be associated.  It's probably a better place to
store this kind of information than in documentation.  I think it's
under-utilized.

[0] https://developer.openstack.org/api-ref/image/v2/metadefs-index.html
[1] https://docs.openstack.org/glance/latest/user/metadefs-concepts.html

On Wed, Aug 23, 2017 at 5:45 AM, Markus Zoeller
 wrote:
> On 22.08.2017 17:10, Markus Zoeller wrote:
>> I'm wondering if there is an issue in the docs which describe the
>> possible image metadata properties:
>> https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html#
>>
>> This document says to use `architecture` (e.g. x86_64 or s390x or ppc64)
>> but the Nova scheduler image properties filter uses `hw_architecture`
>> (note the *hw_* prefix):
>> https://github.com/openstack/nova/blob/4a7502a5c9e84a8c8cef7f355d72425b26b8c379/nova/scheduler/filters/image_props_filter.py#L44
>>
>> Is that simply a mistake in the Glance docs or do I miss some kind of
>> conversion between those metadata keys?
>>
>
> Looks like only `hw_architecture` works in my x86 + s390x environment.
> I'm going to push an update to the Glance docs + an update to the
> `os_image` Ansible module which uses `cpu_arch` in its documentation:
> http://docs.ansible.com/ansible/latest/os_image_module.html
>
> --
> Regards, Markus Zoeller (markus_z)
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [glance] docs: architecture or hw_architecture

2017-08-23 Thread Markus Zoeller
On 22.08.2017 17:10, Markus Zoeller wrote:
> I'm wondering if there is an issue in the docs which describe the
> possible image metadata properties:
> https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html#
> 
> This document says to use `architecture` (e.g. x86_64 or s390x or ppc64)
> but the Nova scheduler image properties filter uses `hw_architecture`
> (note the *hw_* prefix):
> https://github.com/openstack/nova/blob/4a7502a5c9e84a8c8cef7f355d72425b26b8c379/nova/scheduler/filters/image_props_filter.py#L44
> 
> Is that simply a mistake in the Glance docs or do I miss some kind of
> conversion between those metadata keys?
> 

Looks like only `hw_architecture` works in my x86 + s390x environment.
I'm going to push an update to the Glance docs + an update to the
`os_image` Ansible module which uses `cpu_arch` in its documentation:
http://docs.ansible.com/ansible/latest/os_image_module.html

-- 
Regards, Markus Zoeller (markus_z)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [glance] docs: architecture or hw_architecture

2017-08-22 Thread Markus Zoeller
I'm wondering if there is an issue in the docs which describe the
possible image metadata properties:
https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html#

This document says to use `architecture` (e.g. x86_64 or s390x or ppc64)
but the Nova scheduler image properties filter uses `hw_architecture`
(note the *hw_* prefix):
https://github.com/openstack/nova/blob/4a7502a5c9e84a8c8cef7f355d72425b26b8c379/nova/scheduler/filters/image_props_filter.py#L44

Is that simply a mistake in the Glance docs or do I miss some kind of
conversion between those metadata keys?

-- 
Regards, Markus Zoeller (markus_z)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev