關於 KVM 虛擬機HA集群

火星人 @ 2014-03-04 , reply:0
←手機掃碼閱讀

關於 KVM 虛擬機HA集群

關於 KVM 虛擬機集群(HA),大家都有哪些方案啊
找了半天,在網上看到了 corosync + pacemaker
但是在CentOS上部署有問題,單個節點只能看到自己的狀態
並且不知道怎麼樣配置libvirt資源

請教各位大俠,有沒有相關的一些資料,多謝了!
《解決方案》

等高手粗線
《解決方案》

回復 1# wadext


基於rhcs是一條路線
《解決方案》

在CentOS 6.0上使用luci添加node時,出現以下錯誤:
/usr/lib/python2.6/site-packages/tw/core/view.py:223: DeprecationWarning: object.__new__() takes no parameters
  obj = object.__new__(cls, *args, **kw)
Starting server in PID 2639.
serving on 0.0.0.0:8084 view at https://127.0.0.1:8084
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 58813)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib64/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 442, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 431, in handle_one_request
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib64/python2.6/socket.py", line 406, in readline
    data = self._sock.recv(self._rbufsize)
Error: [('SSL routines', 'SSL3_READ_BYTES', 'tlsv1 alert unknown ca'), ('SSL routines', 'SSL23_READ', 'ssl handshake failure')]
----------------------------------------
Bad PAM Authentication
/usr/lib/python2.6/site-packages/tw/core/view.py:223: DeprecationWarning: object.__new__() takes no parameters
  obj = object.__new__(cls, *args, **kw)
Starting server in PID 1344.
serving on 0.0.0.0:8084 view at https://127.0.0.1:8084
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 59366)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib64/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 442, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 431, in handle_one_request
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib64/python2.6/socket.py", line 406, in readline
    data = self._sock.recv(self._rbufsize)
Error: [('SSL routines', 'SSL23_READ', 'ssl handshake failure')]
----------------------------------------
Error - <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'getClusterName'
URL: https://127.0.0.1:8084/cluster/kvm/add_nodes_cmd
File '/usr/lib/python2.6/site-packages/weberror/errormiddleware.py', line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File '/usr/lib/python2.6/site-packages/tg/configuration.py', line 655 in wrapper
  return app(environ, start_response)
File '/usr/lib/python2.6/site-packages/tg/configuration.py', line 555 in remover
  return app(environ, start_response)
File '/usr/lib/python2.6/site-packages/repoze/tm/__init__.py', line 19 in __call__
  result = self.application(environ, save_status_and_headers)
File '/usr/lib/python2.6/site-packages/tw/core/middleware.py', line 43 in __call__
  return self.wsgi_app(environ, start_response)
File '/usr/lib/python2.6/site-packages/tw/core/middleware.py', line 68 in wsgi_app
  resp = req.get_response(self.application)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1325 in get_response
  application, catch_exc_info=False)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1293 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/python2.6/site-packages/tw/core/resource_injector.py', line 68 in _injector
  resp = req.get_response(app)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1325 in get_response
  application, catch_exc_info=False)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1293 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/python2.6/site-packages/beaker/middleware.py', line 73 in __call__
  return self.app(environ, start_response)
File '/usr/lib/python2.6/site-packages/beaker/middleware.py', line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/usr/lib/python2.6/site-packages/routes/middleware.py', line 130 in __call__
  response = self.app(environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/wsgiapp.py', line 125 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/wsgiapp.py', line 324 in dispatch
  return controller(environ, start_response)
File '/usr/lib/python2.6/site-packages/luci/controllers/root.py', line 43 in __call__
  return BaseController.__call__(self, environ, start_response)
File '/usr/lib/python2.6/site-packages/luci/lib/base.py', line 30 in __call__
  return TGController.__call__(self, environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 221 in __call__
  response = self._dispatch_call()
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 172 in _dispatch_call
  response = self._inspect_call(func)
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
  result = self._perform_call(func, args)
File '/usr/lib/python2.6/site-packages/tg/controllers.py', line 857 in _perform_call
  self, controller, params, remainder=remainder)
File '/usr/lib/python2.6/site-packages/tg/controllers.py', line 172 in _perform_call
  output = controller(*remainder, **dict(params))
File '/usr/lib/python2.6/site-packages/luci/controllers/cluster.py', line 135 in add_nodes_cmd
  vret = validate_node_add_form(self.model, db, **kw)
File '/usr/lib/python2.6/site-packages/luci/widget_validators/validate_create_cluster_form.py', line 167 in validate_node_add_form
  cluster_name = model.getClusterName()
AttributeError: 'NoneType' object has no attribute 'getClusterName'


CGI Variables
-------------
  AUTH_TYPE: 'cookie'
  CONTENT_LENGTH: '-1'
  CONTENT_TYPE: 'application/x-www-form-urlencoded'
  HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
  HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
  HTTP_ACCEPT_ENCODING: 'gzip,deflate'
  HTTP_ACCEPT_LANGUAGE: 'en-us,en;q=0.5'
  HTTP_CONNECTION: 'keep-alive'
  HTTP_COOKIE: 'luci=8a2130928d854a77cfaaafaca453b34da1aab9e61888cb9ff2a0c539ee0653b2a839fbab; auth_tkt="3c18ba72c94cd382e1787d44969f7cc24e7991d1root!"'
  HTTP_HOST: '127.0.0.1:8084'
  HTTP_KEEP_ALIVE: '115'
  HTTP_REFERER: 'https://127.0.0.1:8084/cluster/kvm/'
  HTTP_USER_AGENT: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20110412 CentOS/3.6.9-2.el6.centos Firefox/3.6.9'
  PATH_INFO: '/cluster/kvm/add_nodes_cmd'
  REMOTE_ADDR: '127.0.0.1'
  REMOTE_USER: 'root'
  REMOTE_USER_TOKENS: ['']
  REQUEST_METHOD: 'POST'
  SERVER_NAME: '0.0.0.0'
  SERVER_PORT: '8084'
  SERVER_PROTOCOL: 'HTTP/1.1'


WSGI Variables
--------------
  application: <function wrapper at 0x3206e60>
  beaker.cache: <beaker.cache.CacheManager object at 0x3207cd0>
  beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0x3207c50>>
  beaker.session: {'_accessed_time': 1316590093.72317}
  paste.cookies: (<SimpleCookie: auth_tkt='3c18ba72c94cd382e1787d44969f7cc24e7991d1root!' luci='8a2130928d854a77cfaaafaca453b34da1aab9e61888cb9ff2a0c539ee0653b2a839fbab'>, 'luci=8a2130928d854a77cfaaafaca453b34da1aab9e61888cb9ff2a0c539ee0653b2a839fbab; auth_tkt="3c18ba72c94cd382e1787d44969f7cc24e7991d1root!"')
  paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0x321b610>
  paste.registry: <paste.registry.Registry object at 0x7fb1d4303810>
  paste.throw_errors: True
  pylons.action_method: <bound method RootController.routes_placeholder of <luci.controllers.root.RootController object at 0x3247b50>>
  pylons.controller: <luci.controllers.root.RootController object at 0x3247b50>
  pylons.environ_config: {'session': 'beaker.session', 'cache': 'beaker.cache'}
  pylons.pylons: <pylons.util.PylonsContext object at 0x7fb1e4289310>
  pylons.routes_dict: {'url': u'cluster/kvm/add_nodes_cmd', 'action': u'routes_placeholder', 'controller': u'root'}
  repoze.tm.active: True
  repoze.what.credentials: {'repoze.what.userid': 'root', 'groups': ['managers'], 'permissions': ['manage']}
  repoze.who.identity: <repoze.who identity (hidden, dict-like) at 140402078453872>
  repoze.who.logger: <logging.Logger instance at 0x3218f80>
  repoze.who.plugins: {'luci.lib.pamplugin:PAMPlugin': <luci.lib.pamplugin.PAMPlugin object at 0x3212ed0>, 'friendlyform': <FriendlyFormPlugin 52487440>, 'auth_tkt': <AuthTktCookiePlugin 52506256>}
  routes.route: <routes.route.Route object at 0x312cdd0>
  routes.url: <routes.util.URLGenerator object at 0x7fb1e4289e90>
  toscawidgets.framework: <tw.mods.base.HostFramework object at 0x3207d50>
  toscawidgets.javascript.require_once: False
  toscawidgets.prefix: '/toscawidgets'
  webob._parsed_post_vars: (MultiDict([('num_nodes', '2'), ('hostname0', 'cluster-node2'), ('password0', '111111'), ('port0', '11111'), ('hostname2', 'cluster-node1'), ('password2', '111111'), ('port2', '11111'), ('download_pkgs', 'local')]), <FakeCGIBody at 0x7fb1d43195d0 viewing MultiDict([('nu...l')])>)
  webob._parsed_query_vars: (MultiDict([]), '')
  webob.adhoc_attrs: {'errors': 'ignore', 'language': 'en-us', 'start_response': <function repl_start_response at 0x7fb1d49d92a8>, 'response_type': None, 'response_ext': None, 'identity': <repoze.who identity (hidden, dict-like) at 140402078453872>}
  wsgi process: 'Multithreaded'
  wsgiorg.routing_args: (<routes.util.URLGenerator object at 0x7fb1e4289e90>, {'url': u'cluster/kvm/add_nodes_cmd', 'action': u'routes_placeholder', 'controller': u'root'})
------------------------------------------------------------
Error - <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'getClusterName'
URL: https://127.0.0.1:8084/cluster/kvm/add_nodes_cmd
File '/usr/lib/python2.6/site-packages/weberror/errormiddleware.py', line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File '/usr/lib/python2.6/site-packages/tg/configuration.py', line 655 in wrapper
  return app(environ, start_response)
File '/usr/lib/python2.6/site-packages/tg/configuration.py', line 555 in remover
  return app(environ, start_response)
File '/usr/lib/python2.6/site-packages/repoze/tm/__init__.py', line 19 in __call__
  result = self.application(environ, save_status_and_headers)
File '/usr/lib/python2.6/site-packages/tw/core/middleware.py', line 43 in __call__
  return self.wsgi_app(environ, start_response)
File '/usr/lib/python2.6/site-packages/tw/core/middleware.py', line 68 in wsgi_app
  resp = req.get_response(self.application)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1325 in get_response
  application, catch_exc_info=False)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1293 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/python2.6/site-packages/tw/core/resource_injector.py', line 68 in _injector
  resp = req.get_response(app)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1325 in get_response
  application, catch_exc_info=False)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1293 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/python2.6/site-packages/beaker/middleware.py', line 73 in __call__
  return self.app(environ, start_response)
File '/usr/lib/python2.6/site-packages/beaker/middleware.py', line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/usr/lib/python2.6/site-packages/routes/middleware.py', line 130 in __call__
  response = self.app(environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/wsgiapp.py', line 125 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/wsgiapp.py', line 324 in dispatch
  return controller(environ, start_response)
File '/usr/lib/python2.6/site-packages/luci/controllers/root.py', line 43 in __call__
  return BaseController.__call__(self, environ, start_response)
File '/usr/lib/python2.6/site-packages/luci/lib/base.py', line 30 in __call__
  return TGController.__call__(self, environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 221 in __call__
  response = self._dispatch_call()
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 172 in _dispatch_call
  response = self._inspect_call(func)
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
  result = self._perform_call(func, args)
File '/usr/lib/python2.6/site-packages/tg/controllers.py', line 857 in _perform_call
  self, controller, params, remainder=remainder)
File '/usr/lib/python2.6/site-packages/tg/controllers.py', line 172 in _perform_call
  output = controller(*remainder, **dict(params))
File '/usr/lib/python2.6/site-packages/luci/controllers/cluster.py', line 135 in add_nodes_cmd
  vret = validate_node_add_form(self.model, db, **kw)
File '/usr/lib/python2.6/site-packages/luci/widget_validators/validate_create_cluster_form.py', line 167 in validate_node_add_form
  cluster_name = model.getClusterName()
AttributeError: 'NoneType' object has no attribute 'getClusterName'


貌似是一個python的庫出現問題,請問如何解決啊,google了半天也沒找到。
《解決方案》

伺服器好,是真的好,其他都是扯淡:em27:
《解決方案》

還行吧,
《解決方案》

現在搞好了,應該是某個包沒有安裝
運行 yum groupinstall 高可用性 高可用性管理
全裝上就ok了




[火星人 via ] 關於 KVM 虛擬機HA集群已經有482次圍觀

http://www.coctec.com/docs/service/show-post-4862.html