菜鸟帮你跳过openstack配置过程中的坑[文末新添加福利]
一:前言
对于一个以前做java全栈工程师而言,而且没学过Linux,很少用虚拟机(还是在大学的时候简单的用过),去配置openstack我想我入的坑肯定比有基础的一定要多,躺在每个坑中徘徊思索的时间一定比老鸟们久。所以现在总结一下openstack在配置过程中的几大坑点,让各位在配置过程中不再问天问大地,灵魂一片片凋落。
1. 如果是新手一定要学会用快照,一定要多用快照,从镜像安装完成开始,最好每一个章节模块配置完成后都用上一个快照,人生苦短,快照帮你性感。
2.一定要仔细看配种配置以及环境要求,比如控制节点: 1 处理器, 4 GB 内存, 及5 GB 存储,环境没达到只能当练手。
3.一定要选择自己要配置的版本,openstack目前版本不定更新,所以如果不固定版本,只从官方文档打开,将给配置带来很多问题。
二:入坑指南
1.坑一SQL数据库

在为数据库的root设置适当密码时一定要注意,一步错误后面将直接无法赋予权限,那么应该怎么设置嘞?看下面。

建议直接运行命令# echo -e "\nY\n123456\n123456\nY\nn\nY\nY\n" | mysql_secure_installation来代替原来的mysql_secure_installation。这样将免去中间的设置。
2.坑二配置Linuxbridge代理

这两个地方在compute和controller中将配置什么嘞?
直接揭晓答案吧,physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME在controller和compute中都配置第二个网盘的名字。
local_ip = OVERLAY_INTERFACE_IP_ADDRESS看名字local_ip本地ip嘛,所以在controller和compute中分别配置各自的静态ip。
3.坑三Networking 服务neutron agent-list中不显示compute
这个可能原因有很多,但从我的错误来看,,你关闭了防火墙吗??你关闭了SELinux吗?? SELinux怎么关闭??
查看SELinux状态:
1、/usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态
SELinux status: enabled
2、getenforce ##也可以用这个命令检查
关闭SELinux:
1、临时关闭(不用重启机器):
setenforce 0 ##设置SELinux 成为permissive模式
##setenforce 1 设置SELinux 成为enforcing模式
2、修改配置文件需要重启机器:
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
重启机器即可
4.坑点四openstack中dashboard页面RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
环境是centos7,直接跑在服务器上。
按照官网一步步安装openstack,到验证dashborad时出错。
登录http://192.168.1.73/dashboard ,输入域名,用户名,密码,出现错误,无法进入界面

tail -40 /etc/httpd/logs/error_log 查看打印
发现

[Sat Aug 12 19:42:16.701521 2017] [:error] [pid 10885] Could not process panel theme_preview: Dashboard with slug "developer" is not registered.
[Sat Aug 12 19:44:41.533207 2017] [:error] [pid 10885] Login successful for user "admin".
[Sat Aug 12 19:45:52.537140 2017] [:error] [pid 10885] Internal Server Error: /dashboard/auth/login/
[Sat Aug 12 19:45:52.556116 2017] [:error] [pid 10885] Traceback (most recent call last):
[Sat Aug 12 19:45:52.556129 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 223, in get_response
[Sat Aug 12 19:45:52.556135 2017] [:error] [pid 10885] response = middleware_method(request, response)
[Sat Aug 12 19:45:52.556140 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/middleware.py", line 50, in process_response
[Sat Aug 12 19:45:52.556145 2017] [:error] [pid 10885] request.session.save()
[Sat Aug 12 19:45:52.556148 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py", line 53, in save
[Sat Aug 12 19:45:52.556153 2017] [:error] [pid 10885] return self.create()
[Sat Aug 12 19:45:52.556157 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py", line 48, in create
[Sat Aug 12 19:45:52.556180 2017] [:error] [pid 10885] "Unable to create a new session key. "
[Sat Aug 12 19:45:52.556185 2017] [:error] [pid 10885] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
[Sat Aug 12 20:15:27.128247 2017] [:error] [pid 10885] Login successful for user "admin".
[Sat Aug 12 20:15:33.377599 2017] [:error] [pid 10885] Internal Server Error: /dashboard/auth/login/
[Sat Aug 12 20:15:33.377660 2017] [:error] [pid 10885] Traceback (most recent call last):
[Sat Aug 12 20:15:33.377665 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
[Sat Aug 12 20:15:33.377668 2017] [:error] [pid 10885] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Sat Aug 12 20:15:33.377671 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Sat Aug 12 20:15:33.377674 2017] [:error] [pid 10885] return view(request, *args, **kwargs)
[Sat Aug 12 20:15:33.377677 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Sat Aug 12 20:15:33.377680 2017] [:error] [pid 10885] response = view_func(request, *args, **kwargs)
[Sat Aug 12 20:15:33.377682 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Sat Aug 12 20:15:33.377685 2017] [:error] [pid 10885] response = view_func(request, *args, **kwargs)
[Sat Aug 12 20:15:33.377688 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/openstack_auth/views.py", line 103, in login
[Sat Aug 12 20:15:33.377691 2017] [:error] [pid 10885] **kwargs)
[Sat Aug 12 20:15:33.377694 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Sat Aug 12 20:15:33.377697 2017] [:error] [pid 10885] return view(request, *args, **kwargs)
[Sat Aug 12 20:15:33.377699 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Sat Aug 12 20:15:33.377702 2017] [:error] [pid 10885] response = view_func(request, *args, **kwargs)
[Sat Aug 12 20:15:33.377704 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Sat Aug 12 20:15:33.377707 2017] [:error] [pid 10885] response = view_func(request, *args, **kwargs)
[Sat Aug 12 20:15:33.377709 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 51, in login
[Sat Aug 12 20:15:33.377712 2017] [:error] [pid 10885] auth_login(request, form.get_user())
[Sat Aug 12 20:15:33.377714 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 110, in login
[Sat Aug 12 20:15:33.377717 2017] [:error] [pid 10885] request.session.cycle_key()
[Sat Aug 12 20:15:33.377720 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py", line 285, in cycle_key
[Sat Aug 12 20:15:33.377723 2017] [:error] [pid 10885] self.create()
[Sat Aug 12 20:15:33.377725 2017] [:error] [pid 10885] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py", line 48, in create
[Sat Aug 12 20:15:33.377728 2017] [:error] [pid 10885] "Unable to create a new session key. "
[Sat Aug 12 20:15:33.377730 2017] [:error] [pid 10885] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

意思大概是:
因为它周期性连接到非本地缓存有问题。官网写的有bug。
把/etc/openstack-dashboard/local_settings 中 SESSION_ENGINE = 'django.contrib.sessions.backends.cache' 应改为
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
重启服务,然后重新登录成功。

三: 提问榜
以上是我在部署openstack过程中遇到的几个疑问点,可能“乱拳打死老师傅”一般避开了各位的疑难点,各位可在留言中向我提问,愿意向各位讨教!----yh
四:福利(已写好脚本-简略版)
http://www.cnblogs.com/yaohong/p/7251852.html
菜鸟帮你跳过openstack配置过程中的坑[文末新添加福利]的更多相关文章
- 菜鸟帮你跳过openstack配置过程中的坑
一:前言 对于一个以前做java全栈工程师而言,而且没学过Linux,很少用虚拟机(还是在大学的时候简单的用过),去配置openstack我想我入的坑肯定比有基础的一定要多,躺在每个坑中徘徊思索的时间 ...
- Redis配置过程中的问题
记录一下配置过程中的坑~~ 当Redis在服务器上安装完成后,get.set没有问题了,接下来在程序中使用看看... 首先 在配置文件redis.conf中,默认的bind 接口是127.0.0.1, ...
- CAS SSO:汇集配置过程中的错误解决方法
本教程为gevin.me原创文章,转载请注明: CAS SSO:配置过程中的错误解决方法 | Gevin’s Blog 本文将收集在配置CAS SSO遇到的所有错误,希望对大家有帮助,也方便下次搭建的 ...
- ESXi与物理交换机静态链路聚合配置过程中的小陷阱
作者:陆斌文章来自微信公众号:平台人生 内容简介:ESXi与物理交换机之间配置静态链路聚合时,因为静态链路聚合的特点,在进行down网卡和从虚拟交换机移除网卡的操作时,可能会无法完成故障流量切换,影响 ...
- springmvc配置过程中遇到的一些问题总结
springmvc配置过程中遇到的一些问题总结 1.配置tomcat过程中的错误: 2.配置web.xml中DispatchServlet报红(配置好已有依赖条件下) 解决的办法: 因为新添加依赖,m ...
- Filezilla配置FTP中的坑以及出坑办法
做本科生助教,老板让配置一个FTP传资料交作业,找了一台Windows服务器捣鼓,开始按网上教程自己配置特别麻烦,何西西说用Filezilla比较方便,就去Filezilla官网下载了Filezill ...
- Torch-RNN运行过程中的坑 [2](Lua的string sub函数,读取中文失败,乱码?)
0.踩坑背景 仍然是torch-rnn/LanguageModel.lua文件中的一些问题,仍然是这个狗血的LM:encode_string函数: function LM:encode_string( ...
- Torch-RNN运行过程中的坑 [1](读取Lua非空table,size为0)
0.踩坑背景 执行Torch-RNN的时候,在LanguageModel.lua中的encode_string函数中,对start_text的各个character进行id映射编码,实现功能类似“北京 ...
- Torch-RNN运行过程中的坑 [0](一些基础概念)
0.Lua & LuaJIT简介 Lua 是一种轻量小巧的脚本语言,用标准C语言编写并以源代码形式开放, 其设计目的是为了嵌入应用程序中,从而为应用程序提供灵活的扩展和定制功能. Lua 是巴 ...
随机推荐
- elk----es settings--logstash--performance---bigdesk---logstash plugin online/offline
www.cnblogs.com/tangr206/articles/2274845.html yum timeout error(/etc/resolv.conf) elk: elasticsearc ...
- 系统中同时有 python2和 python3,怎么让 ipython 选择不同的版本启动?
已经安装的情况下: > which ipython /usr/local/bin/ipython > cat /usr/local/bin/ipython #!/usr/local/op ...
- inotify+rsync安装配置
环境 系统 IP地址 主服务器 CentOS7.4 192.168.1.1 备份服务器 CentOS7.4 192.168.1.2 一.备份服务器 安装rsync(备) wget https://rs ...
- Farthest Nodes in a Tree ---LightOj1094(树的直径)
题目链接:http://lightoj.com/volume_showproblem.php?problem=1094 Given a tree (a connected graph with no ...
- Python开发【数据结构】:基础
数据结构 什么是数据结构? 简单来说,数据结构就是设计数据以何种方式组织并存储在计算机中. 比如:列表.集合与字典等都是一种数据结构 N.Wirth: “程序=数据结构+算法” 列表 列表:在其他编程 ...
- HBase表预分区
在创建Hbase表的时候默认一张表只有一个region,所有的put操作都会往这一个region中填充数据,当这个一个region过大时就会进行split.如果在创建HBase的时候就进行预分区则会减 ...
- [py]class的特殊方法
类方法 解释 hasattr hasattr(class) getattr - setattr - delattr - - - __getattr__ __setattr__ __delattr__ ...
- ZOJ2588:Burning Bridges(无向连通图求割边)
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1588 吐下槽,不得不说ZOJ好坑,模版题做了一个多小时. 题意:* ...
- centos 相关
运行locate httpd.conf,提示-bash: locate: command not found错误.则需要安装mlocate软件包: yum install mlocate 搜索,提示l ...
- idea使用插件activate-power-mode给编码加上特效和带来乐趣。
一.安装. 1. 2. 二.使用. 1. 2.