This is the 29th day of my participation in the Gwen Challenge in November. Check out the details: The last Gwen Challenge in 2021


6.3 Controller Node -Nova Computing Service component

More steps: OpenStack Victoria Installation and Deployment series tutorials

Fusionsphere OpenStack Victoria Offline Installation and Deployment guide fusionsphere OpenStack Ussuri Offline installation and deployment Guide fusionsphere OpenStack Train Offline installation and deployment Guide fusionsphere OpenStack Train Offline installation and deployment Guide


@[TOC] ** Note: ** After the compute node is installed and configured, verify the configuration on the controller node

Add a compute node to the Cell database

1. Check the nova-compute service on the controller node

Start by loading the environment variable script source /admin-openrc.sh

source admin-openrc.sh 
Copy the code
openstack compute service list
openstack compute service list --service nova-compute
Copy the code

2. Synchronize compute nodes

su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
Copy the code

Set the discovery interval and edit the vim /etc/nova/nova.conf file. When you later add more new compute nodes, you must run the above two commands on the controller node to register these new compute nodes on the controller node. In addition, you can set the automatic registration task for the new node in the controller node /etc/nova.conf.

crudini --set /etc/nova/nova.conf scheduler discover_hosts_in_cells_interval 300
Copy the code

Execute at this pointnova service-listCommand, and before6.1 Deployment DocumentsThere are two more compute services:

Once installed, you need to test to check the status of the computing service

Verify the running of the computing service

1. Load environment variables

cd 
source admin-openrc.sh
Copy the code

2. List service components

To verify the successful startup and registration of each process

openstack compute service list
Copy the code

This output should indicate two service components enabled on the controller node and one enabled on the compute node.

3. List the API endpoints in the identity service

To verify connectivity to the identity service

openstack catalog list
Copy the code

Note: The list of endpoints may vary depending on the installation of OpenStack components. Ignore any warnings in this output.

4. List the mirrors in the mirror service

To verify connectivity to the mirroring service

openstack image list
Copy the code

5. Check the status of nova components

Check that the Placement API and Cell services are working properly

nova-status upgrade check
Copy the code

Error handling

[root@controller ~]# nova-status upgrade check
Error:
Traceback (most recent call last):
  File "/ usr/lib/python3.6 / site - packages/nova/CMD/status. Py." ", line 495, in main
    ret = fn(*fn_args, **fn_kwargs)
  File "/ usr/lib/python3.6 / site - packages/oslo_upgradecheck/upgradecheck. Py." ", line 102, in check
    result = func(self)
  File "/ usr/lib/python3.6 / site - packages/nova/CMD/status. Py." ", line 164, in _check_placement
    versions = self._placement_get("/")
  File "/ usr/lib/python3.6 / site - packages/nova/CMD/status. Py." ", line 154, in _placement_get
    return client.get(path, raise_exc=True).json()
  File "/ usr/lib/python3.6 / site - packages/keystoneauth1 / adapter. Py." ", line 395, in get
    return self.request(url, 'GET', **kwargs)
  File "/ usr/lib/python3.6 / site - packages/keystoneauth1 / adapter. Py." ", line 257, in request
    return self.session.request(url, method, **kwargs)
  File "/ usr/lib/python3.6 / site - packages/keystoneauth1 / session. Py." ", line 976, in request
    raise exceptions.from_response(resp, method, url)
keystoneauth1.exceptions.http.Forbidden: Forbidden (HTTP 403)

Copy the code

To solve

[root@controller ~]# cp /etc/httpd/conf.d/00-placement-api.conf /etc/httpd/conf.d/00-placement-api.conf.bak
[root@controller ~]# vim /etc/httpd/conf.d/00-placement-api.conf
Copy the code

Add it under #SSLCertificateKeyFile

#Placement API
<Directory /usr/bin>
   <IfVersion >= 2.4>
      Require all granted
   </IfVersion>
   <IfVersion < 2.4>
      Order allow,deny
      Allow from all
   </IfVersion>
</Directory>
Copy the code

Restart the HTTPD service

[root@controller ~]# systemctl restart httpd
[root@controller ~]# nova-status upgrade check
JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
+-------------------------------------------+
| Upgrade Check Results                     |
+-------------------------------------------+
| Check: Cells v2                           |
| Result: Success                           |
| Details: None                             |
+-------------------------------------------+
| Check: Placement API                      |
| Result: Success                           |
| Details: None                             |
+-------------------------------------------+
| Check: Ironic Flavor Migration            |
| Result: Success                           |
| Details: None                             |
+-------------------------------------------+
| Check: Cinder API                         |
| Result: Success                           |
| Details: None                             |
+-------------------------------------------+
| Check: Policy Scope-based Defaults        |
| Result: Success                           |
| Details: None                             |
+-------------------------------------------+
| Check: Policy File JSON to YAML Migration |
| Result: Success                           |
| Details: None                             |
+-------------------------------------------+
| Check: Older than N-1 computes            |
| Result: Success                           |
| Details: None                             |
+-------------------------------------------+
[root@controller ~]# 
Copy the code

The Nova computing service verification is complete on the controller node

The Nova computing service has been installed on controller nodes and compute nodes and added to an OpenStack cluster.

When a new compute node is added, install the compute node and verify the controller node.

With VMware virtual machines, control nodes and individual compute nodes can now be shut down to take snapshots.

poweroff
Copy the code