2017-12-15 version Lab 3.2 problem
I have retried the labs since the new version based on pike has come out. I have got though to Lab 3.2 step 5, with no errors seen in the ./stack.sh output (and also in the stack.sh.log file):
=========================
DevStack Component Timing
=========================
Total runtime 781
run_process 6
apt-get-update 9
pip_install 330
osc 2
wait_for_service 8
git_timed 132
apt-get 176
=========================
This is your host IP address: 192.168.97.2
This is your host IPv6 address: ::1
WARNING:
Using lib/neutron-legacy is deprecated, and it will be removed in the future
Services are running under systemd unit files.
For more information see:
https://docs.openstack.org/devstack/latest/systemd.html
DevStack Version: pike
Change: 4a85d5d6e040b08e085f9f5752de90a2346df6d1 Move remove_uwsgi_config to cleanup_
placement 2017-12-06 11:31:12 +0000
OS Version: Ubuntu 16.04 xenial
However, when I try and run the nova-manage command as I only see one hypervisor listed, I get the following output:
[email protected]:~/devstack$ source openrc admin
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
[email protected]:~/devstack$ openstack hypervisor list
+----+---------------------+-----------------+--------------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
+----+---------------------+-----------------+--------------+-------+
| 1 | devstack-cc | QEMU | 192.168.97.1 | up |
+----+---------------------+-----------------+--------------+-------+
[email protected]:~/devstack$ nova-manage cell_v2 discover_hosts
An error has occurred:
Traceback (most recent call last):
File "/opt/stack/nova/nova/cmd/manage.py", line 1797, in main
ret = fn(*fn_args, **fn_kwargs)
File "/opt/stack/nova/nova/cmd/manage.py", line 1583, in discover_hosts
hosts = host_mapping_obj.discover_hosts(ctxt, cell_uuid, status_fn)
File "/opt/stack/nova/nova/objects/host_mapping.py", line 206, in discover_hosts
cell_mappings = objects.CellMappingList.get_all(ctxt)
File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 1
84, in wrapper
result = fn(cls, context, *args, **kwargs)
File "/opt/stack/nova/nova/objects/cell_mapping.py", line 137, in get_all
db_mappings = cls._get_all_from_db(context)
File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", l
ine 978, in wrapper
with self._transaction_scope(context):
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", l
ine 1028, in _transaction_scope
context=context) as resource:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", l
ine 633, in _session
bind=self.connection, mode=self.mode)
File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", l
ine 398, in _create_session
self._start()
File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", l
ine 484, in _start
engine_args, maker_args)
File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", l
ine 506, in _setup_for_connection
"No sql_connection parameter is established")
CantStartEngineError: No sql_connection parameter is established
I've checked the local.conf and done several unstack/clean cycles, but am stuck here. What investigation I've managed to do implies the compute-node configuration isn't being added to a cell(?), but this looks to be a bug.
Does ANYONE have any ideas on this.
Comments
Hello,
I just ran the labs and it seems a script is missing important variable. This is the local.conf file on the compute-node
You will note that MYSQL_HOST, and a few others is empty. When the nova-manage command runs it tries to connect to the database to update the hypervisor entry. The local.conf file should have several entries of the variable $SERVICE_HOST. If you reference the lab Exercise 3.2, Install Software on the New Compute Node, step 2 you will see what the local.conf file should look like.
I will report this to the infrastructure folks, to update the script. ./unstack.sh, ./clean.sh, edit the local.conf file and ./stack should fix this issue. I am about to try it right now, just wanted to get you an answer ASAP.
Regards,
Hello again,
In addition to the script issue, which is rolling out now, there has been a change from the DevStack folks on how to add another node to the system. The nova-manage cell_v2 discover_hosts process was a work-around for a previous bug. The new five step process, which I am putting into the course book now, is as follows:
I have just tested this process and it worked upon a fresh load of lab 3.2
Regards,
OK, I have followed these instructions and confirm that they work. Thanks for the quick response.
I have just looked at the full Labs and Solutions doc (from 1.8) and the Specific Lab and Solution doc (from 3.18.b), and they as of now do not have the updated multi-node instructions.
Also RE: the local.conf. I was copy & pasting the example in full Labs and Solutions which I downloaded yesterday (19 Dec), so it DID in fact have the $SERVICE_HOST details included.
Hi:
It takes some time to update the course as it cannot be done in real time (even a small change requires an entire upload) Forums help and I'm sure there will be a new errata file posted shortly It should not be long before there is a new update to the course itself, but we have to let things accumulate for a while.
Yes, the local.conf file in the book was accurate. Due to an issue with the script used to install the lab node the local.conf on the node was inaccurate. As I was troubleshooting the issue I found the book and the node did not match. Should you have restacked without editing the local.conf file on the node it would have continued to fail. If you edited the local.conf with the file from the book then it would have installed correctly, but then would have encountered the five-step update.
Regards,