I am not running or setting up heat on the same host as mysql and i don't want heat-db-setup to install a local copy of mysql again. There are no visible options from command line to specify a remote mysql server. This is a severe limitation that must be addressed ASAP as it's blocking HA refarch and related deployments. Usage: heat-db-setup <rpm|deb> [options] Options: select a distro type (rpm or debian) --help | -h Print usage information. --password <pw> | -p <pw> Specify the password for the 'heat' MySQL user that will use to connect to the 'heat' MySQL database. By default, the password 'heat' will be used. --rootpw <pw> | -r <pw> Specify the root MySQL password. If the script installs the MySQL server, it will set the root password to this value instead of prompting for a password. If the MySQL server is already installed, this password will be used to connect to the database instead of having to prompt for it. --yes | -y In cases where the script would normally ask for confirmation before doing something, such as installing mysql-server, just assume yes. This is useful if you want to run the script non-interactively. Also, this kind of tool is totally inconsistent with every single other tool in openstack to handle mysql connections.
Also, this is the first tool asking me for my mysqlroot password. All others tools are happy enough to have the admin create the basic db and grant user privileges.
Steve mentioned on IRC not to use this tool, but this is what we are advertising to customers: https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/4/html/Installation_and_Configuration_Guide/sect-Configuring_the_Orchestration_Service.html as official tool to fill the db.
Fabio, When I reviewed the docs, I really just didn't think about openstack-utils in the context of installation. It was clearly an oversight. I believe the right answer is a zstream of the documentation modified to work with openstack-utils. If there are gaps in openstack-utils for heat functionality, we should fill those first ;-)
Jeff, Can you see if openstack-utils can be used for the documented operations in the comment #2 link. If so, please advise what the invocations are. Note the priority is urgent (the bug has been triaged), so please have a look when you return from Christmas shutdown at your earliest convenience. Thanks -steve
(In reply to Steven Dake from comment #3) > Fabio, > > When I reviewed the docs, I really just didn't think about openstack-utils > in the context of installation. It was clearly an oversight. I believe the > right answer is a zstream of the documentation modified to work with > openstack-utils. If there are gaps in openstack-utils for heat > functionality, we should fill those first ;-) I am of course all up for fixing docs, but I also need ASAP the correct process to fill the DB for heat as this is a blocker for different reasons. As you mentioned on IRC, if this tool is only for developers, then please don't ship it. It's just broken and has no reasons to exists :)
I have confirmed that openstack-db is a suitable replacement for heat-db-setup. I took an existing RHOS installation, dropped the heat db, and then ran: openstack-db --service heat --init --password <user pw> --rootpw <root pw> Stack creation and listing was successful. Examining both scripts seem to have the same functionality, except heat-db-setup logs slightly differently as indicated here: https://bugs.launchpad.net/heat/+bug/1191925. As noted in the bug though, this would only be a problem with log_dir defined, which in the package it isn't. Note the following text from the openstack-db tool: Set up a local database (MySQL) for use with openstack-<service>. This script will create a '<service>' database that is accessible only on localhost by user '<service>' with password '<service>'. The setup of a database with a multi-server OpenStack installation is outside of the scope of this simple helper script. As far as I can tell using a remote database is not going to be achievable/supported when installing OpenStack manually.
(In reply to Jeff Peeler from comment #6) > I have confirmed that openstack-db is a suitable replacement for > heat-db-setup. I took an existing RHOS installation, dropped the heat db, > and then ran: > > openstack-db --service heat --init --password <user pw> --rootpw <root pw> > > Stack creation and listing was successful. > > Examining both scripts seem to have the same functionality, except > heat-db-setup logs slightly differently as indicated here: > https://bugs.launchpad.net/heat/+bug/1191925. > As noted in the bug though, this would only be a problem with log_dir > defined, which in the package it isn't. > > > Note the following text from the openstack-db tool: > > Set up a local database (MySQL) for use with openstack-<service>. > This script will create a '<service>' database that is accessible > only on localhost by user '<service>' with password '<service>'. > The setup of a database with a multi-server OpenStack installation > is outside of the scope of this simple helper script. > > As far as I can tell using a remote database is not going to be > achievable/supported when installing OpenStack manually. Then I need a way to setup the heat db in a consistent way as other openstack services. Please take a look at how keystone or nova or glance db installation is documented and performed. I can surely start from this few instructions and work around the limitations to move forward, but it is a terrible user experience to have to figure out how sql works internally to do scalable installations.
@Fabio Massimo Di Nitto How are you initializing the DB for other OpenStack services? Have you tried using "heat-manage db_sync", which is the supported way to create the DB schema, using the mysql connection details from /etc/heat/heat.conf? AFAIK heat-manage db_sync is consistent with how all other openstack services work, but if it doesn't meet your requirements, please provide details explaining your use-case, and how it's achieved with other OpenStack services.
(In reply to Steven Hardy from comment #8) > @Fabio Massimo Di Nitto > > How are you initializing the DB for other OpenStack services? Using the official docs from docs.redhat.com: https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/4/html/Installation_and_Configuration_Guide/index.html > > Have you tried using "heat-manage db_sync", which is the supported way to > create the DB schema, using the mysql connection details from > /etc/heat/heat.conf? No because it's not officially documented. This is not a test-and-try setup/exercise I am going through. This is a "take openstack and build it on top of High Availability/Load Balancer solution to implement into foreman/packstack" work. > > AFAIK heat-manage db_sync is consistent with how all other openstack > services work, but if it doesn't meet your requirements, please provide > details explaining your use-case, and how it's achieved with other OpenStack > services. But it is not documented.. hence it's a moot point because who follows manual install will not find it :)
I suggest we remove heat-db-setup from the distributed RPMs. This bug will be used to track that activity. This will depend on documenting the solution in Bug 1048035.
*** Bug 1046331 has been marked as a duplicate of this bug. ***
*** Bug 1046327 has been marked as a duplicate of this bug. ***
I rechecked the commands staged for documentation release, which was based off https://bugzilla.redhat.com/show_bug.cgi?id=1048035#c4. Heat database creation and sync was successful.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2014-0090.html