some problem about Neat,wish someone could help me,Anton,please come in

92 views
Skip to first unread message

xiyuanW

unread,
Mar 30, 2015, 11:41:09 PM3/30/15
to opensta...@googlegroups.com
Hi All
    My Neat now runs ok probably,and i have tried underlodad migrate successful.But when the Neat runs continuely,some problem comes.
    First,in local-manager:the log said:
  File "/usr/local/bin/neat-data-collector", line 9, in <module>
    load_entry_point('openstack-neat==0.1', 'console_scripts', 'neat-data-collector')()
  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/collector.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 63, in start
    state = execute(config, state)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/locals/collector.py", line 272, in execute
    added_vm_data)
  File "<string>", line 2, in get_cpu_mhz
  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/collector.py", line 616, in get_cpu_mhz
    current_cpu_time)
  File "<string>", line 2, in calculate_cpu_mhz
  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 calculate_cpu_mhz().
Condition -143 >= 0 not respected
checking: >=0       for value: Instance of int: -143   
checking: int,>=0   for value: Instance of int: -143   
Variables bound in inner context:
- args: Instance of tuple: ()
- kwargs: Instance of dict: {}


   Second,in global-manager:
2015-03-31 11:31:12,320 INFO     neat.globals.manager Started underload VM placement
2015-03-31 11:31:12,322 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 239, in service
    params['host'])
  File "<string>", line 2, in execute_underload
  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 418, in execute_underload
    vm_placement_state)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/vm_placement/bin_packing.py", line 59, in <lambda>
    vms_ram),
  File "<string>", line 2, in best_fit_decreasing
  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/vm_placement/bin_packing.py", line 116, in best_fit_decreasing
    vms_tmp.append((sum(last_n_cpu) / len(last_n_cpu),
ZeroDivisionError: integer division or modulo by zero

Anton ,Could you help me to solve them?Or you could tell me how does it happend? 
BTW,now I want to go on the Neat.I want to reserch DRS based on Neat and submit to openstack when it is mature if you permit.


Best wishes.
XiyuanW

Anton Beloglazov

unread,
Mar 31, 2015, 1:45:49 AM3/31/15
to opensta...@googlegroups.com
Hi XiyuanW,

I've added more debug logging, could you please try the latest master and provide more log output preceding the errors?

Thanks,
Anton

xiyuanW

unread,
Mar 31, 2015, 7:18:50 AM3/31/15
to opensta...@googlegroups.com
the log is:
2015-03-31 19:04:01,857 INFO     neat.locals.manager Completed an iteration
2015-03-31 19:09:01,957 INFO     neat.locals.manager Started an iteration
2015-03-31 19:09:01,961 DEBUG    neat.locals.manager The total physical CPU Mhz: 38384
2015-03-31 19:09:01,970 DEBUG    neat.locals.manager VM CPU MHz: {'cda633d7-176d-45b4-b6c6-3b959a6fea32': [171, 170, 170]}
2015-03-31 19:09:01,970 DEBUG    neat.locals.manager Host CPU MHz: [143, 136]
2015-03-31 19:09:01,971 DEBUG    neat.locals.manager CPU utilization: [0.004454981242184243, 0.008154439349729054, 0.007972071696540226]
2015-03-31 19:09:01,971 INFO     neat.locals.manager Started underload detection
2015-03-31 19:09:01,971 INFO     neat.locals.manager Completed underload detection
2015-03-31 19:09:01,971 INFO     neat.locals.manager Started overload detection
2015-03-31 19:09:02,125 DEBUG    neat.locals.overload.mhod.core MHOD utilization:[0.004454981242184243, 0.008154439349729054, 0.007972071696540226]
2015-03-31 19:09:02,125 DEBUG    neat.locals.overload.mhod.core MHOD time_in_states:2
2015-03-31 19:09:02,125 DEBUG    neat.locals.overload.mhod.core MHOD time_in_state_n:0
2015-03-31 19:09:02,125 DEBUG    neat.locals.overload.mhod.core MHOD p:[[0.1, 0.0], [0.0, 0.0]]
2015-03-31 19:09:02,126 DEBUG    neat.locals.overload.mhod.core MHOD current_state:0
2015-03-31 19:09:02,126 DEBUG    neat.locals.overload.mhod.core MHOD p[current_state]:[0.1, 0.0]
2015-03-31 19:09:02,126 INFO     neat.locals.manager Completed overload detection
2015-03-31 19:09:02,126 INFO     neat.locals.manager Underload detected
2015-03-31 19:09:02,127 INFO     requests.packages.urllib3.connectionpool Starting new HTTP connection (1): controller
2015-03-31 19:09:02,840 DEBUG    requests.packages.urllib3.connectionpool "PUT / HTTP/1.1" 500 3619
2015-03-31 19:09:02,841 INFO     neat.locals.manager Received response: [500]
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html>
        <head>
            <title>Error: 500 Internal Server Error</title>
            <style type="text/css">
              html {background-color: #eee; font-family: sans;}
              body {background-color: #fff; border: 1px solid #ddd;
                    padding: 15px; margin: 15px;}
              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
            </style>
        </head>
        <body>
            <h1>Error: 500 Internal Server Error</h1>
            <p>Sorry, the requested URL <tt>&#039;http://controller:60080/&#039;</tt>
               caused an error:</p>
            <pre>Internal Server Error</pre>
              <h2>Exception:</h2>
              <pre>Conflict()</pre>
              <h2>Traceback:</h2>
              <pre>Traceback (most recent call last):
  File &quot;/usr/local/bin/bottle.py&quot;, line 862, in _handle
    return route.call(**args)
  File &quot;/usr/local/bin/bottle.py&quot;, line 1732, in wrapper
    rv = callback(*a, **ka)
  File &quot;/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py&quot;, line 240, in service
    params[&#039;host&#039;])
  File &quot;&lt;string&gt;&quot;, line 2, in execute_underload
  File &quot;/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py&quot;, line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File &quot;/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py&quot;, line 441, in execute_underload
    bool(config[&#039;block_migration&#039;]))
  File &quot;&lt;string&gt;&quot;, line 2, in migrate_vms
  File &quot;/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py&quot;, line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File &quot;/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py&quot;, line 764, in migrate_vms
    placement[vm_uuid], block_migration)
  File &quot;&lt;string&gt;&quot;, line 2, in migrate_vm
  File &quot;/usr/local/lib/python2.7/dist-packages/PyContracts-1.7.1-py2.7.egg/contracts/main.py&quot;, line 266, in contracts_checker
    result = function_(*args, **kwargs)
  File &quot;/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/manager.py&quot;, line 827, in migrate_vm
    nova.servers.live_migrate(vm, host, block_migration, False)
  File &quot;/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py&quot;, line 1105, in live_migrate
    &#039;disk_over_commit&#039;: disk_over_commit})
  File &quot;/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py&quot;, line 1221, in _action
    return self.api.client.post(url, body=body)
  File &quot;/usr/lib/python2.7/dist-packages/novaclient/client.py&quot;, line 490, in post
    return self._cs_request(url, &#039;POST&#039;, **kwargs)
  File &quot;/usr/lib/python2.7/dist-packages/novaclient/client.py&quot;, line 465, in _cs_request
    resp, body = self._time_request(url, method, **kwargs)
  File &quot;/usr/lib/python2.7/dist-packages/novaclient/client.py&quot;, line 439, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File &quot;/usr/lib/python2.7/dist-packages/novaclient/client.py&quot;, line 433, in request
    raise exceptions.from_response(resp, body, url, method)
Conflict: Cannot &#039;os-migrateLive&#039; while instance is in task_state migrating (HTTP 409) (Request-ID: req-976d2834-5102-4cb3-ab0f-1288338f5341)
</pre>
        </body>
    </html>

2015-03-31 19:09:02,841 INFO     neat.locals.manager Completed an iteration                                                                       

在 2015年3月31日星期二 UTC+8下午1:45:49,Anton Beloglazov写道:

Anton Beloglazov

unread,
Mar 31, 2015, 6:45:33 PM3/31/15
to opensta...@googlegroups.com
This is a different problem. Looks like the local manager tried to migrate a VM that was already being migrated. Did you initiate migrations manually? Or could that VM fail while migrating and got stuck in that state?

Cheers,
Anton

xiyuanW

unread,
Apr 1, 2015, 5:41:08 AM4/1/15
to opensta...@googlegroups.com
it seems that the last vm '031e3386-e33b-48a8-ae37-8d1bf7b8d1a2' got no cpu number.it happend again when I restart the local manager.But when I restart the local manager,data collector and global manager, neat runs well.


2015-04-01 16:15:32,758 DEBUG    neat.globals.vm_placement.bin_packing vms_cpu: {'cbad9c2d-4e90-4f96-a29a-701c262f7c2b': [262, 159, 163, 170, 154, 160, 158, 161, 168, 167, 171, 171, 165, 149, 128, 163, 167, 165, 172, 162, 165], '5379fada-3f90-4b94-a2aa-d4e482df7968': [168, 168, 167], '58ad3354-0911-45ef-bfaa-dc5bbd8f26f4': [166, 166, 166, 167, 167, 166, 167, 157, 156, 163, 166, 156, 154, 167, 167, 167, 166, 165, 167, 165, 167, 162, 167, 167, 166, 165, 167, 167, 160, 166, 166, 167, 166, 161, 142, 187, 158, 166, 169, 163, 142, 194, 168, 169, 159, 206, 187, 158, 161, 169, 168, 172, 171, 168, 164, 165, 159, 168, 167, 172, 165, 166], 'a38e0eec-944b-43bf-82f5-037bdeb23d54': [171, 171, 169], 'caf5691d-5ccd-4527-a326-6dd39b71fcb3': [8, 3, 32, 31, 0, 857, 1101, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], '031e3386-e33b-48a8-ae37-8d1bf7b8d1a2': []}
2015-04-01 16:15:32,758 DEBUG    neat.globals.vm_placement.bin_packing vms_ram: {'cbad9c2d-4e90-4f96-a29a-701c262f7c2b': 512, '5379fada-3f90-4b94-a2aa-d4e482df7968': 512, '58ad3354-0911-45ef-bfaa-dc5bbd8f26f4': 512, 'a38e0eec-944b-43bf-82f5-037bdeb23d54': 512, 'caf5691d-5ccd-4527-a326-6dd39b71fcb3': 2048, '031e3386-e33b-48a8-ae37-8d1bf7b8d1a2': 512}
2015-04-01 16:15:32,758 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/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 417, in execute_underload
    vm_placement_state)
  File "/usr/local/lib/python2.7/dist-packages/openstack_neat-0.1-py2.7.egg/neat/globals/vm_placement/bin_packing.py", line 59, in <lambda>
    vms_ram),
  File "<string>", line 2, in best_fit_decreasing
  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/vm_placement/bin_packing.py", line 124, in best_fit_decreasing
    vms_tmp.append((sum(last_n_cpu) / len(last_n_cpu),
ZeroDivisionError: integer division or modulo by zero

在 2015年4月1日星期三 UTC+8上午6:45:33,Anton Beloglazov写道:

Anton Beloglazov

unread,
Apr 1, 2015, 7:50:29 AM4/1/15
to opensta...@googlegroups.com
I've added a check to prevent this error. Please try the latest version.

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,
Apr 1, 2015, 9:53:19 AM4/1/15
to opensta...@googlegroups.com
Hi Anton
     Could you tell me what can lead this error?  I have check the /var/lib/neat/vms,and the file all have data.Maybe which step ?THX

Regards
XiyuanW

--
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/nBYVD4asDY8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openstack-nea...@googlegroups.com.

Anton Beloglazov

unread,
Apr 1, 2015, 8:20:43 PM4/1/15
to opensta...@googlegroups.com
It's hard to say why this happens without further debugging. I haven't had this issue when I was running my experiments. Looks like for some reason the data becomes inconsistent. Do you still have this problem with the latest version?

Cheers,
Anton

Wildanil Ghozi

unread,
Apr 11, 2015, 12:49:49 AM4/11/15
to opensta...@googlegroups.com
Hi xiyuanW, may I see OpenStack neat that have been changed by you? mine has actually been able to work, but when execute underload no instance is migrated. The current state of the host compute is underload.
Reply all
Reply to author
Forward
0 new messages