Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1132494

Summary: upgrade: if we run openstack-db --service neutron --update in all hosts running networking service as guide suggested we would get an error
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: doc-UpgradeAssignee: Don Domingo <ddomingo>
Status: CLOSED CURRENTRELEASE QA Contact: RHOS Documentation Team <rhos-docs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 6)CC: ddomingo, yeylon
Target Milestone: ---Keywords: Documentation
Target Release: 5.0 (RHEL 6)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-19 03:27:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dafna Ron 2014-08-21 12:48:52 UTC
Description of problem:

# openstack-db --service neutron --update should be run on the host where the neutron db exists on. 

if we try to run it on 'the controller node and all other hosts running OpenStack Networking services' as the guide suggests we would get the following error on a host that does not have the db installed: 

root@greta ~]# openstack-db --service neutron --update
No handlers could be found for logger "neutron.common.legacy"
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 169, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 60, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/alembic/command.py", line 189, in current
    script.run_env()
  File "/usr/lib/python2.6/site-packages/alembic/script.py", line 191, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.6/site-packages/alembic/util.py", line 186, in load_python_file
    module = imp.load_source(module_id, path, open(path, 'rb'))
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/env.py", line 103, in <module>
    run_migrations_online()
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/env.py", line 76, in run_migrations_online
    poolclass=pool.NullPool)
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/__init__.py", line 332, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/strategies.py", line 48, in create
    u = url.make_url(name_or_url)
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/url.py", line 164, in make_url
    return _parse_rfc1738_args(name_or_url)
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/url.py", line 212, in _parse_rfc1738_args
    "Could not parse rfc1738 URL from string '%s'" % name)
sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string ''
Can't determine the existing sync level.
Please ensure the database is running and already initialised.

can we please change the guide to run the following commands on 'the controller node and all other hosts running OpenStack Networking services': 

# openstack-service stop neutron
# yum -d1 -y upgrade \*neutron\*

and this command on the controller/host that has db installed on: 

# openstack-db --service neutron --update

* this is taken from guide: http://docbuilder.usersys.redhat.com/22894/

Comment 1 Don Domingo 2014-08-22 04:02:45 UTC
Done, setting NEEDINFO=Dafna for review:

http://docbuilder.usersys.redhat.com/22897/#sect-Upgrade_Networking_Service
http://docbuilder.usersys.redhat.com/22894/#sect-Upgrade_Networking_Service

Also added note that the neutron DB would also be typically installed in the neutron node.