← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1536849] Re: Software metadata defs for OS::Nova::Instance should have properties target set

 

Reviewed:  https://review.openstack.org/271100
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=28becd1aadd3b6f3ed1c656f79470a2a988e2c72
Submitter: Jenkins
Branch:    master

commit 28becd1aadd3b6f3ed1c656f79470a2a988e2c72
Author: Travis Tripp <travis.tripp@xxxxxxx>
Date:   Thu Jan 21 17:29:21 2016 -0700

    Add properties_target to Instance SW metadefs
    
    There are several metadata definitions for software that are
    associated with Nova instances (OS::Nova::Instance) which should
    have their properties target set to "metadata".
    
    The ability to add metadata to an instance leveraging these
    definitions at launch time was recently added to horizon. In
    a follow up discussion, somebody asked about using the metadata
    definitions to also choose nova scheduler hints at launch time,
    without confusing the two intended purposes of the metadata.
    This raised our awareness that we don't have properties_target
    set to "metadata" (rather than "scheduler hints") for
    OS::Nova::Instance on the software metadata definition files.
    
    This patch adds "properties_target": "metadata" to those files.
    
    Change-Id: I247226ad78762d1d2add3bb39b1e780b93f36370
    Closes-Bug: 1536849


** Changed in: glance
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1536849

Title:
  Software metadata defs for OS::Nova::Instance should have properties
  target set

Status in Glance:
  Fix Released

Bug description:
  The metadata definitions in etc/metadefs allow each namespace to be
  associated with a resource type in OpenStack.  Some types of resources
  have more than one type of properties, so the namespaces allow this to
  be specified using a properties_target attribute.

  For example, cinder supports both "image properties" and "user
  properties". Image properties affect nova scheduling and are handled
  by the nova scheduler the same way image properties are.  User
  properties are just plain metadata.  Example:

  https://github.com/openstack/glance/blob/7ba2346795b6cc1c1c061bbe63ae1d62f812a0ca/etc/metadefs
  /compute-guest-memory-backing.json#L19

  There are several metadata definitions for software that are
  associated with Nova instances (OS::Nova::Instance) which should have
  their properties target set to "metadata". The ability to add metadata
  to an instance leveraging these definitions at launch time was
  recently added to horizon. In a follow up discussion, somebody asked
  about using the metadata definitions to also choose nova scheduler
  hints at launch time and how to make sure that the two weren't
  confused. This raised our awareness that we don't have
  properties_target set to "metadata" (rather than "scheduler_hints")
  for OS::Nova::Instance on the following software namespace files:

  https://github.com/openstack/glance/blob/7ba2346795b6cc1c1c061bbe63ae1d62f812a0ca/etc/metadefs
  /software-databases.json#L16

  
  https://github.com/openstack/glance/blob/7ba2346795b6cc1c1c061bbe63ae1d62f812a0ca/etc/metadefs/software-runtimes.json#L16

  https://github.com/openstack/glance/blob/7ba2346795b6cc1c1c061bbe63ae1d62f812a0ca/etc/metadefs
  /software-webservers.json#L16

  It should be noted that updating namespaces is already possible with
  glance-manage. E.g.

  ttripp@ubuntu:/opt/stack/glance$ glance-manage db_load_metadefs etc/metadefs -h       
  usage: glance-manage db_load_metadefs [-h]
                                        [path] [merge] [prefer_new] [overwrite]

  positional arguments:
    path
    merge
    prefer_new
    overwrite

  
  So, you just have to call: 

  ttripp@ubuntu:/opt/stack/glance$ glance-manage db_load_metadefs
  etc/metadefs true true

  See also: https://youtu.be/zJpHXdBOoeM

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1536849/+subscriptions


References