关于openstack 安装centos-release-openstack-ocata失败解决

关于openstack 安装centos-release-openstack-ocata失败解决

openstack ocata版本在后期增加节点的时候,安装centos-release-openstack-ocata失败。ocata版本安装参考

centos-release-openstack-ocata 错误提示

安装centos-release-openstack-ocata前系统版本centos 7.4,在yum安装的时候提示:

1
2
3
4
5
6
7
8
9
yum install centos-release-openstack-ocata

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
No package centos-release-openstack-ocata available.
Error: Nothing to do

经过查询得知,阿里云extras已经取消 centos-release-openstack-ocata的支持,于是乎怎么办。手动下载二进制包来进行安装。

下载centos-release-openstack-ocata相关组件

centos 7.4对应下载地址

1
2
3
4
5
wget http://vault.centos.org/7.4.1708/extras/x86_64/Packages/centos-release-openstack-ocata-1-2.el7.noarch.rpm
wget http://vault.centos.org/7.4.1708/extras/x86_64/Packages/centos-release-ceph-jewel-1.0-1.el7.centos.noarch.rpm
wget http://vault.centos.org/7.4.1708/extras/x86_64/Packages/centos-release-qemu-ev-1.0-2.el7.noarch.rpm
wget http://vault.centos.org/7.4.1708/extras/x86_64/Packages/centos-release-storage-common-1-2.el7.centos.noarch.rpm
wget http://vault.centos.org/7.4.1708/extras/x86_64/Packages/centos-release-virt-common-1-1.el7.centos.noarch.rpm

安装对应的插件

1
rpm -ivh *.rpm

上述的几条命令可以使用一下方式进行快速的安装

1
2
wget http://vault.centos.org/7.4.1708/extras/x86_64/Packages/centos-release-openstack-ocata-1-2.el7.noarch.rpm
yum -y install centos-release-openstack-ocata-1-2.el7.noarch.rpm

清理缓存

1
2
yum clean all
yum cachemake

yum cachemake的时候又提示了错误。HTTP Error 404 - Not Found,具体错误如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.cn99.com
base | 3.6 kB 00:00:00
centos-ceph-jewel | 2.9 kB 00:00:00
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-ocata/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



One of the configured repositories failed (CentOS-7 - OpenStack ocata),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=centos-openstack-ocata ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable centos-openstack-ocata
or
subscription-manager repos --disable=centos-openstack-ocata

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=centos-openstack-ocata.skip_if_unavailable=true

failure: repodata/repomd.xml from centos-openstack-ocata: [Errno 256] No more mirrors to try.
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-ocata/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

于是打开http://mirror.centos.org/centos/7/cloud/x86_64此链接地址,发现已经没有了openstack-ocata,所以才会导致失败。功夫不负有心人,终于在google找到一个有用的地址。

修改OpenStack-ocata.repo

修改/etc/yum.repos.d/CentOS-OpenStack-ocata.repo文件里面的baseurl地址,修改内容如下:

1
2
3
4
5
6
7
8
[centos-openstack-ocata]
name=CentOS-7 - OpenStack ocata
#baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-ocata/
baseurl=http://mirror.neu.edu.cn/centos/7/cloud/$basearch/openstack-ocata/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
exclude=sip,PyQt4

完成后执行yum makecachecentos-release-openstack-ocata成功。可以打开mirror.neu.edu.cn查看是否有openstack-ocata
img

更新

1
2
3
4
5
yum upgrade
# 执行以后内容会从之前的centos 7.4 升级为 CentOS Linux release 7.7.1908 (Core)

# 重启
reboot

安装相关插件

1
2
3
yum install python-openstackclient openstack-selinux

yum install openstack-nova-compute conntrack libguestfs-tools
坚持原创技术分享,您的支持将鼓励我继续创作!
0%