openstack mitaka版dashboard的BUG Security group not found for project

   On the centos7 system, according to the documentation of the openstack mitaka version, after installing all the services step by step, it is found that the virtual machine cannot be created, and an error is reported as soon as it is created. Because of the first contact, I thought it was a configuration problem. If it doesn't work, I reinstall it and reconfigure glance nova dashboard neutron... However, still unable to create virtual machine.

    It can be seen from the documentation that you can use the command line to create a virtual machine, and a dead horse is used as a living horse doctor. Anyway, try it, and it succeeded! Then all the tests pass. Well, I suddenly felt the cause of the problem. The control panel dashboard was not installed properly, so I installed all the services and almost gave up.

    Then there are various modification attempts: 1. Check the configuration file with the official documentation. 2. Check the configuration file with someone who has successfully installed it.
The result of the check is almost the same. No obvious errors or major differences were found. But others can create virtual machines normally.

    Open the log and analyze it line by line. Every time an error is reported, there must be an error like this:
INFO nova.api.openstack.wsgi [req-5ed8bcd7-92f6-43ce-8281-82c4ba9472e8 b6a8a4841f14425a9ef9680f966192b0 9699c6607bf347c4976f4ae592ad4506 - - -] HTTP exception thrown: Security group bb10e460-7729-4ef7-acf2-15f990679fc0 not found for project 9699c6607bf347c4976f4ae592ad4506.



   
    First, from the control panel and from the command line, the create virtual machine operation will issue a request to create a virtual machine to the background, the control panel creation fails, and the command line creation succeeds


nova debug log

from CLI can success
2017-03-07 16:49:22.865 3325 DEBUG nova.api.openstack.wsgi [req-68ba7805-afae-41cf-9619-e0278bbe5f40 670eda15b024423c8ca3619b52614a8f b2fd83925b0a433b82eaac7f40948b4c - - -] Action: 'create', calling method: <bound method ServersController.create of <nova.api.openstack.compute.servers.ServersController object at 0x7e13810>>, body: {"server": {"name": "vm5", "imageRef": "2a2663da-b0dd-4f0b-91a8-3504cec717f9", "key_name": "adminkey", "flavorRef": "1", "max_count": 1, "min_count": 1, "security_groups": [{"name": "default"}]}} _process_stack /usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:696


from horizon failed
2017-03-07 16:47:41.505 3325 DEBUG nova.api.openstack.wsgi [req-2aa372a5-55e9-4bf8-aa21-9d02554e53f0 670eda15b024423c8ca3619b52614a8f b2fd83925b0a433b82eaac7f40948b4c - - -] Action: 'create', calling method: <bound method ServersController.create of <nova.api.openstack.compute.servers.ServersController object at 0x7e13810>>, body: {"server": {"name": "vm5", "imageRef": "2a2663da-b0dd-4f0b-91a8-3504cec717f9", "availability_zone": "nova", "key_name": "adminkey", "flavorRef": "1", "OS-DCF:diskConfig": "AUTO", "max_count": 1, "min_count": 1, "networks": [{"uuid": "e614c5fd-be35-415f-98ea-5b5b70194741"}], "security_groups": [{"name":"681ca58f-2803-4de4-8266-e1e9e232b9c9"}]}} _process_stack /usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:696



Analyze the parameters sent, only one parameter has a big difference:
the parameter value sent by the command line
"security_groups": [{"name": "default"}] The parameter value sent by the control panel "security_groups": [{"name": "681ca58f-2803-4de4-8266-e1e9e232b9c9"}] SQL statement MariaDB [nova]> SELECT *     -> FROM security_groups     -> WHERE security_groups.deleted = 0     -> AND security_groups.project_id = '9699c6607bf347c4976f4ae592ad4506'     ->    AND security_groups .name = '681ca58f-2803-4de4-8266-e1e9e232b9c9'     -> ; Empty set (0.00 sec) the actual data stored in the database MariaDB [nova]> SELECT * FROM security_groups WHERE security_groups.deleted = 0 AND security_groups. project_id = '9699c6607bf347c4976f4ae592ad4506'     ;

















+---------------------+------------+------------+----+---------+-------------+----------------------------------+----------------------------------+---------+
| created_at          | updated_at | deleted_at | id | name    | description | user_id                          | project_id                       | deleted |
+---------------------+------------+------------+----+---------+-------------+----------------------------------+----------------------------------+---------+
| 2017-03-10 08:07:48 | NULL       | NULL       |  681ca58f-2803-4de4-8266-e1e9e232b9c9 | default | default     | b6a8a4841f14425a9ef9680f966192b0 | 9699c6607bf347c4976f4ae592ad4506 |       0 |
+---------------------+------------+------------+- ---+---------+-------------+---------------------- ------------+------------------------------------------------+-- -------+
1 row in set (0.00 sec)


     see no, actually the value of the name field is default, but name=id is used in the query condition, so it is definitely impossible to find it, so There is HTTP exception thrown: Security group bb10e460-7729-4ef7-acf2-15f990679fc0 not found for project 9699c6607bf347c4976f4ae592ad4506. So the creation fails. So this is a bug.

     The small problem of open source software is that it is too loose, no one will charge you money, and no one will be responsible for your problems, but you can get the source code, there is a very friendly circle, you can think of solutions to the problems you encounter , and then pay tribute to everyone.


      But how to solve it, the dashboard in the mikata version of openstack uses openstack-dashboard-9.0.1-1.el7.noarch, and there are no other RPM packages.

       The solution is to install the control panel through the source code, which can perfectly solve this problem. In fact, the openstack mitaka version of the control panel project horizon has four versions. The one installed through the YUM of centos7 is the lowest version, and there are three higher versions. There is no rpm. The detailed installation process is here Install horizon

       from source


Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326612612&siteId=291194637