zoukankan      html  css  js  c++  java
  • Openstack Troubleshooting

    Openstack 还处于快速发展阶段,虽然有众多公司及开发人员的参与,但其文档速度仍然远远跟不上代码更新速度。

     
    本文记录我在实践过程中遇到的问题及解决方法。
     
     
    1.  今天遇到的。Horizon 出现http 500 错误,调试发现nova-api无法启动,查看日志
    nova-api.log发现:
    2013-03-20 10:23:50 15287 TRACE nova PasteAppNotFound: Could not load paste app 'osapi_volume' from /etc/nova/api-paste.ini
     
    在nova.conf 中加上
    enabled_apis=ec2,osapi_compute,metadata
     
    启动nova-api解决.
     
     
    2. Folsom +Quantum+Openvswitch 配置网络,当计算节点意外关机,重启后,所有虚拟机无法通过dhcp获得地址
    造成所有虚拟机网络不通。
    目前测试在Single Flat Network 模式下,计算节点重启后,再次重启quantum-plugin-openvswitch-agent 即可修复.
    service quantum-plugin-openvswitch-agent restart
     
    估计为物理计算节点服务启动顺问题,导致quantum-plugin-openvswitch-agent启动时,其依赖的openvswitch,或者mysql并没有启动成功所致.
     
    3.Folsom +Quantum+Openvswitch 配置网络,当网络节点关机,重启后,所有虚拟机无法通过dhcp获得地址
    造成所有虚拟机网络不通。
    ovs-vsctl del-br br-int
    ovs-vsctl add-br br-int
    service quantum-dhcp-agent restart
    service quantum-plugin-openvswitch-agent restart
     
    有一种情况是安装系统时自带的dnsmasq优先启动,调用的是默认的dnsmasq配置文件,而调用quantum配置文件的dnsmasq进程因为端口被占用而启动失败。
    ps -ef |grep dnsmasq
    找到相关的进程,kill 以后,
    再重启quantum-dhcp-agent 即可。
     
    3. Windows 2003 镜像启动出现服务错误解决方法:
    开机弹出一个错误窗口,让查看事件查看器。找到一个红叉的记录:由于下列错误,Parallel port driver 服务启动失败: 无法启动服务,原因可能是已被禁用或与其相关联的设备没有启动。” 
    其实服务中根本不存在这样一个服务,所以去服务禁用的方法无效
    解决这个问题,只需要在注册表HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesParport中,将“start=3”改为“start=0”就可以了。
     
    4. Openstack Grizzly 版本安装完nova,keystone,glance后dashboard登录,其它服务正常,但总是出现“error:unable to get quotas ...” 等好像是获取quota失败的信息,一直在找quota的配置错误,其实最后发现是quantum没有配置导致这个错误。
     
    5.在命令行下source novarc环境变量之后仍不能使用nova 命令做一些操作,可能是因为你的环境变量中没有设置OS_TENANT_ID,在F版本和G版本中,这是必须的。
     
    6. 卷和快照创建时明明没有到限额,然而总是提示创建失败,超过限额。
    检查数据库发现在,卷和快照的使用确实是限额数,可能是cinder的bug,当你删除卷时没有在数据库中将已使用的卷数据减除。
    临时解决办法:
    user cinder;
    UPDATE `quota_usages` SET `deleted_at` = NULL ,
    `in_use` = '0',
    `until_refresh` = NULL WHERE `quota_usages`.`id` =5 LIMIT 
     
     

    7.  /var/log/quantum/dhcp-agent.log中出现sudo  ip ns 等权限问题:

    这些权限问题是因为openstack 组件执行操作有时候需要sudo 到root权限 .openstack 为此已经创建了相关的权限文件在/etc/sudoer.d/下,但其实ubuntu下其默认并不生效.
    因为/etc/sudoers文件中的includedir默认是注释掉的。将其打开即可。
    或者编辑 /etc/sudoers 直接加上相应用户权限 :
    cinder   ALL = NOPASSWD: ALL
    nova     ALL = NOPASSWD: ALL
    quantum  ALL = NOPASSWD: ALL
     
    8. migrate 和live-migarate ,时nova-compute中出现的ssh 问题,此问题的权限原因在于nova用户无法登录到其它物理机,或者登录了,在其它物理机上权限不一致。终极解决办法是:
    在所有物理机上创建具备同样UID,和GID的用户nova,并且为nova用户创建ssh key,放置在所有物理机中.
    如果你已经创建好了用户,也有办法。修改其uid,和gid (usermod,groupmod):
    先修改/etc/passwd文件中的uid和gid ,然后在查找本地所有文件的uid 和gid,修改正确即可。
    find / -user OLDID -exec chown NEWID {} ;
     
    9. openstack-dashboard 访问出现 connection refused .
       可能为几个关键服务没启动,keystone,nova,cinder,glance
     
    10. RHEL+Openstack Grizzly ,安装正常后,过了几天dashboard突然登录验证失败,keystone没有日志信息,apache日志出现:
    [Mon Sep 02 18:43:02 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_wsgi/3.2 Python/2.6.6 configured -- resuming normal operations
    [Mon Sep 02 10:43:08 2013] [error] DeprecationWarning: Translations in the project directory aren't supported anymore. Use the LOCALE_PATHS setting instead.DeprecationWarning: The syntax for the url template tag is changing. Load the `url` tag from the `future` tag library to start using the new behavior.DeprecationWarning: Authentication backends without a `supports_inactive_user` attribute are deprecated. Please define it in <class 'openstack_auth.backend.KeystoneBackend'>.DEBUG:openstack_auth.backend:Beginning user authentication for user "admin".
    [Mon Sep 02 10:43:08 2013] [error] DeprecationWarning: BaseException.message has been deprecated as of Python 2.6DEBUG:openstack_auth.backend:Authorization Failed: [Errno 13] Permission denied
    [Mon Sep 02 10:43:12 2013] [error] DEBUG:openstack_auth.backend:Beginning user authentication for user "admin".
    [Mon Sep 02 10:43:12 2013] [error] DEBUG:openstack_auth.backend:Authorization Failed: [Errno 13] Permission denied
    [Mon Sep 02 10:43:13 2013] [error] DEBUG:openstack_auth.backend:Beginning user authentication for user "admin".

     各种偿试,都无效果,最后终于发现是SELINUX的问题(RHEL排查问题首先应该关这个。。好久没用,忘记了|_|)。

    [root@osee openstack-dashboard]# getenforce
    Enforcing
    [root@osee openstack-dashboard]# setenforce 0
    [root@osee openstack-dashboard]# getenforce
    Permissive
    [root@osee openstack-dashboard]# service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd: httpd: apr_sockaddr_info_get() failed for osee
    httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                               [  OK  ]

     10. LockFailed: failed to create /usr/share/openstack-dashboard/openstack_dashboard/local/<hostname>.Dummy-1-3096

    Set the LOCAL_PATH='/tmp' in /etc/openstack-dashboard/local_settings, restart HTTP and then try to access the dashboard.

     11. VM创建失败,换个镜像成功。icehouse

    ICEHouse的dashboard上在上传镜像时,增加了一下Architecture 选项,此项不能随便填,否则会造成schedurle失败,提示no valid host
  • 相关阅读:
    Vijos P1459 车展 (treap 任意区间中位数)
    「BZOJ1691」[Usaco2007 Dec] 挑剔的美食家 (Treap)
    hdu 1540 Tunnel Warfare(Treap)
    hdu 2844 Coins (多重背包+二进制优化)
    hdu 2159 FATE (二维完全背包)
    hdu 2955 Robberies (01背包)
    hdu 2546 饭卡 (01背包)
    hdu 2191 (多重背包二进制优化)
    2019西北工业大学程序设计创新实践基地春季选拔赛 I Chino with Rewrite (并查集+树链剖分+线段树)
    CF895E Eyes Closed (期望)
  • 原文地址:https://www.cnblogs.com/biangbiang/p/2970858.html
Copyright © 2011-2022 走看看