Yes, correct, I thought you wanted the info as soon as the scheduler decided on 
a host. create.end will only fire when the instance has been created. 

And you're correct about the scheduler, but all schedulers will likely be a 
derivation of FilterScheduler or simply have custom filters/weights. Simple and 
Change will turn to filters/weights soon. Depends on your installation. 


From: Joshua Harlow []
Sent: Thursday, April 26, 2012 5:07 PM
To: Sandy Walsh; openstack
Subject: Re: [Openstack] Question on notifications


With these messages, instead of the “compute.instance.create.end” it can’t be 
guaranteed that the instance actually got created right?

If I listen for the “compute.instance.create.end” and use the hostname (which 
is part of the publisher id) then I can know that it actually got created?

Is the “weighted_host” also dependent on which type of scheduler is used? (I 
would assume that not all schedulers do weighting?)

On 4/25/12 5:29 PM, "Sandy Walsh" <> wrote:

You want these events:

scheduler.run_instance.start (generated when scheduling begins)

scheduler.run_instance.scheduled (when a host is selected. one per instance)

scheduler.run_instance.end (all instances placed)

The .scheduled event will have the target hostname in it in the

"weighted_host" key ...

For example ...


 {u'_context_auth_token': None,

  u'_context_is_admin': True,

  u'_context_project_id': None,

  u'_context_quota_class': None,

  u'_context_read_deleted': u'no',

  u'_context_remote_address': None,

  u'_context_request_id': u'',

  u'_context_roles': [u'admin', u'identity:admin'],

  u'_context_timestamp': u'2012-04-25T20:32:44.506538',

  u'_context_user_id': None,

  u'event_type': u'scheduler.run_instance.scheduled',

  u'message_id': u'2df8...fc',

  u'payload': {u'instance_id': u'7c21...960',

     u'request_spec': {u'block_device_mapping': [],

                       u'image': {u'checksum': u'ee0e...cfcc',

                                  u'container_format': u'ovf',

                                  u'created_at': u'2012-02-29 23:12:16',

                                  u'deleted': False,

                                  u'deleted_at': None,

                                  u'disk_format': u'vhd',

                                  u'id': u'079...b5fb',

                                  u'is_public': True,

                                  u'min_disk': u'10',

                                  u'min_ram': u'256',

                                  u'name': u'CentOS 6.0',

                                  u'properties': {u'arch': u'x86-64',

                         u'auto_disk_config': u'True',

                         u'os_distro': u'centos',

                         u'os_type': u'linux',

                         u'os_version': u'6.0',

                         u'rax_managed': u'false',

                         u'rax_options': u'0'},

                             u'size': 390243020,

                             u'status': u'active',

                             u'updated_at': u'2012-02-29 23:12:32'},

                  u'instance_properties': {u'access_ip_v4': None,

                               u'access_ip_v6': None,

                               u'architecture': u'x86-64',

                               u'auto_disk_config': True,

                               u'availability_zone': None,

                               u'config_drive': u'',

          .                    u'config_drive_id': u'',

                              u'display_description': u'testserver...9870',

                              u'display_name': u'testserver...9870',

                              u'ephemeral_gb': 0,

                              u'image_ref': u'0790...b5fb',

                              u'instance_type_id': 1,

                              u'kernel_id': u'',

                              u'key_data': None,

                              u'key_name': None,

                              u'launch_index': 0,

                              u'launch_time': u'2012-04-25T20:32:10Z',

                              u'locked': False,

                              u'memory_mb': 256,

                              u'metadata': {},

                              u'os_type': u'linux',

                              u'power_state': 0,

                              u'progress': 0,

                              u'project_id': u'5820792',

                              u'ramdisk_id': u'',

                              u'reservation_id': u'',

                              u'root_device_name': None,

                              u'root_gb': 10,

                              u'user_data': u'',

                              u'user_id': u'162201',

                              u'uuid': u'7c210...ed8960',

                              u'vcpus': 4,

                              u'vm_mode': None,

                              u'vm_state': u'building'},

               u'instance_type': {u'created_at': None,

                                  u'deleted': False,

                                  u'deleted_at': None,

                                  u'ephemeral_gb': 0,

                                  u'extra_specs': {},

                                  u'flavorid': u'1',

                                  u'id': 1,

                                  u'memory_mb': 256,

                                  u'name': u'256MB instance',

                                  u'root_gb': 10,

                                  u'rxtx_factor': 1.0,

                                  u'swap': 512,

                                  u'updated_at': None,

                                  u'vcpu_weight': 10,

                                  u'vcpus': 4},

                           u'num_instances': 1,

                           u'security_group': [u'default']},

      u'weighted_host': {u'host': u'compute-xx-yy-zz-20',

                         u'weight': 4945.0}},

  u'priority': u'INFO',

  u'publisher_id': u'',

  u'timestamp': u'2012-04-25 20:32:44.506474'}]

On 04/25/2012 06:44 PM, Joshua Harlow wrote:

> Hi all,


> I was looking at the notification outputs, which are very useful and I

> was wondering if the way to say figure out which hypervisor a VM is

> being built on.


> There seems to be the following key: "publisher_id":

> "compute.buildingbuild" (event is "compute.instance.create.end")


> It would seem the stuff after “compute” is the hostname, would that be

> correct, or should the scheduler messages be intercepted, which as

> example has the following:


> "weighted_host": {

>     "host": "buildingbuild",

>     "weight": -1488.0

> }


> I would think the first practice would be right, since its from the

> compute node instead of the scheduler, but would like some feedback :-)


> Thx!




> _______________________________________________

> Mailing list:

> Post to     :

> Unsubscribe :

> More help   :


Mailing list:

Post to     :

Unsubscribe :

More help   :

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to