[原][openstack-pike][controller node][issue-4][horizon] dashboard access too low reasons[dashboard 访问太慢]

时间:2024-07-15 11:37:50

本文持续更新。。。

原因一:  访问dashboard 很慢. 输入了用户名和密码还有project后,一直处于首页状态,等很久才进入(暂且不考虑硬件。硬件暂时假设都满足条件)

首先想到的是memcache缓存,之前如果登录了之后,应该有缓存。

查看官网有这么一句话:

[原][openstack-pike][controller node][issue-4][horizon] dashboard access too low reasons[dashboard 访问太慢]

再检查下配置(on controller node):

[原][openstack-pike][controller node][issue-4][horizon] dashboard access too low reasons[dashboard 访问太慢]

    果然是只有controller本机使用127.0.0.1才能访问,如果按照上面这样配置,则所有节点的服务都不能正常访问到memcache。而这些服务

需要先request memcached失败后才会做其他操作,所有会造成慢的情况。因此,需要改为下面这样的情况:

PORT=""
USER="memcached"
MAXCONN=""
CACHESIZE=""
OPTIONS="-l 0.0.0.0"

再重新启动 memcache:

[root@controller ~]# systemctl restart memcached
[root@controller ~]# systemctl status memcached
● memcached.service - memcached daemon
Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
Active: active (running) since Fri -- :: CST; 14s ago
Main PID: (memcached)
Tasks:
CGroup: /system.slice/memcached.service
└─ /usr/bin/memcached -p -u memcached -m -c -l 0.0.0.0 Sep :: controller systemd[]: Started memcached daemon.
Sep :: controller systemd[]: Starting memcached daemon...

其他参考点:  1.  数据库连接数太小?

查看连接数为4096,相对来说不小

[root@controller ~]# vim /etc/my.cnf.d/mariadb-server.cnf
max_connections =

2. Token过期问题也不存在,

[root@controller keystone]# cat keystone.conf
[fernet_tokens]
provider = fernet

查询官网(https://docs.openstack.org/keystone/latest/admin/identity-fernet-token-faq.html#where-do-i-put-my-key-repository)

[原][openstack-pike][controller node][issue-4][horizon] dashboard access too low reasons[dashboard 访问太慢]

fernet token 不会存在数据库里面:

MariaDB [(none)]> use keystone;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
MariaDB [keystone]> select * from token;
Empty set (0.00 sec)

================================================================================================================

【开始问题排查:】

查看登录所用的时间: 122069ms 约等于 2分多钟

[原][openstack-pike][controller node][issue-4][horizon] dashboard access too low reasons[dashboard 访问太慢][原][openstack-pike][controller node][issue-4][horizon] dashboard access too low reasons[dashboard 访问太慢]

  [原][openstack-pike][controller node][issue-4][horizon] dashboard access too low reasons[dashboard 访问太慢]

再抓包看看:

tcpdump -i ens35 -n -s 0  -w /root/cap.cap

待续。。。