菜鸟帮你跳过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 是巴 ...
随机推荐
- 【LeetCode】94. Binary Tree Inorder Traversal
题目: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary ...
- C#基础:.NET环境下WebConfig的加密
在将ASP.NET项目部署到服务器上时,内网环境下Web.Config往往是直接复制过去.对于外网环境,则需要对Web.Config文件进行加密. .NET环境下一共提供了2种方式的加密功能,分别是D ...
- 错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server 是无法给远程连接的用户权限问题
错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server 是无法给远程连接的用 ...
- SharePoint 2013 安装
步骤 1:打开提升的 SharePoint 2013 命令行管理程序 选择与您的服务器操作系统对应的过程. 在 Windows Server 2008 R2 中 单击“开始”>“所有程序”> ...
- 在ubuntu14.04上安装mono4.4 + jexus + mvc6
0.准备工作 在/usr下建立一个文件夹,方便管理源码 cd /usr mkdir opensource cd opensource 安装vim(文本编辑器,不习惯用vim可以换成其他的) apt-g ...
- 实现一个简单的Log框架
实际上算不上框架,只是自己对日志框架的一点理解. 核心接口:Logger,供调用者完成不同等级的日志输出 package com.lichmama.log.service; public interf ...
- Chrome浏览器扩展开发系列之十六:扩展中可用的Chrome浏览器API
除了Chrome浏览器支持的chrome.* API之外,Chrome浏览器扩展还可以使用Chrome浏览器为Web页面或Chrome app提供的APIs.对于Chrome浏览器2支持的API,还可 ...
- Mac之OS系统下搭建JavaEE环境 <五> 之Mysql数据库的安装及配置
这里将推荐两款 集成的Mysql环境 十分轻便好用,MAMP 和 XAMPP MAMP XAMPP 1.MAMP下载 官网: https://www.mamp.info/en/ 下载安装即可使用 MA ...
- voa 2015 / 4 / 14
Even with falling oil prices and strong U.S. growth, the head of the International Monetary Fund sai ...
- JAVA 中数组的几种排序方法
1.数组的冒泡排序 public void bubbleSort(int a[]) { int n = a.length; for (int i = 0; i < n - ...