Ask Your Question
0

Can not start Cirros VM with nova log errors

asked 2019-07-30 02:21:23 -0500

anonymous user

Anonymous

Hi all,

I'm setup minimal Openstack with Rocky release follow this guide: https://docs.openstack.org/install-guide/openstack-services.html#minimal-deployment-for-rocky (https://docs.openstack.org/install-gu...). Everything is ok until when I start VM with Cirros template. When I run command "openstack server create" to create VM and command "openstack server list" to view status of VM, the below error occur in /var/log/nova/nova-api.log log file:


2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping [req-ee5a915f-dfef-4ea6-85d1-4598271e743b ae9c191fc0e14d5583c4dd989919fea0 704be63776224607856b8ce4a5bdfca9 - default default] Failed to parse [database]/connection to format cell mapping: ValueError: invalid literal for int() with base 10: 'novadb'

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping Traceback (most recent call last):

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping File "/usr/lib/python2.7/site-packages/nova/objects/cell_mapping.py", line 137, in format_db_url

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping return CellMapping._format_url(url, CONF.database.connection)

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping File "/usr/lib/python2.7/site-packages/nova/objects/cell_mapping.py", line 106, in _format_url

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping 'port': default_url.port,

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping File "/usr/lib64/python2.7/urlparse.py", line 112, in port

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping port = int(port, 10)

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping ValueError: invalid literal for int() with base 10: 'novadb'

2019-07-30 11:15:55.318 594 ERROR nova.objects.cell_mapping

I have checked file /etc/nova/nova.conf on controller node and see that everything is normal. Please help me to resolve this problem. Bellow are the content of my /etc/nova/nova.conf file, 192.168.11.23 in this file is IP address of controller node:

[DEFAULT]

my_ip=192.168.11.23

use_neutron=true

firewall_driver=nova.virt.firewall.NoopFirewallDriver

enabled_apis=osapi_compute,metadata

transport_url=rabbit://openstack:123456@192.168.11.23

[api]

auth_strategy=keystone

[api_database]

connection=mysql+pymysql://nova:novadb#123@192.168.11.23/nova_api

[barbican]

[cache]

[cells]

[cinder]

os_region_name=RegionOne

[compute]

[conductor]

[console]

[consoleauth]

[cors]

[database]

connection = mysql+pymysql://nova:novadb#123@192.168.11.23/nova

[devices]

[ephemeral_storage_encryption]

[filter_scheduler]

[glance]

api_servers=http://192.168.11.23:9292

[guestfs]

[healthcheck]

[hyperv]

[ironic]

[key_manager]

[keystone]

[keystone_authtoken]

auth_url = http://192.168.11.23:5000/v3

memcached_servers=192.168.11.23:11211

auth_type=password

project_domain_name = Default

user_domain_name = Default

project_name = service

username = nova

password = 123456

[libvirt]

[matchmaker_redis]

[metrics]

[mks]

[neutron]

url=http://192.168.11.23:9696

service_metadata_proxy=true

metadata_proxy_shared_secret = 123456

auth_type=password

auth_url=http://192.168.11.23:5000

project_name=service

project_domain_name=default

username=neutron

user_domain_name=default

password=123456

region_name=RegionOne

[notifications]

[osapi_v21]

[oslo_concurrency]

lock_path=/var/lib/nova/tmp

[oslo_messaging_amqp]

[oslo_messaging_kafka]

[oslo_messaging_notifications]

[oslo_messaging_rabbit]

[oslo_messaging_zmq]

[oslo_middleware]

[oslo_policy]

[pci]

[placement]

auth_type=password

auth_url=http://192.168.11.23:5000/v3

project_name=service

project_domain_name=Default

username=placement

user_domain_name=Default

password=123456

region_name=RegionOne

[placement_database]

connection=mysql+pymysql://nova:novadb#123@192.168.11.23 ... (more)

edit retag flag offensive close merge delete

Comments

I have the feeling something is wrong with your Python setup, because I would expect the URL to be parsed by urlparser.py from the paste package. Your stacktrace, however, includes /usr/lib64/python2.7/urlparse.py instead.

Perhaps removing or (safer) renaming this file helps?

Bernd Bausch gravatar imageBernd Bausch ( 2019-07-30 03:45:03 -0500 )edit

Hi Bernd Bausch, Thanks for your reply. I don't think have the wrong with Python setup, because if python have problem then when I start or restart Nova service on controller the errors will occur. But everything is ok until I use openstack command to create or list VM.

duanlc gravatar imageduanlc ( 2019-07-30 04:01:52 -0500 )edit

If you followed the instructions, you have a separate compute node. Starting Nova and other services on the controller has nothing to do with the compute node. I would check if something is wrong on the compute node.

Bernd Bausch gravatar imageBernd Bausch ( 2019-07-30 05:10:51 -0500 )edit
2

Could it be that your database connection string should be in single quotes? The message invalid literal for int() with base 10: 'novadb' seems to be related to your string: connection=mysql+pymysql://nova:novadb#123@192.168.11.23. It may be an invalid character during parsing (maybe the #)?

eblock gravatar imageeblock ( 2019-07-30 06:53:49 -0500 )edit

Thank @eblock,

I have changed to new nova db password without symbol "#" and problem is resolved. I think code of nova service have recognized symbol "#" in password as comment symbol in config file.

duanlc gravatar imageduanlc ( 2019-07-31 05:01:36 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-07-31 05:03:12 -0500

duanlc gravatar image

I have changed to new nova db password without symbol "#" and problem is resolved. I think code of nova service have recognized symbol "#" in password as comment symbol in config file.

edit flag offensive delete link more

Comments

Great, I'm glad I could help!

eblock gravatar imageeblock ( 2019-08-01 02:42:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-07-30 02:21:23 -0500

Seen: 50 times

Last updated: Jul 30