分享

启动:nova-network和nova-volume报错

xioaxu790 发表于 2014-4-14 09:19:47 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 9 19344
本帖最后由 xioaxu790 于 2014-4-14 09:21 编辑
错误一:启动nova-network

root@control:~# nova-network restart
2014-04-14 09:09:43 AUDIT nova.service [-] Starting network node (version 2012.1.4-LOCALBRANCH:LOCALREVISION)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 336, in fire_timers
    timer()
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
    server.start()
  File "/usr/lib/python2.7/dist-packages/nova/service.py", line 162, in start
    self.manager.init_host()
  File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 1700, in init_host
    self.l3driver.initialize()
  File "/usr/lib/python2.7/dist-packages/nova/network/l3.py", line 84, in initialize
    linux_net.init_host()
  File "/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 444, in init_host
    add_snat_rule(ip_range)
  File "/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 434, in add_snat_rule
    iptables_manager.apply()
  File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 988, in inner
    retval = f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 328, in apply
    attempts=5)
  File "/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 818, in _execute
    return utils.execute(*cmd, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 247, in execute
    cmd=' '.join(cmd))
ProcessExecutionError: Unexpected error while running command.
Command: sudo nova-rootwrap iptables-save -t filter
Exit code: 1
Stdout: ''
Stderr: 'sudo: /etc/sudoers is owned by uid 1000, should be 0\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin\n'
2014-04-14 09:09:48 CRITICAL nova [-] Unexpected error while running command.
Command: sudo nova-rootwrap iptables-save -t filter
Exit code: 1
Stdout: ''
Stderr: 'sudo: /etc/sudoers is owned by uid 1000, should be 0\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin\n'


问题二:启动nova-volume错误
root@control:~# nova-volume restart
2014-04-14 09:19:11 AUDIT nova.service [-] Starting volume node (version 2012.1.4-LOCALBRANCH:LOCALREVISION)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 336, in fire_timers
    timer()
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
    server.start()
  File "/usr/lib/python2.7/dist-packages/nova/service.py", line 162, in start
    self.manager.init_host()
  File "/usr/lib/python2.7/dist-packages/nova/volume/manager.py", line 93, in init_host
    self.driver.check_for_setup_error()
  File "/usr/lib/python2.7/dist-packages/nova/volume/driver.py", line 103, in check_for_setup_error
    run_as_root=True)
  File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 247, in execute
    cmd=' '.join(cmd))
ProcessExecutionError: Unexpected error while running command.
Command: sudo nova-rootwrap vgs --noheadings -o name
Exit code: 1
Stdout: ''
Stderr: 'sudo: /etc/sudoers is owned by uid 1000, should be 0\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin\n'
2014-04-14 09:19:11 CRITICAL nova [-] Unexpected error while running command.
Command: sudo nova-rootwrap vgs --noheadings -o name
Exit code: 1
Stdout: ''
Stderr: 'sudo: /etc/sudoers is owned by uid 1000, should be 0\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin\n'

谢谢各位赐教,我们可以一起讨论




已有(9)人评论

跳转到指定楼层
pig2 发表于 2014-4-14 12:27:51
两个报的同一个错误 /etc/sudoers is owned by uid 1000
uid 0是用户根uid。
uid 1000应该是你自己的用户的uid。

你试一下下面的命令
  1. %su
  2. %"root pass"
  3. %chown -R root:wheel /etc/sudoers
复制代码



回复

使用道具 举报

howtodown 发表于 2014-4-14 13:15:38
你可以看一下sudoers文件的作用。
sudo为系统管理员提供配置文件,允许系统管理员集中地管理用户的使用权限和使用的主机。它默认的存放位置是/etc/sudoers。 你尝试给他们授权,让你当前的用户,能够读取sudoers文件

  1. chown root:root /etc/sudoers
  2. chmod 440 /etc/sudoers
  3. chown -R root:root /etc/sudoers.d
  4. chmod  755 /etc/sudoers.d
  5. chmod  440 /etc/sudoers.d/*
复制代码




回复

使用道具 举报

xioaxu790 发表于 2014-4-14 13:19:48
pig2 发表于 2014-4-14 12:27
两个报的同一个错误 /etc/sudoers is owned by uid 1000
uid 0是用户根uid。
uid 1000应该是你自己的用户 ...
恩恩,我试试
回复

使用道具 举报

xioaxu790 发表于 2014-4-14 14:13:41


还是这个错呢,是否是volume本身原因呢
root@control:~# nova-volume restart
2014-04-14 14:12:18 AUDIT nova.service [-] Starting volume node (version 2012.1.4-LOCALBRANCH:LOCALREVISION)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 336, in fire_timers
    timer()
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
    server.start()
  File "/usr/lib/python2.7/dist-packages/nova/service.py", line 162, in start
    self.manager.init_host()
  File "/usr/lib/python2.7/dist-packages/nova/volume/manager.py", line 93, in init_host
    self.driver.check_for_setup_error()
  File "/usr/lib/python2.7/dist-packages/nova/volume/driver.py", line 107, in check_for_setup_error
    % FLAGS.volume_group)
Error: volume group nova-volumes doesn't exist
2014-04-14 14:12:18 CRITICAL nova [-] volume group nova-volumes doesn't exist


回复

使用道具 举报

pig2 发表于 2014-4-14 14:47:06
xioaxu790 发表于 2014-4-14 14:13
还是这个错呢,是否是volume本身原因呢
root@control:~# nova-volume restart
2014-04-14 14:12:18 A ...

试一下下面两种方法,用其中一种就可以:
创建一个名字为 nova-volumes 的卷组,方法有两种:
(1).服务器上没有单独的分区的时候,使用img文件来做卷组
dd if=/dev/zero of=/opt/nova-volumes.img bs=1M seek=100000 count=0
losetup -f nova-volumes.img
vgcreate nova-volumes /dev/loop0
(2).服务器上有单独的分区,如:/dev/sdb2
vgcreate nova-volumes/dev/sdb2

回复

使用道具 举报

xioaxu790 发表于 2014-4-14 22:53:02
pig2 发表于 2014-4-14 14:47
试一下下面两种方法,用其中一种就可以:
创建一个名字为 nova-volumes 的卷组,方法有两种:
(1).服务 ...

虽然问题还是哪个。但是,还是感谢楼主把我的问题看做是自己的问题来认真、细心的整。感谢楼主了。
有时间,再问看吧
回复

使用道具 举报

pig2 发表于 2014-4-15 02:55:37
xioaxu790 发表于 2014-4-14 22:53
虽然问题还是哪个。但是,还是感谢楼主把我的问题看做是自己的问题来认真、细心的整。感谢楼主了。
有时 ...
  1. Stdout: ''
  2. Stderr: 'sudo: /etc/sudoers is owned by uid 1000, should be 0\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin\n'
复制代码



第一个问题应该解决了吧
回复

使用道具 举报

xioaxu790 发表于 2014-4-15 08:31:11
回复

使用道具 举报

pig2 发表于 2014-4-16 00:11:40
xioaxu790 发表于 2014-4-15 08:31
没有呢,还是有那两个问题。

第一个是没有错的,你检查是不是自己的方法或则实现方面有没有问题。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条