Redhat7搭建L版本,实例创建问题

本文介绍了如何解决在OpenStack环境中使用Nova创建实例时遇到的错误。问题出现的原因是在计算机节点的nova.conf文件中缺少了关于Neutron的相关配置。通过补充配置解决了客户端异常API错误的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

nova boot --flavor m1.tiny --image cirros --nic net-id=a0bde269-d320-4853-9045-e2e90ba14031 \
>   --security-group default --key-name mykey public-instance
ERROR (ClientException): Unexpected API Error. Please report this athttp://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'keystoneclient.exceptions.BadRequest'> (HTTP 500) (Request-ID: req-c0467d40-2fff-42b4-915a-d5ff3f1a7ff0)


nova boot --flavor m1.tiny --image cirros --nic net-id=9d4daabf-ef36-4949-90e5-9904851d4a4a \
          --security-group default  public-instance


2016-01-14 11:00:16.143 11528 ERROR nova.api.openstack.extensions BadRequest: Expecting to find username or userId in passwordCredentials - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-5a787291-5ea7-42ec-8afc-c9cb2e826fa8)


在computer节点中的nova.conf缺少关于neutron的配置,添加以后配置即可解决

The document is missing this block in nova.conf

[neutron]
url = http://controller:9696
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron_pass

Adding this fixed this issue for my Kilo install.


### 安装 PostgreSQL 数据库 #### 准备环境 为了确保顺利安装,在开始之前需确认系统的准备工作已经完成。这包括但不限于关闭可能影响服务运行的安全设置,如防火墙和 SELinux。 对于防火墙 `firewalld` 的关闭操作可以通过以下命令实现[^3]: ```bash sudo systemctl stop firewalld sudo systemctl disable firewalld ``` 针对 SELinux,则可通过编辑配置文件 `/etc/selinux/config` 将其设为 permissive 或 disabled 模式来达到目的。 #### 下载并验证 PostgreSQL 源码包 前往官方提供的下载页面获取最新版的 PostgreSQL 压缩包,并将其放置于目标路径下。例如,可以使用 wget 工具直接在线下载至指定位置: ```bash wget http://ftp.postgresql.org/pub/source/v12.2/postgresql-12.2.tar.bz2 -P /db/postgresql/soft/ ``` 随后利用 md5sum 对比校验值以保证文件完整性。具体做法是在终端输入如下指令并与官方网站给出的结果相比较: ```bash md5sum postgresql-12.2.tar.bz2 ``` 如果两者一致则说明下载成功且未受损;反之则建议重新尝试下载过程直至匹配为止[^4]。 #### 编译与安装 解压 tarball 文件之后进入解压缩后的目录执行 configure 和 make install 步骤来进行编译构建以及最终安装工作。在此之前还需创建专门用于运行该服务的用户账号及其家目录结构以便后续权限分配更加合理安全。 ```bash tar jxf postgresql-12.2.tar.bz2 -C /usr/local/src/ cd /usr/local/src/postgresql-12.2 ./configure --prefix=/opt/pg12 \ --with-tcl \ --with-openssl \ --enable-debug make && sudo make install ``` 以上命令会将 PostgreSQL 及其相关组件安装到 `/opt/pg12` 中去。当然也可以根据实际情况调整前缀参数指向其他自定义的位置。 最后初始化一个新的集群实例供测试用途: ```bash initdb -D /var/lib/pgsql/data pg_ctl start -D /var/lib/pgsql/data -l logfile createdb mytestdb psql mytestdb ``` 通过上述一系列操作即可顺利完成基于 Red Hat 平台下的 PostgreSQL 数据库搭建任务[^1][^2]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值