Bug 1046326 - remove heat-db-setup from openstack-heat packaging
Summary: remove heat-db-setup from openstack-heat packaging
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 4.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: z1
: 4.0
Assignee: Jeff Peeler
QA Contact: Jeff Peeler
URL:
Whiteboard:
: 1046327 1046331 (view as bug list)
Depends On: 1048035
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-24 14:58 UTC by Fabio Massimo Di Nitto
Modified: 2022-07-09 06:16 UTC (History)
7 users (show)

Fixed In Version: openstack-heat-2013.2.1-3.el6ost
Doc Type: Bug Fix
Doc Text:
This change removes the outdated heat-db-setup tool, which only supported local installs. The Installation and Configuration Guide has been updated to show how to create the necessary database and associated tables for Orchestration which allows one to deploy the database server on a local or remote system (Installing the OpenStack Orchestration Service).
Clone Of:
: 1048035 (view as bug list)
Environment:
Last Closed: 2014-01-22 18:33:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0090 0 normal SHIPPED_LIVE Moderate: openstack-heat security, bug fix, and enhancement update 2014-01-22 23:31:23 UTC

Description Fabio Massimo Di Nitto 2013-12-24 14:58:20 UTC
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.

Comment 1 Fabio Massimo Di Nitto 2013-12-24 15:00:54 UTC
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.

Comment 2 Fabio Massimo Di Nitto 2013-12-25 07:09:21 UTC
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.

Comment 3 Steven Dake 2013-12-25 15:19:16 UTC
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 ;-)

Comment 4 Steven Dake 2013-12-25 15:22:03 UTC
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

Comment 5 Fabio Massimo Di Nitto 2013-12-25 15:45:28 UTC
(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 :)

Comment 6 Jeff Peeler 2014-01-02 18:29:26 UTC
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.

Comment 7 Fabio Massimo Di Nitto 2014-01-02 18:35:58 UTC
(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.

Comment 8 Steven Hardy 2014-01-02 19:10:27 UTC
@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.

Comment 9 Fabio Massimo Di Nitto 2014-01-03 00:19:39 UTC
(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 :)

Comment 10 Steven Dake 2014-01-03 00:36:40 UTC
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.

Comment 13 Steven Dake 2014-01-06 17:06:16 UTC
*** Bug 1046331 has been marked as a duplicate of this bug. ***

Comment 14 Steven Dake 2014-01-06 19:41:05 UTC
*** Bug 1046327 has been marked as a duplicate of this bug. ***

Comment 17 Jeff Peeler 2014-01-13 20:37:11 UTC
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.

Comment 19 errata-xmlrpc 2014-01-22 18:33:47 UTC
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


Note You need to log in before you can comment on or make changes to this bug.