Integrating OpenStack Neat with OpenStack IceHouse on Ubuntu 14.04

376 views
Skip to first unread message

Wildanil Ghozi

unread,
Mar 20, 2015, 3:23:58 AM3/20/15
to opensta...@googlegroups.com
Hii Anton and all.
I tried to integrating openstack neat to openstack Icehouse on ubuntu 14.04. All dependencies has installed. No error on Setup, when I start all service using ./all-start.sh everythink is okay. But when I check /var/log/neat/ no file log created.
I tried to start each service using start-*.py.

1. data collector : I got report like this.
root@compute2:/home/compute2/beloglazov-openstack-neat-623a1c9# python start-data-collector.py
Traceback (most recent call last):
  File "start-data-collector.py", line 18, in <module>
    collector.start()
  File "<string>", line 2, in start
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/home/compute2/beloglazov-openstack-neat-623a1c9/neat/locals/collector.py", line 140, in start
    int(interval))
  File "<string>", line 2, in start
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/home/compute2/beloglazov-openstack-neat-623a1c9/neat/common.py", line 58, in start
    state = init_state(config)
  File "<string>", line 2, in init_state
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/home/compute2/beloglazov-openstack-neat-623a1c9/neat/locals/collector.py", line 160, in init_state
    host_cpu_mhz, host_ram = get_host_characteristics(vir_connection)
  File "<string>", line 2, in get_host_characteristics
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 275, in contracts_checker
    raise e
contracts.interface.ContractNotRespected: Breach for return value of get_host_characteristics().
Could not satisfy any of the 3 clauses in Int|np_scalar_int|np_scalar,array(int).
 ---- Clause #1:   Int
 | Expected type 'int', got 'long'.
 | checking: Int   for value: Instance of long: 16034L  
 | Variables bound in inner context:
 | - args: Instance of tuple: ()
 | - kwargs: Instance of dict: {}
 ---- Clause #2:   np_scalar_int
 | Could not satisfy any of the 4 clauses in np_int8|np_int16|np_int32|np_int64.
 |  ---- Clause #1:   np_int8
 |  | Expected type 'int8', got 'long'.
 |  | checking: np_int8   for value: Instance of long: 16034L  
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ---- Clause #2:   np_int16
 |  | Expected type 'int16', got 'long'.
 |  | checking: np_int16   for value: Instance of long: 16034L  
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ---- Clause #3:   np_int32
 |  | Expected type 'int32', got 'long'.
 |  | checking: np_int32   for value: Instance of long: 16034L  
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ---- Clause #4:   np_int64
 |  | Expected type 'int64', got 'long'.
 |  | checking: np_int64   for value: Instance of long: 16034L  
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ------- (end clauses) -------
 | checking: np_int8|np_int16|np_int32|np_int64      for value: Instance of long: 16034L  
 | checking: $(np_int8|np_int16|np_int32|np_int64)   for value: Instance of long: 16034L  
 | checking: np_scalar_int                           for value: Instance of long: 16034L  
 | Variables bound in inner context:
 | - args: Instance of tuple: ()
 | - kwargs: Instance of dict: {}
 ---- Clause #3:   np_scalar,array(int)
 | Could not satisfy any of the 2 clauses in np_zeroshape_array|np_scalar_type.
 |  ---- Clause #1:   np_zeroshape_array
 |  | Not an array: <type 'long'> long
 |  | checking: callable()           for value: Instance of long: 16034L  
 |  | checking: np_zeroshape_array   for value: Instance of long: 16034L  
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ---- Clause #2:   np_scalar_type
 |  | Could not satisfy any of the 3 clauses in np_scalar_int|np_scalar_uint|np_scalar_float.
 |  |  ---- Clause #1:   np_scalar_int
 |  |  | Could not satisfy any of the 4 clauses in np_int8|np_int16|np_int32|np_int64.
 |  |  |  ---- Clause #1:   np_int8
 |  |  |  | Expected type 'int8', got 'long'.
 |  |  |  | checking: np_int8   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #2:   np_int16
 |  |  |  | Expected type 'int16', got 'long'.
 |  |  |  | checking: np_int16   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #3:   np_int32
 |  |  |  | Expected type 'int32', got 'long'.
 |  |  |  | checking: np_int32   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #4:   np_int64
 |  |  |  | Expected type 'int64', got 'long'.
 |  |  |  | checking: np_int64   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ------- (end clauses) -------
 |  |  | checking: np_int8|np_int16|np_int32|np_int64      for value: Instance of long: 16034L  
 |  |  | checking: $(np_int8|np_int16|np_int32|np_int64)   for value: Instance of long: 16034L  
 |  |  | checking: np_scalar_int                           for value: Instance of long: 16034L  
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ---- Clause #2:   np_scalar_uint
 |  |  | Could not satisfy any of the 4 clauses in np_uint8|np_uint16|np_uint32|np_uint64.
 |  |  |  ---- Clause #1:   np_uint8
 |  |  |  | Expected type 'uint8', got 'long'.
 |  |  |  | checking: np_uint8   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #2:   np_uint16
 |  |  |  | Expected type 'uint16', got 'long'.
 |  |  |  | checking: np_uint16   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #3:   np_uint32
 |  |  |  | Expected type 'uint32', got 'long'.
 |  |  |  | checking: np_uint32   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #4:   np_uint64
 |  |  |  | Expected type 'uint64', got 'long'.
 |  |  |  | checking: np_uint64   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ------- (end clauses) -------
 |  |  | checking: np_uint8|np_uint16|np_uint32|np_uint64      for value: Instance of long: 16034L  
 |  |  | checking: $(np_uint8|np_uint16|np_uint32|np_uint64)   for value: Instance of long: 16034L  
 |  |  | checking: np_scalar_uint                              for value: Instance of long: 16034L  
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ---- Clause #3:   np_scalar_float
 |  |  | Could not satisfy any of the 2 clauses in np_float32|np_float64.
 |  |  |  ---- Clause #1:   np_float32
 |  |  |  | Expected type 'float32', got 'long'.
 |  |  |  | checking: np_float32   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #2:   np_float64
 |  |  |  | Expected type 'float64', got 'long'.
 |  |  |  | checking: np_float64   for value: Instance of long: 16034L  
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ------- (end clauses) -------
 |  |  | checking: np_float32|np_float64      for value: Instance of long: 16034L  
 |  |  | checking: $(np_float32|np_float64)   for value: Instance of long: 16034L  
 |  |  | checking: np_scalar_float            for value: Instance of long: 16034L  
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ------- (end clauses) -------
 |  | checking: np_scalar_int|np_scalar_uint|np_scalar_float      for value: Instance of long: 16034L  
 |  | checking: $(np_scalar_int|np_scalar_uint|np_scalar_float)   for value: Instance of long: 16034L  
 |  | checking: np_scalar_type                                    for value: Instance of long: 16034L  
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ------- (end clauses) -------
 | checking: np_zeroshape_array|np_scalar_type      for value: Instance of long: 16034L  
 | checking: $(np_zeroshape_array|np_scalar_type)   for value: Instance of long: 16034L  
 | checking: np_scalar                              for value: Instance of long: 16034L  
 | checking: np_scalar,array(int)                   for value: Instance of long: 16034L  
 | Variables bound in inner context:
 | - args: Instance of tuple: ()
 | - kwargs: Instance of dict: {}
 ------- (end clauses) -------
checking: Int|np_scalar_int|np_scalar,array(int)      for value: Instance of long: 16034L            
checking: $(Int|np_scalar_int|np_scalar,array(int))   for value: Instance of long: 16034L            
checking: int                                         for value: Instance of long: 16034L            
checking: tuple(int,int)                              for value: Instance of tuple: (12768, 16034L)  
Variables bound in inner context:
- args: Instance of tuple: ()
- kwargs: Instance of dict: {}

and this is data-collector.log
2015-03-19 11:38:07,894 INFO     neat.locals.collector Creaned up the local data directory: /var/lib/neat
2015-03-19 11:38:07,894 INFO     neat.locals.collector Starting the data collector, iterations every 300 seconds

2. Global Manager : Igot report like this :
root@controller:/home/controller# python beloglazov-openstack-neat-623a1c9/start-global-manager.py
/usr/local/lib/python2.7/dist-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module.
  warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
/bin/sh: 1: ether-wake: not found
/bin/sh: 1: ether-wake: not found
Traceback (most recent call last):
  File "beloglazov-openstack-neat-623a1c9/start-global-manager.py", line 18, in <module>
    manager.start()
  File "/home/controller/beloglazov-openstack-neat-623a1c9/neat/globals/manager.py", line 169, in start
    state['compute_hosts'])
  File "<string>", line 2, in switch_hosts_on
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/home/controller/beloglazov-openstack-neat-623a1c9/neat/globals/manager.py", line 868, in switch_hosts_on
    db.insert_host_states(dict((x, 1) for x in hosts))
  File "<string>", line 2, in insert_host_states
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/home/controller/beloglazov-openstack-neat-623a1c9/neat/db.py", line 320, in insert_host_states
    for k, v in hosts.items()]
KeyError: 'compute1'

and this is log at /var/log/neat/global-manager.log
2015-03-20 14:13:16,705 DEBUG    neat.db Instantiated a Database object
2015-03-20 14:13:16,706 DEBUG    neat.db_utils Initialized a DB connection to mysql://neat:neat_db123@controller/neat
2015-03-20 14:13:16,730 DEBUG    neat.globals.manager Calling: ether-wake -i eth0 3c:07:54:7e:4d:75
2015-03-20 14:13:16,762 DEBUG    neat.globals.manager Calling: ether-wake -i eth0 3c:07:54:7e:74:55
2015-03-20 14:13:16,771 INFO     neat.globals.manager Switched on hosts: ['compute1', 'compute2']

3. Local Manager : No report
and this is log at /var/log/neat/local-manager.log
2015-03-20 13:17:18,028 INFO     neat.locals.manager Starting the local manager, iterations every 300 seconds
2015-03-20 13:17:18,075 DEBUG    neat.db Instantiated a Database object
2015-03-20 13:17:18,075 DEBUG    neat.db_utils Initialized a DB connection to mysql://neat:neat_db123@controller/neat
2015-03-20 13:17:18,077 INFO     neat.locals.manager Started an iteration
2015-03-20 13:17:18,077 INFO     neat.locals.manager The host is idle
2015-03-20 13:17:18,077 INFO     neat.locals.manager Skipped an iteration
2015-03-20 13:22:18,178 INFO     neat.locals.manager Started an iteration
2015-03-20 13:22:18,178 INFO     neat.locals.manager The host is idle
2015-03-20 13:22:18,178 INFO     neat.locals.manager Skipped an iteration
2015-03-20 13:27:18,279 INFO     neat.locals.manager Started an iteration
2015-03-20 13:27:18,279 INFO     neat.locals.manager The host is idle
2015-03-20 13:27:18,279 INFO     neat.locals.manager Skipped an iteration

I don't found python file to start db-cleaner.
I think openstack-neat not running as it should be here. When I tried to run stats.sh, the result is 0.
When I tried to check database at controller, the tables still empty.

Please help me to fix it.

王玺源

unread,
Mar 20, 2015, 5:16:25 AM3/20/15
to opensta...@googlegroups.com
Hello,could you tell me how to modify the file in /etc/init.d/openstack-neat-global-manager?
my file is below,but it's doesn't work.
Thank you very much.
#. /etc/rc.d/init.d/functions
#I have changed the first line here
. /lib/lsb/init-functions
suffix=global-manager
prog=openstack-neat-$suffix
exec="/usr/bin/neat-$suffix"
piddir="/var/run/neat"
pidfile="$piddir/neat-$suffix.pid"
logdir="/var/log/neat"
logfile="$logdir/global-manager-service.log"

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/$prog

start() {

    [ -x $exec ] || exit 5
    [ -f $config ] || exit 6
    echo -n $"Starting $prog:\n "
    mkdir -p $piddir
    mkdir -p $logdir
    daemon --user root --pidfile $pidfile "$exec &>$logfile & echo \$! > $pidfile"
    echo "daemon down.."
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

在 2015年3月20日星期五 UTC+8下午3:23:58,Wildanil Ghozi写道:

Anton Beloglazov

unread,
Mar 23, 2015, 2:20:28 AM3/23/15
to opensta...@googlegroups.com
Hi Wildanil,

1. Looks like the libvirt API has changed a little bit since this code was written. I've made a small change to support long values of RAM (https://github.com/beloglazov/openstack-neat/commit/84720fe3050d3c21ef42a3421f385fe76623f771). Please try to pull the latest state from github.

2. You need to have you host names configured correctly in `/etc/neat/neat.conf`, are your hosts called compute1, compute2, etc?

3. This log just shows that there are no VMs running on the host, but this probably happens because the data collector has failed to start.

Please let me know if the latest commit helped to solve your problem.

Best regards,
Anton

Anton Beloglazov

unread,
Mar 23, 2015, 2:23:03 AM3/23/15
to opensta...@googlegroups.com
Hi, 

Sorry, I don't have an Ubuntu instance at the moment to help debug this. It would be great if you or someone else could make the installation and service scripts work on Ubuntu, which we could then update in the main repository.

Thanks,
Anton

王玺源

unread,
Mar 23, 2015, 5:05:08 AM3/23/15
to opensta...@googlegroups.com
Hi Anton pro
I have  encountered the same problem as Wildanil wrote above.and I have modify the code as you write.But a new problem was appeared.:

$Starting openstack-neat-data-collector: Traceback (most recent call last):
  File "/usr/local/bin/neat-data-collector", line 9, in <module>
    load_entry_point('openstack-neat==0.1', 'console_scripts', 'neat-data-collector')()
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2311, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2017, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/locals/collector.py", line 94, in <module>
    from neat.contracts_extra import *
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2..7.egg/neat/contracts_extra.py", line 21, in <module>
    import neat.db
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py", line 26, in <module>
    class Database(object):
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py", line 142, in Database
    @contract
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/__init__.py", line 24, in contract
    return contract_decorator(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 138, in contract_decorator
    raise ContractSyntaxError(es.error, es.where)
contracts.interface.ContractSyntaxError: Unknown identifier 'long'. Did you mean 'Container'? (at char 0), (line:1, col:1)

 line  1 >long,>0
          ^
          |
          here or nearby

the data-collector.log said nothing but :
2015-03-23 16:37:53,454 INFO     neat.locals.collector Creaned up the local data directory: /var/lib/neat
2015-03-23 16:37:53,454 INFO     neat.locals.collector Starting the data collector, iterations every 300 seconds

Please help.Thanks

在 2015年3月23日星期一 UTC+8下午2:20:28,Anton Beloglazov写道:

王玺源

unread,
Mar 23, 2015, 5:33:05 AM3/23/15
to opensta...@googlegroups.com
and about the second problem,my compute node's hostname is ubuntu-zb.the problem is :
> /usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py(319)insert_host_states()
-> host_ids = self.select_host_ids()
(Pdb) n
> /usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py(320)insert_host_states()
-> to_insert = [{'host_id': host_ids[k],
(Pdb) n
> /usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py(322)insert_host_states()
-> for k, v in hosts.items()]
(Pdb) n
KeyError: ('zb',)
> /usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py(322)insert_host_states()
-> for k, v in hosts.items()]
so,did Neat only obtain 'zb' without 'ubuntu'? is it a bug? or some other problem?
Wait for your help.Thanks

在 2015年3月23日星期一 UTC+8下午2:20:28,Anton Beloglazov写道:
Hi Wildanil,

Anton Beloglazov

unread,
Mar 23, 2015, 11:36:42 PM3/23/15
to opensta...@googlegroups.com
I've just made another change, which should fix the issue with "long". Regarding the second issue, can you show me your neat.conf file?

Cheers,
Anton

--
You received this message because you are subscribed to the Google Groups "OpenStack Neat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openstack-nea...@googlegroups.com.
Visit this group at http://groups.google.com/group/openstack-neat.
For more options, visit https://groups.google.com/d/optout.

王玺源

unread,
Mar 23, 2015, 11:49:39 PM3/23/15
to opensta...@googlegroups.com
the second problem was happened in db.py lines 318.I found that the host_ids is empty.so the next command:host_ids[k] raise a KeyError.  Is that mean i shoud start the data-collector first to ensure that the database would have information?
the code is below: 
       to_insert = [{'host_id': host_ids[k],
                      'state': v}
                     for k, v in hosts.items()]

在 2015年3月24日星期二 UTC+8上午11:36:42,Anton Beloglazov写道:

王玺源

unread,
Mar 24, 2015, 12:37:19 AM3/24/15
to opensta...@googlegroups.com
it seems that the first problem is solved .the database have vm's information now .my neat.conf is :
compute_hosts = ubuntu-zb
and the error is :

 ping: unknown host ubuntu
ubuntu: Host name lookup failure
Specify the Ethernet address as 00:11:22:33:44:55.
ping: unknown host zb
zb: Host name lookup failure
Specify the Ethernet address as 00:11:22:33:44:55.
Traceback (most recent call last):
  File "/usr/local/bin/neat-global-manager", line 9, in <module>
    load_entry_point('openstack-neat==0.1', 'console_scripts', 'neat-global-manager')()
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py", line 175, in start
    state['compute_hosts'])
  File "<string>", line 2, in switch_hosts_on
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py", line 878, in switch_hosts_on
    db.insert_host_states(dict((x, 1) for x in hosts))
  File "<string>", line 2, in insert_host_states
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py", line 319, in insert_host_states
    host_ids = self.select_host_ids()
  File "<string>", line 2, in select_host_ids
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/db.py", line 286, in select_host_ids
    for x in self.hosts.select().execute().fetchall())
  File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/base.py", line 386, in execute
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1984, in _execute_clauseelement
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2026, in contextual_connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2065, in _wrap_pool_connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1395, in _handle_dbapi_exception_noconnection
  File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 199, in raise_from_cause
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2061, in _wrap_pool_connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 337, in connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 644, in _checkout
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 439, in checkout
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 964, in _do_get
  File "build/bdist.linux-x86_64/egg/sqlalchemy/util/langhelpers.py", line 60, in __exit__
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 961, in _do_get
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 284, in _create_connection
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 410, in __init__
  File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 538, in __connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/strategies.py", line 89, in connect
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 377, in connect
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1040, 'Too many connections')

so i think the program can't recognise the '-' symbol.

在 2015年3月24日星期二 UTC+8上午11:36:42,Anton Beloglazov写道:
I've just made another change, which should fix the issue with "long". Regarding the second issue, can you show me your neat.conf file?

Cheers,
Anton

Anton Beloglazov

unread,
Mar 24, 2015, 12:57:10 AM3/24/15
to opensta...@googlegroups.com
I see, can you try to put ubuntu-zb in quotes like "ubuntu-zb"?

Cheers,
Anton

Anton Beloglazov

unread,
Mar 24, 2015, 1:18:26 AM3/24/15
to opensta...@googlegroups.com
I've just made another change that should fix the problem with dashes in host names. You don't need to use quotes, just use your config as it was.

Cheers,
Anton
To unsubscribe from this group and stop receiving emails from it, send an email to openstack-neat+unsubscribe@googlegroups.com.

Kashyap Raiyani

unread,
Mar 24, 2015, 1:29:28 AM3/24/15
to opensta...@googlegroups.com
Hi Everyone,

I did integrate openstack neat with openstack(installed on ubuntu 12.04 LTS) and it worked properly. You can refer the same at https://groups.google.com/forum/#!topic/openstack-neat/2CmdlFIVggc 
It might be at some help for who all are trying to integrate on ubuntu 14.04.


Thanks & Regards,
Kashyap Raiyani

Anton Beloglazov

unread,
Mar 24, 2015, 1:31:24 AM3/24/15
to opensta...@googlegroups.com
Hi Kashyap,

Did you make any changes to the installation or start up scripts? If so, we could add them to the main repository.

Thanks,
Anton

Kashyap Raiyani

unread,
Mar 24, 2015, 1:55:25 AM3/24/15
to opensta...@googlegroups.com
Hi Anton,

No I did not make any changes to the start up scripts. Even though my whole process and problems + solutions are mentioned in that post discussion we did long time ago. 
And ya you asked me to write script for that initial problem( of no compute nodes are getting sleep-off at 0 VM) with openstack neat but I am not getting time to do so. But sure I will write soon.
  
Regards,
Kashyap

Anton Beloglazov

unread,
Mar 24, 2015, 2:01:32 AM3/24/15
to opensta...@googlegroups.com
I see, thanks! You mentioned that you've managed to run Neat successfully, did it perform in your environment as expected? Are you still using it?

Cheers,
Anton

--

Kashyap Raiyani

unread,
Mar 24, 2015, 2:07:48 AM3/24/15
to opensta...@googlegroups.com
Hi,

Yes !! In my experiment it(Neat) asked for VM migration (using NOVA API) but my openstack did not respond to it and migration did not happened. So, as we discussed that time also that it is not fault of openstack neat. After that I have not tried to repeat same experiment. 

PS: I am planning to pursue my PhD on openstack Neat if you permit so !!

Regards,
Kashyap

王玺源

unread,
Mar 24, 2015, 2:45:04 AM3/24/15
to opensta...@googlegroups.com
the global manager,data collector and the DB-cleaner are working now.But I met problem in the local manager,similar to global manager.Maybe there is something wrong in neat.local.manager.py about libvirt api ('int' and 'long').the logs are below:
$Starting openstack-neat-local-manager: Traceback (most recent call last):
  File "/usr/local/bin/neat-local-manager", line 9, in <module>
    load_entry_point('openstack-neat==0.1', 'console_scripts', 'neat-local-manager')()
  File "<string>", line 2, in start
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/locals/manager.py", line 141, in start
    int(interval))
  File "<string>", line 2, in start
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/common.py", line 62, in start
    state = execute(config, state)
  File "<string>", line 2, in execute
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/locals/manager.py", line 215, in execute
    vm_ram = get_ram(state['vir_connection'], vm_cpu_mhz.keys())
  File "<string>", line 2, in get_ram
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/locals/manager.py", line 416, in get_ram
    ram = get_max_ram(vir_connection, uuid)
  File "<string>", line 2, in get_max_ram
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 275, in contracts_checker
    raise e
contracts.interface.ContractNotRespected: Breach for return value of get_max_ram().
Could not satisfy any of the 2 clauses in int|None.
 ---- Clause #1:   int
 | Could not satisfy any of the 3 clauses in Int|np_scalar_int|np_scalar,array(int).
 |  ---- Clause #1:   Int
 |  | Expected type 'int', got 'long'.
 |  | checking: Int   for value: Instance of long: 2048L   
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ---- Clause #2:   np_scalar_int
 |  | Could not satisfy any of the 4 clauses in np_int8|np_int16|np_int32|np_int64.
 |  |  ---- Clause #1:   np_int8
 |  |  | Expected type 'int8', got 'long'.
 |  |  | checking: np_int8   for value: Instance of long: 2048L   
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ---- Clause #2:   np_int16
 |  |  | Expected type 'int16', got 'long'.
 |  |  | checking: np_int16   for value: Instance of long: 2048L   
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ---- Clause #3:   np_int32
 |  |  | Expected type 'int32', got 'long'.
 |  |  | checking: np_int32   for value: Instance of long: 2048L   
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ---- Clause #4:   np_int64
 |  |  | Expected type 'int64', got 'long'.
 |  |  | checking: np_int64   for value: Instance of long: 2048L   
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ------- (end clauses) -------
 |  | checking: np_int8|np_int16|np_int32|np_int64      for value: Instance of long: 2048L   
 |  | checking: $(np_int8|np_int16|np_int32|np_int64)   for value: Instance of long: 2048L   
 |  | checking: np_scalar_int                           for value: Instance of long: 2048L   
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ---- Clause #3:   np_scalar,array(int)
 |  | Could not satisfy any of the 2 clauses in np_zeroshape_array|np_scalar_type.
 |  |  ---- Clause #1:   np_zeroshape_array
 |  |  | Not an array: <type 'long'> long 
 |  |  | checking: callable()           for value: Instance of long: 2048L   
 |  |  | checking: np_zeroshape_array   for value: Instance of long: 2048L   
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ---- Clause #2:   np_scalar_type
 |  |  | Could not satisfy any of the 3 clauses in np_scalar_int|np_scalar_uint|np_scalar_float.
 |  |  |  ---- Clause #1:   np_scalar_int
 |  |  |  | Could not satisfy any of the 4 clauses in np_int8|np_int16|np_int32|np_int64.
 |  |  |  |  ---- Clause #1:   np_int8
 |  |  |  |  | Expected type 'int8', got 'long'.
 |  |  |  |  | checking: np_int8   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ---- Clause #2:   np_int16
 |  |  |  |  | Expected type 'int16', got 'long'.
 |  |  |  |  | checking: np_int16   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ---- Clause #3:   np_int32
 |  |  |  |  | Expected type 'int32', got 'long'.
 |  |  |  |  | checking: np_int32   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ---- Clause #4:   np_int64
 |  |  |  |  | Expected type 'int64', got 'long'.
 |  |  |  |  | checking: np_int64   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ------- (end clauses) -------
 |  |  |  | checking: np_int8|np_int16|np_int32|np_int64      for value: Instance of long: 2048L   
 |  |  |  | checking: $(np_int8|np_int16|np_int32|np_int64)   for value: Instance of long: 2048L   
 |  |  |  | checking: np_scalar_int                           for value: Instance of long: 2048L   
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #2:   np_scalar_uint
 |  |  |  | Could not satisfy any of the 4 clauses in np_uint8|np_uint16|np_uint32|np_uint64.
 |  |  |  |  ---- Clause #1:   np_uint8
 |  |  |  |  | Expected type 'uint8', got 'long'.
 |  |  |  |  | checking: np_uint8   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ---- Clause #2:   np_uint16
 |  |  |  |  | Expected type 'uint16', got 'long'.
 |  |  |  |  | checking: np_uint16   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ---- Clause #3:   np_uint32
 |  |  |  |  | Expected type 'uint32', got 'long'.
 |  |  |  |  | checking: np_uint32   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ---- Clause #4:   np_uint64
 |  |  |  |  | Expected type 'uint64', got 'long'.
 |  |  |  |  | checking: np_uint64   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ------- (end clauses) -------
 |  |  |  | checking: np_uint8|np_uint16|np_uint32|np_uint64      for value: Instance of long: 2048L   
 |  |  |  | checking: $(np_uint8|np_uint16|np_uint32|np_uint64)   for value: Instance of long: 2048L   
 |  |  |  | checking: np_scalar_uint                              for value: Instance of long: 2048L   
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ---- Clause #3:   np_scalar_float
 |  |  |  | Could not satisfy any of the 2 clauses in np_float32|np_float64.
 |  |  |  |  ---- Clause #1:   np_float32
 |  |  |  |  | Expected type 'float32', got 'long'.
 |  |  |  |  | checking: np_float32   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ---- Clause #2:   np_float64
 |  |  |  |  | Expected type 'float64', got 'long'.
 |  |  |  |  | checking: np_float64   for value: Instance of long: 2048L   
 |  |  |  |  | Variables bound in inner context:
 |  |  |  |  | - args: Instance of tuple: ()
 |  |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  |  ------- (end clauses) -------
 |  |  |  | checking: np_float32|np_float64      for value: Instance of long: 2048L   
 |  |  |  | checking: $(np_float32|np_float64)   for value: Instance of long: 2048L   
 |  |  |  | checking: np_scalar_float            for value: Instance of long: 2048L   
 |  |  |  | Variables bound in inner context:
 |  |  |  | - args: Instance of tuple: ()
 |  |  |  | - kwargs: Instance of dict: {}
 |  |  |  ------- (end clauses) -------
 |  |  | checking: np_scalar_int|np_scalar_uint|np_scalar_float      for value: Instance of long: 2048L   
 |  |  | checking: $(np_scalar_int|np_scalar_uint|np_scalar_float)   for value: Instance of long: 2048L   
 |  |  | checking: np_scalar_type                                    for value: Instance of long: 2048L   
 |  |  | Variables bound in inner context:
 |  |  | - args: Instance of tuple: ()
 |  |  | - kwargs: Instance of dict: {}
 |  |  ------- (end clauses) -------
 |  | checking: np_zeroshape_array|np_scalar_type      for value: Instance of long: 2048L   
 |  | checking: $(np_zeroshape_array|np_scalar_type)   for value: Instance of long: 2048L   
 |  | checking: np_scalar                              for value: Instance of long: 2048L   
 |  | checking: np_scalar,array(int)                   for value: Instance of long: 2048L   
 |  | Variables bound in inner context:
 |  | - args: Instance of tuple: ()
 |  | - kwargs: Instance of dict: {}
 |  ------- (end clauses) -------
 | checking: Int|np_scalar_int|np_scalar,array(int)      for value: Instance of long: 2048L   
 | checking: $(Int|np_scalar_int|np_scalar,array(int))   for value: Instance of long: 2048L   
 | checking: int                                         for value: Instance of long: 2048L   
 | Variables bound in inner context:
 | - args: Instance of tuple: ()
 | - kwargs: Instance of dict: {}
 ---- Clause #2:   None
 | Value does not pass criteria of is_None()() (module: contracts.library.miscellaneous_aliases).
 | checking: callable()   for value: Instance of long: 2048L   
 | checking: None         for value: Instance of long: 2048L   
 | Variables bound in inner context:
 | - args: Instance of tuple: ()
 | - kwargs: Instance of dict: {}
 ------- (end clauses) -------
checking: int|None   for value: Instance of long: 2048L   
Variables bound in inner context:
- args: Instance of tuple: ()
- kwargs: Instance of dict: {}
在 2015年3月24日星期二 UTC+8下午2:07:48,Kashyap Raiyani写道:

王玺源

unread,
Mar 24, 2015, 2:52:02 AM3/24/15
to opensta...@googlegroups.com
i have changed the start shell script in Ubuntu 14.04 :
1.  . /etc/rc.d/init.d/functions      change into         . /lib/lsb/init-functions
2. exec="/usr/bin/neat-$suffix"    change into          exec="/usr/local/bin/neat-$suffix"
3.in ubuntu,use ''start_daemon'' to start a daemon.the function can be found in . /lib/lsb/init-functions.
4.there is no path like "/etc/sysconfig" in ubuntu,so I comment out this line:                    [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

then Neat can works on ubuntu.
4.
在 2015年3月24日星期二 UTC+8下午2:01:32,Anton Beloglazov写道:

xiyuanW

unread,
Mar 24, 2015, 3:07:08 AM3/24/15
to opensta...@googlegroups.com
Hi Anton
there is a small different in neat.global.manager lines 860.
In ubuntu ,use "etherwake" to work Wake on LAN function .I don't know whether it's a difference between ubuntu and centOS.''ether-wake'' can't be recognized in my ubuntu.  So , I changed "ether-wake" into "etherwake" without '-' symbol.

在 2015年3月24日星期二 UTC+8下午2:01:32,Anton Beloglazov写道:
I see, thanks! You mentioned that you've managed to run Neat successfully, did it perform in your environment as expected? Are you still using it?

Cheers,
Anton

Anton Beloglazov

unread,
Mar 24, 2015, 9:00:44 PM3/24/15
to opensta...@googlegroups.com
Hi Kashyap,

I'll be happy to help if you have any questions/problems with Neat, good luck with your PhD!

Best regards,
Anton

--

Anton Beloglazov

unread,
Mar 24, 2015, 9:03:07 PM3/24/15
to opensta...@googlegroups.com
I've made more changes to the local manager, which should resolve this issue. Could you please try the latest version to see it it's resolved?

Thanks,
Anton 

--

Anton Beloglazov

unread,
Mar 24, 2015, 9:03:49 PM3/24/15
to opensta...@googlegroups.com
Thanks for this! That should be useful for people who use Ubuntu.

Cheers,
Anton

xiyuanW

unread,
Mar 24, 2015, 9:55:33 PM3/24/15
to opensta...@googlegroups.com
Hi,Anton
It is working now,I'll test the NEAT in ubuntu later.I'll contact with you if there is some error or bug that i can't solve .Thank you very much.
Now when I restart the global service .it is  said :
 Traceback (most recent call last):
  File "/usr/local/bin/neat-global-manager", line 9, in <module>
    load_entry_point('openstack-neat==0.1', 'console_scripts', 'neat-global-manager')()
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2311, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2017, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py", line 80, in <module>
    import neat.common as common
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/common.py", line 255, in <module>
    @contract
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/__init__.py", line 24, in contract
    return contract_decorator(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py", line 138, in contract_decorator
    raise ContractSyntaxError(es.error, es.where)
contracts.interface.ContractSyntaxError: Unknown identifier 'long'. Did you mean 'np_float16'? (at char 10), (line:1, col:11)

 line  1 >dict(str: long)
                    ^
                    |
                    here or nearby
so,i return 'long' to 'int' in common.py lines 260 ,and the global manager is ok.But when i restart the local manger service again.it is said :
$Starting openstack-neat-local-manager: libvirt: QEMU Driver error : Domain not found: no domain with matching uuid '7279a2f8-323c-4f6f-b9df-14eb4d49b7b9'
libvirt: QEMU Driver error : Domain not found: no domain with matching uuid '48ab930d-6036-48e2-b63c-11c8653d4cfb'
libvirt: QEMU Driver error : Domain not found: no domain with matching uuid 'b477c47b-4963-47db-b87f-3e3734a60ab0'
libvirt: QEMU Driver error : Domain not found: no domain with matching uuid '2c0d2754-6fcd-4dca-8b71-83c3b9481da2'
libvirt: QEMU Driver error : Domain not found: no domain with matching uuid 'fc1775d7-5bfe-4451-8ee3-9c2d63f6a5e0'

So, use 'long' ,the global wrong . use 'int' ,the local wrong.(p.s.  i have modified both codes in controller host and compute node at the same time.) 
在 2015年3月25日星期三 UTC+8上午9:03:07,Anton Beloglazov写道:

xiyuanW

unread,
Mar 25, 2015, 4:39:12 AM3/25/15
to opensta...@googlegroups.com
Hi Anton
I'm now working on dynamic resource scheduling with openstack. I find that Neat is a great modules.Can I update my code to Neat in github if you permit so? Maybe you are busy now with your work.so i think i can try my best to help you with Neat.I'm new here in openstack.Need your help greatly.
P.S. Please forgive me for my poor english.ability.
 
Regards,
XiyuanW

在 2015年3月25日星期三 UTC+8上午9:03:49,Anton Beloglazov写道:
Message has been deleted

Wildanil Ghozi

unread,
Mar 25, 2015, 9:55:07 AM3/25/15
to opensta...@googlegroups.com

Hi Anton, I've tried the new OpenStack code in github.
I just change a little bit of code so that runs on Ubuntu.

This is a report that appeared after I execute ./all-start.sh


Traceback (most recent call last):
  File "./compute-data-collector-start.py", line 18, in <module>
    import neat.common as common
  File "/home/controller/neat-ubuntu/neat/common.py", line 19, in <module>
    from neat.contracts_extra import *
  File "/home/controller/neat-ubuntu/neat/contracts_extra.py", line 21, in <module>
    import neat.db
  File "/home/controller/neat-ubuntu/neat/db.py", line 26, in <module>
    class Database(object):
  File "/home/controller/neat-ubuntu/neat/db.py", line 142, in Database
    @contract
  File "/usr/local/lib/python2.7/dist-packages/contracts/__init__.py", line 24, in contract
    return contract_decorator(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 138, in contract_decorator
    raise ContractSyntaxError(es.error, es.where)

contracts.interface.ContractSyntaxError: Unknown identifier 'long'. Did you mean 'Container'? (at char 0), (line:1, col:1)

 line  1 >long,>0
          ^
          |
          here or nearby
$Starting openstack-neat-global-manager:
$Starting openstack-neat-db-cleaner:
Traceback (most recent call last):
  File "./compute-local-manager-start.py", line 18, in <module>
    import neat.common as common
  File "/home/controller/neat-ubuntu/neat/common.py", line 19, in <module>
    from neat.contracts_extra import *
  File "/home/controller/neat-ubuntu/neat/contracts_extra.py", line 21, in <module>
    import neat.db
  File "/home/controller/neat-ubuntu/neat/db.py", line 26, in <module>
    class Database(object):
  File "/home/controller/neat-ubuntu/neat/db.py", line 142, in Database
    @contract
  File "/usr/local/lib/python2.7/dist-packages/contracts/__init__.py", line 24, in contract
    return contract_decorator(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 138, in contract_decorator
    raise ContractSyntaxError(es.error, es.where)

contracts.interface.ContractSyntaxError: Unknown identifier 'long'. Did you mean 'Container'? (at char 0), (line:1, col:1)

 line  1 >long,>0
          ^
          |
          here or nearby


I got nothing at log. And openstack-neat not running yet. Please helpme to resolve this problem,,

Sorry for bad english ^.^

Regards,
Wildanil

Anton Beloglazov

unread,
Mar 25, 2015, 9:05:26 PM3/25/15
to opensta...@googlegroups.com
Hi All,

I've made some more changes to resolve all those long-related issues and added more tests for that as well in https://github.com/beloglazov/openstack-neat/commit/fa687ec0e0cbed03cc3367afea5244efbd7ed29c

I've also added some logic to select the proper name of the etherwake program based on the OS in https://github.com/beloglazov/openstack-neat/commit/620425f10d5ce8ed46b5e3a3b8b9bdcf67811c75

Please let me know if the latest master solves your problems.

XiyuanW, I'm happy to accept contributions! 

You can propose changes by forking https://github.com/beloglazov/openstack-neat and submitting pull requests with explanations of the changes. Please make sure that your modifications are covered by unit tests and all the tests pass before submitting a PR.

Thanks,
Anton

Wildanil Ghozi

unread,
Mar 26, 2015, 2:51:25 AM3/26/15
to opensta...@googlegroups.com

Hi Anton,
Thank you for helping us to use OpenStack neat. I tried using the last update of your github. As usual I give a little change at init.d / OpenStack-neat- * so that runs on ubuntu. OpenStack-neat now can running here. When I look at a global-manager.log I look like at following screen capture. is this normal? or there was an error here?

Cheers,
Wildanil

Wildanil Ghozi

unread,
Mar 26, 2015, 3:09:06 AM3/26/15
to opensta...@googlegroups.com

Hai Anton, this is screen capture from local manager at compute1 and compute2

Anton Beloglazov

unread,
Mar 26, 2015, 8:27:13 PM3/26/15
to opensta...@googlegroups.com
Hi Wildanil,

This looks like a bug. I've made some modifications to fix this (https://github.com/beloglazov/openstack-neat/commit/6f2524f0895575280d1aae811f67446f69b739a5), please try the latest master and let me know how it goes.

Cheers,
Anton

Wildanil Ghozi

unread,
Mar 27, 2015, 3:15:08 AM3/27/15
to opensta...@googlegroups.com

Hai anton,,

Thanks to help me. I tried your last code from github. But I still get error at global manager log. this is screen capture from global manager.

Cheers,
Wildanil

xiyuanW

unread,
Mar 27, 2015, 4:22:16 AM3/27/15
to opensta...@googlegroups.com
Hi,Wildanil

the reason is that the novaclient's version is too old.The v.1.1 is abandoned,and the novaclient tansforms version 1.1 into 2 auto.So in global.manager.py ,take steps as:
1.lines 77: from novaclient.v1_1 import client              change into                  from novaclient import client 
2.lines 273:
            'nova': client.Client(config['os_admin_user'],
                                  config['os_admin_password'],
                                  config['os_admin_tenant_name'],
                                  config['os_auth_url'],
                                  service_type="compute"),
change into:
            'nova': client.Client(2,
                                  config['os_admin_user'],
                                  config['os_admin_password'],
                                  config['os_admin_tenant_name'],
                                  config['os_auth_url'],
                                  service_type="compute"),
then it works.It's pity that I can't login github for some reason.Maybe Anton will update a better one tomorrow.

Regards,
XiyuanW
在 2015年3月27日星期五 UTC+8下午3:15:08,Wildanil Ghozi写道:

Wildanil Ghozi

unread,
Mar 30, 2015, 2:52:18 AM3/30/15
to opensta...@googlegroups.com
Hai XiyuanW
I tried to edit manager.py like your suggestion. But I get the error logs more than ever before. Maybe there are other parts that must be edited to conform with novaclient version 2.

xiyuanW

unread,
Mar 30, 2015, 8:47:40 AM3/30/15
to opensta...@googlegroups.com
Hi Wildanil
    Can you show your error information with log? Today ,I have change the code again,in global.manager.py lines 820
nova.servers.live_migrate(vm, host, Fasle, False)       if your VM booted with image,you should change the third parameter into True.
    My Neat now seems works well.I'll try to consummate it.And i'll try my best to help you if i can.
    Of cause, The best way to solve our problem is that Anton could help us.         :)

Regards,
XiyuanW


在 2015年3月30日星期一 UTC+8下午2:52:18,Wildanil Ghozi写道:

Anton Beloglazov

unread,
Mar 31, 2015, 12:31:29 AM3/31/15
to opensta...@googlegroups.com
Hi Wildanil,

I'm not sure why you get this KeyError, but I've made some changes to hopefully eliminate that in https://github.com/beloglazov/openstack-neat/commit/8fd1b1e684bf5e3eb913d6372a045ab7757bcc01

Please let me know if that helps.

Cheers,
Anton

Anton Beloglazov

unread,
Mar 31, 2015, 12:44:25 AM3/31/15
to opensta...@googlegroups.com
Looking at the source of the Nova client (https://git.openstack.org/cgit/openstack/python-novaclient/tree/novaclient/v1_1/__init__.py), it seems that v1.1 just redirects to v2. So I've updated the imports to use v2 directly.

Cheers,
Anton

Anton Beloglazov

unread,
Mar 31, 2015, 1:31:26 AM3/31/15
to opensta...@googlegroups.com
Hi Xiyuan,

I've added an option to neat.conf called block_migration that allows you to configure whether you want  to use block migration or regular live migration. You can now use that instead of modifying global/manager.py

Cheers,
Anton

Wildanil Ghozi

unread,
Apr 7, 2015, 12:46:11 AM4/7/15
to opensta...@googlegroups.com
Hi Anton, sorry for the long time not come in. I tried to use your last code at github with little change at init.d/openstack-* and neat/global/manager.py to make it can run on ubuntu and use novaclient v2. now no more error was appear at log. now there are four instances running on both compute. they should be migrated so that only one active compute? But log show me no instance migrated.

global manager :
2015-04-07 11:11:48,075 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:11:48,075 DEBUG    neat.globals.manager Host total CPU usage: {}
2015-04-07 11:11:48,210 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:11:48,245 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/flavors/detail HTTP/1.1" 200 2069
2015-04-07 11:11:48,434 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/ef313ede-6860-4342-a919-8774b0876a8a HTTP/1.1" 200 1574
2015-04-07 11:11:48,436 INFO     neat.globals.manager Started underload VM placement
2015-04-07 11:11:48,437 INFO     neat.globals.manager Completed underload VM placement
2015-04-07 11:11:48,437 INFO     neat.globals.manager Underload: obtained a new placement {}
2015-04-07 11:11:48,444 INFO     neat.globals.manager Nothing to migrate
2015-04-07 11:11:48,445 INFO     neat.globals.manager Completed processing an underload request
2015-04-07 11:16:48,955 DEBUG    neat.globals.manager Request parameters validated
2015-04-07 11:16:48,956 INFO     neat.globals.manager Received a request from 10.0.0.31: {'username': 'd033e22ae348aeb5660fc2140aec35850c4da997', 'host': 'compute1', 'password': 'b47208670e6be587a615a70d33dddbed6ca0cbf0', 'reason': 0, 'time': 1428380208.95}
2015-04-07 11:16:48,956 INFO     neat.globals.manager Processing an underload of a host compute1
2015-04-07 11:16:48,957 INFO     neat.globals.manager Started processing an underload request
2015-04-07 11:16:49,436 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:16:49,450 DEBUG    neat.globals.manager hosts_to_vms: {'compute1': ['ef313ede-6860-4342-a919-8774b0876a8a'], 'compute2': []}
2015-04-07 11:16:49,546 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/os-hosts/compute1 HTTP/1.1" 200 576
2015-04-07 11:16:49,549 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:16:49,549 DEBUG    neat.globals.manager Host total CPU usage: {'compute1': 0}
2015-04-07 11:16:49,549 DEBUG    neat.globals.manager Excluded the underloaded host compute1
2015-04-07 11:16:49,550 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:16:49,550 DEBUG    neat.globals.manager Host total CPU usage: {}
2015-04-07 11:16:49,726 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:16:49,762 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/flavors/detail HTTP/1.1" 200 2069
2015-04-07 11:16:49,923 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/ef313ede-6860-4342-a919-8774b0876a8a HTTP/1.1" 200 1574
2015-04-07 11:16:49,925 INFO     neat.globals.manager Started underload VM placement
2015-04-07 11:16:49,926 INFO     neat.globals.manager Completed underload VM placement
2015-04-07 11:16:49,927 INFO     neat.globals.manager Underload: obtained a new placement {}
2015-04-07 11:16:49,932 INFO     neat.globals.manager Nothing to migrate
2015-04-07 11:16:49,932 INFO     neat.globals.manager Completed processing an underload request
2015-04-07 11:17:43,102 DEBUG    neat.globals.manager Request parameters validated
2015-04-07 11:17:43,102 INFO     neat.globals.manager Received a request from 10.0.0.32: {'username': 'd033e22ae348aeb5660fc2140aec35850c4da997', 'host': 'compute2', 'password': 'b47208670e6be587a615a70d33dddbed6ca0cbf0', 'reason': 0, 'time': 1428380263.09}
2015-04-07 11:17:43,103 INFO     neat.globals.manager Processing an underload of a host compute2
2015-04-07 11:17:43,103 INFO     neat.globals.manager Started processing an underload request
2015-04-07 11:17:43,284 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:17:43,300 DEBUG    neat.globals.manager hosts_to_vms: {'compute1': ['ef313ede-6860-4342-a919-8774b0876a8a'], 'compute2': []}
2015-04-07 11:17:43,396 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/os-hosts/compute1 HTTP/1.1" 200 576
2015-04-07 11:17:43,398 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:17:43,399 DEBUG    neat.globals.manager Host total CPU usage: {'compute1': 0}
2015-04-07 11:17:43,399 DEBUG    neat.globals.manager Excluded the underloaded host compute2
2015-04-07 11:17:43,399 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:17:43,399 DEBUG    neat.globals.manager Host total CPU usage: {'compute1': 0}
2015-04-07 11:17:43,603 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:17:43,633 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/flavors/detail HTTP/1.1" 200 2069
2015-04-07 11:17:43,651 INFO     neat.globals.manager Started underload VM placement
2015-04-07 11:17:43,668 INFO     neat.globals.manager Completed underload VM placement
2015-04-07 11:17:43,668 INFO     neat.globals.manager Underload: obtained a new placement {}
2015-04-07 11:17:43,674 INFO     neat.globals.manager Nothing to migrate
2015-04-07 11:17:43,675 INFO     neat.globals.manager Completed processing an underload request
2015-04-07 11:21:50,772 DEBUG    neat.globals.manager Request parameters validated
2015-04-07 11:21:50,772 INFO     neat.globals.manager Received a request from 10.0.0.31: {'username': 'd033e22ae348aeb5660fc2140aec35850c4da997', 'host': 'compute1', 'password': 'b47208670e6be587a615a70d33dddbed6ca0cbf0', 'reason': 0, 'time': 1428380510.77}
2015-04-07 11:21:50,773 INFO     neat.globals.manager Processing an underload of a host compute1
2015-04-07 11:21:50,773 INFO     neat.globals.manager Started processing an underload request
2015-04-07 11:21:51,188 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:21:51,203 DEBUG    neat.globals.manager hosts_to_vms: {'compute1': ['ef313ede-6860-4342-a919-8774b0876a8a'], 'compute2': []}
2015-04-07 11:21:51,307 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/os-hosts/compute1 HTTP/1.1" 200 576
2015-04-07 11:21:51,310 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:21:51,310 DEBUG    neat.globals.manager Host total CPU usage: {'compute1': 0}
2015-04-07 11:21:51,310 DEBUG    neat.globals.manager Excluded the underloaded host compute1
2015-04-07 11:21:51,310 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:21:51,311 DEBUG    neat.globals.manager Host total CPU usage: {}
2015-04-07 11:21:51,485 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:21:51,521 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/flavors/detail HTTP/1.1" 200 2069
2015-04-07 11:21:51,718 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/ef313ede-6860-4342-a919-8774b0876a8a HTTP/1.1" 200 1574
2015-04-07 11:21:51,721 INFO     neat.globals.manager Started underload VM placement
2015-04-07 11:21:51,722 INFO     neat.globals.manager Completed underload VM placement
2015-04-07 11:21:51,722 INFO     neat.globals.manager Underload: obtained a new placement {}
2015-04-07 11:21:51,731 INFO     neat.globals.manager Nothing to migrate
2015-04-07 11:21:51,731 INFO     neat.globals.manager Completed processing an underload request
2015-04-07 11:22:43,855 DEBUG    neat.globals.manager Request parameters validated
2015-04-07 11:22:43,856 INFO     neat.globals.manager Received a request from 10.0.0.32: {'username': 'd033e22ae348aeb5660fc2140aec35850c4da997', 'host': 'compute2', 'password': 'b47208670e6be587a615a70d33dddbed6ca0cbf0', 'reason': 0, 'time': 1428380563.85}
2015-04-07 11:22:43,856 INFO     neat.globals.manager Processing an underload of a host compute2
2015-04-07 11:22:43,857 INFO     neat.globals.manager Started processing an underload request
2015-04-07 11:22:44,039 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:22:44,053 DEBUG    neat.globals.manager hosts_to_vms: {'compute1': ['ef313ede-6860-4342-a919-8774b0876a8a'], 'compute2': []}
2015-04-07 11:22:44,143 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/os-hosts/compute1 HTTP/1.1" 200 576
2015-04-07 11:22:44,145 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:22:44,146 DEBUG    neat.globals.manager Host total CPU usage: {'compute1': 0}
2015-04-07 11:22:44,146 DEBUG    neat.globals.manager Excluded the underloaded host compute2
2015-04-07 11:22:44,146 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 0, 'compute2': 0}
2015-04-07 11:22:44,147 DEBUG    neat.globals.manager Host total CPU usage: {'compute1': 0}
2015-04-07 11:22:44,328 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 1577
2015-04-07 11:22:44,361 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/flavors/detail HTTP/1.1" 200 2069
2015-04-07 11:22:44,364 INFO     neat.globals.manager Started underload VM placement
2015-04-07 11:22:44,380 INFO     neat.globals.manager Completed underload VM placement
2015-04-07 11:22:44,380 INFO     neat.globals.manager Underload: obtained a new placement {}
2015-04-07 11:22:44,386 INFO     neat.globals.manager Nothing to migrate
2015-04-07 11:22:44,387 INFO     neat.globals.manager Completed processing an underload request


local manager compute 1 same with compute2 :
2015-04-07 11:27:44,628 DEBUG    neat.locals.overload.mhod.core MHOD time_in_state_n:0
2015-04-07 11:27:44,628 DEBUG    neat.locals.overload.mhod.core MHOD p:[[0.1, 0.0], [0.0, 0.0]]
2015-04-07 11:27:44,628 DEBUG    neat.locals.overload.mhod.core MHOD current_state:0
2015-04-07 11:27:44,628 DEBUG    neat.locals.overload.mhod.core MHOD p[current_state]:[0.1, 0.0]
2015-04-07 11:27:44,628 INFO     neat.locals.manager Completed overload detection
2015-04-07 11:27:44,628 INFO     neat.locals.manager Underload detected
2015-04-07 11:27:44,629 INFO     requests.packages.urllib3.connectionpool Starting new HTTP connection (1): controller
2015-04-07 11:27:45,167 DEBUG    requests.packages.urllib3.connectionpool "PUT / HTTP/1.1" 200 0
2015-04-07 11:27:45,168 INFO     neat.locals.manager Received response: [200]
2015-04-07 11:27:45,168 INFO     neat.locals.manager Completed an iteration

Anton Beloglazov

unread,
Apr 12, 2015, 12:53:25 AM4/12/15
to opensta...@googlegroups.com
Could you please show your data collector logs? The "neat.globals.manager hosts_to_vms: ..." lines show that there only 1 VM on compute1 and no VMs on compute2. That could be because the data collector is not reporting the data correctly or it can't reach the database.

Cheers,
Anton

--

xiyuanW

unread,
Apr 12, 2015, 11:55:03 PM4/12/15
to opensta...@googlegroups.com
HI Wildanil
   I did not do important change with NEAT.As Anton said,it seems that your data collector works not well.Please ensure your VM's state is 'active'.And check whether the db has collected the VM's imformation.

在 2015年4月7日星期二 UTC+8下午12:46:11,Wildanil Ghozi写道:

Wildanil Ghozi

unread,
Apr 13, 2015, 2:30:28 AM4/13/15
to opensta...@googlegroups.com
Hi Anton and xiyuanW.
Thank you for responding to my question. I try to find a log on that date. and this is the log on both compute.

Compute1 :
2015-04-07 11:26:29,313 INFO     neat.locals.collector Started an iteration
2015-04-07 11:26:29,321 INFO     neat.locals.collector Started VM data collection
2015-04-07 11:26:29,326 DEBUG    neat.locals.collector VM ef313ede-6860-4342-a919-8774b0876a8a: previous CPU time 4285336079441, current CPU time 4304315941444, previous time 1428380489.1711840630, current time 1428380789.3216938972
2015-04-07 11:26:29,326 DEBUG    neat.locals.collector VM ef313ede-6860-4342-a919-8774b0876a8a: CPU MHz 100
2015-04-07 11:26:29,330 DEBUG    neat.locals.collector VM 8a46bc13-7bd1-465b-8d05-3cd916c11d39: previous CPU time 4180317011330, current CPU time 4200488868541, previous time 1428380489.1711840630, current time 1428380789.3216938972
2015-04-07 11:26:29,330 DEBUG    neat.locals.collector VM 8a46bc13-7bd1-465b-8d05-3cd916c11d39: CPU MHz 107
2015-04-07 11:26:29,333 DEBUG    neat.locals.collector VM 8cc421c9-d75d-4fb9-8e2b-06f5faeb8912: previous CPU time 109798891716, current CPU time 129793414180, previous time 1428380489.1711840630, current time 1428380789.3216938972
2015-04-07 11:26:29,334 DEBUG    neat.locals.collector VM 8cc421c9-d75d-4fb9-8e2b-06f5faeb8912: CPU MHz 106
2015-04-07 11:26:29,334 INFO     neat.locals.collector Completed VM data collection
2015-04-07 11:26:29,334 INFO     neat.locals.collector Started host data collection
2015-04-07 11:26:29,334 INFO     neat.locals.collector Completed host data collection
2015-04-07 11:26:29,340 INFO     neat.db Created a new DB record for a VM ef313ede-6860-4342-a919-8774b0876a8a, id=72
2015-04-07 11:26:29,344 INFO     neat.db Created a new DB record for a VM 8a46bc13-7bd1-465b-8d05-3cd916c11d39, id=73
2015-04-07 11:26:29,349 INFO     neat.db Created a new DB record for a VM 8cc421c9-d75d-4fb9-8e2b-06f5faeb8912, id=74
2015-04-07 11:26:29,359 DEBUG    neat.locals.collector Collected VM CPU MHz: {'ef313ede-6860-4342-a919-8774b0876a8a': 100, '8a46bc13-7bd1-465b-8d05-3cd916c11d39': 107, '8cc421c9-d75d-4fb9-8e2b-06f5faeb8912': 106}
2015-04-07 11:26:29,359 DEBUG    neat.locals.collector Collected total VMs CPU MHz: 313
2015-04-07 11:26:29,359 DEBUG    neat.locals.collector Collected hypervisor CPU MHz: 14
2015-04-07 11:26:29,359 DEBUG    neat.locals.collector Collected host CPU MHz: 327
2015-04-07 11:26:29,359 DEBUG    neat.locals.collector Collected total CPU MHz: 327
2015-04-07 11:26:29,360 INFO     neat.locals.collector Completed an iteration
2015-04-07 11:31:29,458 INFO     neat.locals.collector Started an iteration
2015-04-07 11:31:29,467 INFO     neat.locals.collector Started VM data collection
2015-04-07 11:31:29,472 DEBUG    neat.locals.collector VM ef313ede-6860-4342-a919-8774b0876a8a: previous CPU time 4304315941444, current CPU time 4323182877552, previous time 1428380789.3216938972, current time 1428381089.4674520493
2015-04-07 11:31:29,472 DEBUG    neat.locals.collector VM ef313ede-6860-4342-a919-8774b0876a8a: CPU MHz 100
2015-04-07 11:31:29,477 DEBUG    neat.locals.collector VM 8a46bc13-7bd1-465b-8d05-3cd916c11d39: previous CPU time 4200488868541, current CPU time 4220087337687, previous time 1428380789.3216938972, current time 1428381089.4674520493
2015-04-07 11:31:29,477 DEBUG    neat.locals.collector VM 8a46bc13-7bd1-465b-8d05-3cd916c11d39: CPU MHz 104
2015-04-07 11:31:29,481 DEBUG    neat.locals.collector VM 8cc421c9-d75d-4fb9-8e2b-06f5faeb8912: previous CPU time 129793414180, current CPU time 149079721535, previous time 1428380789.3216938972, current time 1428381089.4674520493
2015-04-07 11:31:29,481 DEBUG    neat.locals.collector VM 8cc421c9-d75d-4fb9-8e2b-06f5faeb8912: CPU MHz 102
2015-04-07 11:31:29,482 INFO     neat.locals.collector Completed VM data collection
2015-04-07 11:31:29,482 INFO     neat.locals.collector Started host data collection
2015-04-07 11:31:29,482 INFO     neat.locals.collector Completed host data collection
2015-04-07 11:31:29,488 INFO     neat.db Created a new DB record for a VM ef313ede-6860-4342-a919-8774b0876a8a, id=76
2015-04-07 11:31:29,493 INFO     neat.db Created a new DB record for a VM 8a46bc13-7bd1-465b-8d05-3cd916c11d39, id=77
2015-04-07 11:31:29,498 INFO     neat.db Created a new DB record for a VM 8cc421c9-d75d-4fb9-8e2b-06f5faeb8912, id=78
2015-04-07 11:31:29,508 DEBUG    neat.locals.collector Collected VM CPU MHz: {'ef313ede-6860-4342-a919-8774b0876a8a': 100, '8a46bc13-7bd1-465b-8d05-3cd916c11d39': 104, '8cc421c9-d75d-4fb9-8e2b-06f5faeb8912': 102}
2015-04-07 11:31:29,508 DEBUG    neat.locals.collector Collected total VMs CPU MHz: 306
2015-04-07 11:31:29,508 DEBUG    neat.locals.collector Collected hypervisor CPU MHz: 0
2015-04-07 11:31:29,508 DEBUG    neat.locals.collector Collected host CPU MHz: 299
2015-04-07 11:31:29,508 DEBUG    neat.locals.collector Collected total CPU MHz: 306
2015-04-07 11:31:29,508 INFO     neat.locals.collector Completed an iteration



Compute 2 :
2015-04-07 11:27:32,990 INFO     neat.locals.collector Started an iteration
2015-04-07 11:27:32,995 INFO     neat.locals.collector Started VM data collection
2015-04-07 11:27:33,001 DEBUG    neat.locals.collector VM b5978417-c0b4-42ee-9d72-1d171ca02679: previous CPU time 104555397799, current CPU time 120758983980, previous time 1428380552.8674349785, current time 1428380852.9958150387
2015-04-07 11:27:33,001 DEBUG    neat.locals.collector VM b5978417-c0b4-42ee-9d72-1d171ca02679: CPU MHz 86
2015-04-07 11:27:33,001 INFO     neat.locals.collector Completed VM data collection
2015-04-07 11:27:33,002 INFO     neat.locals.collector Started host data collection
2015-04-07 11:27:33,002 INFO     neat.locals.collector Completed host data collection
2015-04-07 11:27:33,009 INFO     neat.db Created a new DB record for a VM b5978417-c0b4-42ee-9d72-1d171ca02679, id=75
2015-04-07 11:27:33,019 DEBUG    neat.locals.collector Collected VM CPU MHz: {'b5978417-c0b4-42ee-9d72-1d171ca02679': 86}
2015-04-07 11:27:33,019 DEBUG    neat.locals.collector Collected total VMs CPU MHz: 86
2015-04-07 11:27:33,019 DEBUG    neat.locals.collector Collected hypervisor CPU MHz: 70
2015-04-07 11:27:33,019 DEBUG    neat.locals.collector Collected host CPU MHz: 156
2015-04-07 11:27:33,019 DEBUG    neat.locals.collector Collected total CPU MHz: 156
2015-04-07 11:27:33,020 INFO     neat.locals.collector Completed an iteration
2015-04-07 11:32:33,120 INFO     neat.locals.collector Started an iteration
2015-04-07 11:32:33,125 INFO     neat.locals.collector Started VM data collection
2015-04-07 11:32:33,130 DEBUG    neat.locals.collector VM b5978417-c0b4-42ee-9d72-1d171ca02679: previous CPU time 120758983980, current CPU time 137029272555, previous time 1428380852.9958150387, current time 1428381153.1253259182
2015-04-07 11:32:33,130 DEBUG    neat.locals.collector VM b5978417-c0b4-42ee-9d72-1d171ca02679: CPU MHz 86
2015-04-07 11:32:33,131 INFO     neat.locals.collector Completed VM data collection
2015-04-07 11:32:33,131 INFO     neat.locals.collector Started host data collection
2015-04-07 11:32:33,131 INFO     neat.locals.collector Completed host data collection
2015-04-07 11:32:33,138 INFO     neat.db Created a new DB record for a VM b5978417-c0b4-42ee-9d72-1d171ca02679, id=79
2015-04-07 11:32:33,148 DEBUG    neat.locals.collector Collected VM CPU MHz: {'b5978417-c0b4-42ee-9d72-1d171ca02679': 86}
2015-04-07 11:32:33,148 DEBUG    neat.locals.collector Collected total VMs CPU MHz: 86
2015-04-07 11:32:33,148 DEBUG    neat.locals.collector Collected hypervisor CPU MHz: 68
2015-04-07 11:32:33,148 DEBUG    neat.locals.collector Collected host CPU MHz: 154
2015-04-07 11:32:33,148 DEBUG    neat.locals.collector Collected total CPU MHz: 154


Anton Beloglazov

unread,
Apr 13, 2015, 7:59:04 AM4/13/15
to opensta...@googlegroups.com
Thanks for the logs. The fact that it executes "neat.db Created a new DB record for a VM ..." each time for each VM shows that there is something wrong with the database. It's only supposed to create a new record for a VM once and then reuse it. It checks for record existence by the VM UUIDs. The fact that it reinserts the same UUIDs twice shows that the data is not correctly saved in the DB. Could you please show the dump of the vms table for IDs 72-78? 

--

Wildanil Ghozi

unread,
Apr 14, 2015, 2:44:20 AM4/14/15
to opensta...@googlegroups.com
Hi Anton. Thanks still help me.
I select vms table in neat database. I think you're right, its always makes a record each time. ID 72 is same uuid values with ID 76, 73 with 77 and 74 with 78 same also. So what should I do to resolve it?
the bellow is screen capture from ther result.

Cheers,
Wildan

​ 

--
You received this message because you are subscribed to a topic in the Google Groups "OpenStack Neat" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openstack-neat/BDX0UIjQe-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openstack-nea...@googlegroups.com.

xiyuanW

unread,
Apr 15, 2015, 3:24:09 AM4/15/15
to opensta...@googlegroups.com
Hi Wildanil 
    Maybe you shoud check your vm_resource_usage table in Neat Database.Check whether the vm's data has been updated.Your global manager logs show that it can't get the vm's data in mysql.

在 2015年4月14日星期二 UTC+8下午2:44:20,Wildanil Ghozi写道:

Anton Beloglazov

unread,
Apr 15, 2015, 6:56:25 AM4/15/15
to opensta...@googlegroups.com
Hi Wildan,

To be honest, this looks very strange. These duplicate entries mean that the select query that checks for existence of a VM UUID (https://github.com/beloglazov/openstack-neat/blob/master/neat/db.py#L118) fails, I'm not sure why this happens. What version of SQLAlchemy do you have installed? You can check it with: pip freeze | grep SQLAlchemy

I've just run unit-tests with SQLAlchemy 1.0.0b5 and they all pass on my machine with sqlite. Could you try to debug that query? Maybe add some more logging to see why it returns None instead of the existing record?

Cheers,
Anton

Wildanil Ghozi

unread,
Apr 19, 2015, 3:22:48 AM4/19/15
to opensta...@googlegroups.com
Hi Anton,

I've seen my db.py, it's same with yours on github. I've updated SQLAlchemy to version 10.0.05b so it's same with yours. I also delete all neat database tables and reinstall neat. But I still get same condition on record of vms tables.

Wildanil Ghozi

unread,
Apr 19, 2015, 6:33:24 AM4/19/15
to opensta...@googlegroups.com
Hi anton I'll show you error log from new setup openstack neat.
Global manager :
2015-04-19 17:30:13,563 DEBUG    neat.globals.manager Request parameters validated
2015-04-19 17:30:13,563 INFO     neat.globals.manager Received a request from 10.0.0.32: {'username': 'd033e22ae348aeb5660fc2140aec35850c4da997', 'host': 'compute2', 'password': 'b47208670e6be587a615a70d33dddbed6ca0cbf0', 'reason': 0, 'time': 1429439413.56}
2015-04-19 17:30:13,564 INFO     neat.globals.manager Processing an underload of a host compute2
2015-04-19 17:30:13,565 INFO     neat.globals.manager Started processing an underload request
2015-04-19 17:30:13,653 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 15
2015-04-19 17:30:13,668 DEBUG    neat.globals.manager hosts_to_vms: {'compute1': [], 'compute2': []}
2015-04-19 17:30:13,668 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 65, 'compute2': 79}
2015-04-19 17:30:13,669 DEBUG    neat.globals.manager Host total CPU usage: {}
2015-04-19 17:30:13,669 DEBUG    neat.globals.manager Excluded the underloaded host compute2
2015-04-19 17:30:13,669 DEBUG    neat.globals.manager Host CPU usage: {'compute1': 65, 'compute2': 79}
2015-04-19 17:30:13,669 DEBUG    neat.globals.manager Host total CPU usage: {}
2015-04-19 17:30:13,747 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/servers/detail HTTP/1.1" 200 15
2015-04-19 17:30:13,776 DEBUG    requests.packages.urllib3.connectionpool "GET /v2/e5b156119cec4683a4bf973f271daa23/flavors/detail HTTP/1.1" 200 2069
2015-04-19 17:30:13,781 ERROR    neat.globals.manager Exception during request processing:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py", line 240, in service
    params['host'])
  File "<string>", line 2, in execute_underload
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py", line 403, in execute_underload
    vm_placement_params])
  File "<string>", line 2, in call_function_by_name
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/common.py", line 226, in call_function_by_name
    return getattr(m, function)(*args)
  File "<string>", line 2, in best_fit_decreasing_factory
  File "/usr/local/lib/python2.7/dist-packages/contracts/main.py", line 264, in contracts_checker
    raise e
ContractNotRespected: Breach for argument 'migration_time' to best_fit_decreasing_factory().
I cannot compare NaN (checking: nan >= 0)
checking: >=0         for value: Instance of float: nan  
checking: float,>=0   for value: Instance of float: nan  
Variables bound in inner context:
- args: Instance of tuple: ()
- kwargs: Instance of dict: {}

Data collector compute2 :
2015-04-19 17:30:03,189 INFO     neat.locals.collector Started host data collection
2015-04-19 17:30:03,189 INFO     neat.locals.collector Completed host data collection
2015-04-19 17:30:03,196 INFO     neat.db Created a new DB record for a VM 93f2382b-f537-47b6-9e07-52b6dcb4ca93, id=39
2015-04-19 17:30:03,201 INFO     neat.db Created a new DB record for a VM ad57435a-8a46-4623-a046-031eed08b6ce, id=40
2015-04-19 17:30:03,210 DEBUG    neat.locals.collector Collected VM CPU MHz: {'93f2382b-f537-47b6-9e07-52b6dcb4ca93': 0, 'ad57435a-8a46-4623-a046-031eed08b6ce': 0}
2015-04-19 17:30:03,210 DEBUG    neat.locals.collector Collected total VMs CPU MHz: 0
2015-04-19 17:30:03,210 DEBUG    neat.locals.collector Collected hypervisor CPU MHz: 81
2015-04-19 17:30:03,210 DEBUG    neat.locals.collector Collected host CPU MHz: 81
2015-04-19 17:30:03,210 DEBUG    neat.locals.collector Collected total CPU MHz: 81
2015-04-19 17:30:03,211 INFO     neat.locals.collector Completed an iteration

Anton Beloglazov

unread,
Apr 20, 2015, 7:56:56 AM4/20/15
to opensta...@googlegroups.com
I've added a check to address this issue: https://github.com/beloglazov/openstack-neat/commit/caf8c4dc68a729940b1ff0a38ea2c39f61546345

Please try the new version.

Cheers,
Anton

--
Reply all
Reply to author
Forward
0 new messages