Hi Heng, I think Joseph has the best suggestion for tracking the HostState data currently. Either that or use nova-manage to open a python shell and query the database yourself.
Another possibility (more more work) would be to create an API extension that could query the scheduler for this information. A plug-in is recommended since it wouldn't have to be deployed to production. But, in the short term, I would just add some debug statements in there to see what it actually has access to. Sorry I can't be more specific, but I haven't looked at the scheduler code in a long time and I'm not really sure how it has changed. It's nice to see that your looking into the json filter though. If you're still having problems let me know and I'll dig deeper. Cheers, Sandy ________________________________________ From: [email protected] [[email protected]] on behalf of Joseph Suh [[email protected]] Sent: Tuesday, August 07, 2012 8:01 AM To: Heng Xu Cc: [email protected] Subject: Re: [Openstack] Cannot pass hint to Nova Scheduler Heng, You can print the values in the HostState class. If you want to monitor the changes of the values, for example, you can print (either directly or using LOG.debug()), the values in the code where you want monitor, for example, consume_from_instance(). Thanks, Joseph ---- (w) 703-248-6160 (c) 571-340-2434 (f) 703-812-3712 http://www.east.isi.edu/~jsuh Information Sciences Institute University of Southern California 3811 N. Fairfax Drive Suite 200 Arlington, VA, 22203, USA ----- Original Message ----- From: "Jay Pipes" <[email protected]> To: "Heng Xu" <[email protected]> Cc: [email protected] Sent: Monday, August 6, 2012 12:11:58 PM Subject: Re: [Openstack] Cannot pass hint to Nova Scheduler On 08/04/2012 07:48 AM, Heng Xu wrote: > But I tried a few things in HostState class, I ran into error, because I > could not monitor the stats in hoststates class as opposed to a database, is > there a way to check the stats in HostState class as exists in memory? cc'ing Sandy Walsh, who is vastly more familiar with the scheduler than I am :) Sandy, see Heng's question above... seems like a great question to me -- and also a possible mini-project for someone to work on that would add a scheduler-diagnostics extension if such functionality isn't readily available. Best, -jay > Heng > ________________________________________ > From: Jay Pipes [[email protected]] > Sent: Friday, August 03, 2012 4:38 PM > To: Heng Xu > Cc: [email protected] > Subject: Re: [Openstack] Cannot pass hint to Nova Scheduler > > On 08/03/2012 09:28 AM, Heng Xu wrote: >> Another questions is, I can get all the status of a computing node in the >> mysql nova database, and select * from compute_node, but now I am using json >> filter, the only field I have success with now is the free_ram_db, if my >> hint uses free_disk_gb, then I always get error, but the database is showing >> my compute node has $free_disk_gb equal 17, so I was wondering, where to >> find exactly what kind of json field can use in json filter, thanks in >> advance > > The nova.scheduler.host_manager.HostState class is what is checked for > attributes, not the ComputeNode model. So, you need to use > "$free_disk_mb", not "free_disk_gb". > > Best, > -jay > > _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp

