try packstack the 3rd
接上篇,在创建cirros实例终于可以成功了之后,来看一下实例的具体启动过程。
cirros(0.5.1)可以dhcp获取网络信息,但是Ping不通gateway,也获取不到instance-id。
以下从dashboard的实例的日志中截取(对应的命令 openstack console log show cirros-admin2)
Starting network: udhcpc: started, v1.29.3
...
checking http://169.254.169.254/2009-04-04/instance-id
failed 1/20: up 8.62. request failed
failed to read iid from metadata. tried 20
failed to get instance-id of datasource
...
### ping -c 5 10.10.0.1
PING 10.10.0.1 (10.10.0.1): 56 data bytes
--- 10.10.0.1 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
同时,从实例的控制台也连不上(修改了URL里的内网IP为EIP)。报错
2023-04-04 00:00:58.594 17054 INFO nova.console.websocketproxy [req-21f249af-2465-4648-9ad7-2d55bf90da72 - - - - -] 36: connect info: ConsoleAuthToken(access_url_base='http://10.0.0.100:6080/vnc_auto.html',console_type='novnc',created_at=2023-04-03T16:00:36Z,host='ecs-tos.openstacklocal',id=8,instance_uuid=6f2f9012-27a8-47e2-ab2b-3f325465c682,internal_access_path=None,port=5900,token='***',updated_at=None)
2023-04-04 00:00:58.594 17054 INFO nova.console.websocketproxy [req-21f249af-2465-4648-9ad7-2d55bf90da72 - - - - -] 36: connecting to: ecs-tos.openstacklocal:5900
2023-04-04 00:00:58.603 17054 INFO nova.console.websocketproxy [req-21f249af-2465-4648-9ad7-2d55bf90da72 - - - - -] handler exception: [Errno -2] Name or service not known
先解决Ping不通网关
的问题,建立路由器,与子网连接,作为网关的角色:
openstack router create admin-router
openstack router add subnet admin-router admin-private-subnet
然后重启cirros实例,日志显示有了进展:(诊断信息没输出了,但是应该网关是可以Ping通,而且从169.254.169.254获取instace-id
也正常了)
checking http://169.254.169.254/2009-04-04/instance-id
successful after 1/20 tries: up 7.59. iid=i-00000002
failed to get http://169.254.169.254/2009-04-04/meta-data/public-keys
warning: no ec2 metadata for public-keys
failed to get http://169.254.169.254/2009-04-04/user-data
warning: no ec2 metadata for user-data
ip-route:169.254.169.254 via 10.10.0.1 dev eth0
#这条信息证明了确实要通过网关去路由,才能访问169.254.169.254的
但是,仍然从控制台连不上实例,nova-novnc报错和前面一样。
在/etc/hosts里添加一行,解决了这个报错:
127.0.0.1 ecs-tos.openstacklocal
最后剩一个Nova的2个组件启动失败(均是连不上http://10.0.0.100:5000/v3/auth/tokens),需要手工重启的问题
/usr/lib/systemd/system目录下直接修改schedule和conductor,反正我也不会升级了,不怕修改丢失
After=syslog.target network.target
后面加个httpd.service
,因为keystone
在这里是以httpd的应用的形式启动的,不是单独作为systemd的服务管理的
所以做好这个先后顺序后,看是不是好了
感觉这个packstack train版本不是很成熟啊,是不是我版本选的不好…
- 点赞
- 收藏
- 关注作者
评论(0)