openstack masakari,AttributeError:“连接”对象没有属性“ instance_ha”

时间:2019-02-05 06:15:59

标签: openstack openstack-nova

我想使用Masakari项目为我的Openstack实例创建实例HA,该项目在控制器节点以及masakari-apimasakari-enginemasakari-processmonitor上安装了masakari-instancemonitormasakari-hostmonitor openstack-nova-compte在计算节点上,但是当我要测试失败的2019-02-02T10:10:03.782541+03:30 c2 masakari-processmonitor: Command: systemctl restart openstack-nova-compute.service 2019-02-02T10:10:03.782972+03:30 c2 masakari-processmonitor: Exit code: 1 2019-02-02T10:10:03.783363+03:30 c2 masakari-processmonitor: Stdout: u'' 2019-02-02T10:10:03.783785+03:30 c2 masakari-processmonitor: Stderr: u'Job for openstack-nova-compute.service failed because the control process exited with error code. See "systemctl status openstack-nova-compute.service" and "journalctl -xe" for details.\n': ProcessExecutionError: Unexpected error while running command. 2019-02-02T10:10:08.776654+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.775 115036 INFO masakarimonitors.ha.masakari [-] **Send a notification**. {'notification': {'hostname': '<my_domain_name>', 'type': 'PROCESS', 'payload': {'process_name': '/usr/bin/nova-compute', 'event': 'STOPPED'}, 'generated_time': datetime.datetime(2019, 2, 2, 6, 40, 8, 774997)}} 2019-02-02T10:10:08.780948+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process [-] Exception caught: 'Connection' object has no attribute 'instance_ha': AttributeError: 'Connection' object has no attribute 'instance_ha' 2019-02-02T10:10:08.781513+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process Traceback (most recent call last): 2019-02-02T10:10:08.782106+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process File "/usr/lib/python2.7/site-packages/masakarimonitors/processmonitor/process.py", line 75, in main 2019-02-02T10:10:08.782882+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process self.process_handler.restart_processes(down_process_list) 2019-02-02T10:10:08.783546+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process File "/usr/lib/python2.7/site-packages/masakarimonitors/processmonitor/process_handler/handle_process.py", line 203, in restart_processes 2019-02-02T10:10:08.784149+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process event) 2019-02-02T10:10:08.784772+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process File "/usr/lib/python2.7/site-packages/masakarimonitors/ha/masakari.py", line 60, in send_notification 2019-02-02T10:10:08.785349+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process client = self._make_client() 2019-02-02T10:10:08.785902+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process File "/usr/lib/python2.7/site-packages/masakarimonitors/ha/masakari.py", line 43, in _make_client 2019-02-02T10:10:08.786500+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process return conn.instance_ha 2019-02-02T10:10:08.786998+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process AttributeError: 'Connection' object has no attribute 'instance_ha' 2019-02-02T10:10:08.787561+03:30 c2 masakari-processmonitor: 2019-02-02 10:10:08.778 115036 ERROR masakarimonitors.processmonitor.process 服务以测试实例HA时,出现此错误:

mysql> SHOW TABLES FROM  masakari;

failover_segments

hosts

migrate_version

notifications
  • 我检查到控制器节点和计算节点的连接,都正常。
  • 我检查Rabbitmq队列,它具有masakari ha-engine队列。
  • 我检查了masakari数据库的MySQL,我也有。
    router.post('/register', function(req, res) {
  var name = req.body.name;
  var email = req.body.email;
  var username = req.body.username;
  var password = req.body.password;
  var password2 = req.body.password2;

  req.checkBody('username', 'Veuillez renseigner un identifiant').notEmpty();
  req.checkBody('email', 'Veuillez renseigner une adresse email valide').isEmail();
  req.checkBody('password', 'Veuillez renseigner un mot de passe').notEmpty();
  req.checkBody('password2', 'Les mots de passe ne correspondent pas').equals(req.body.password);

  var errors = req.validationErrors();

  if (errors) {
    res.render('register', {errors:errors});
  } else {
    User.findOne({ email: email }).then(user => {
      if (user) {
        res.render('register', {errors:errors})
        req.flash('error_msg','Adresse email non dispo')
  } else {
        var newUser = new User({
            email:email,
            username: username,
            password: password
        })
     User.createUser(newUser, function(err, user){
      if(err) throw err;
      console.log(user);
    })

    req.flash('success_msg', 'Vous venez de créer un compte, vous pouvez désormais vous connecter');

    res.redirect('/users/login');
  }
})
}})

每件事看起来都正确,但是我的问题在哪里,我会错过一些事情吗?

1 个答案:

答案 0 :(得分:-2)

问题似乎是

  

AttributeError:“连接”对象没有属性“ instance_ha”。

在稳定版/女王区中,此问题已由this patch解决。

如果您仍然在稳定版/女王或其他任何版本中发现此问题, 我建议您通过launchpad向OpenStack masakari-monitor提交错误报告。请提供OpenStack版本详细信息。