Ask Your Question
0

heat-api and heat-api-cfn Unknown instance error

asked 2014-12-04 22:41:32 -0500

fresher gravatar image

After installing heat-api heat-api-cfn heat-engine and following the setup guidelines for openstack for ubuntu 14.04

http://docs.openstack.org/icehouse/in... After the configuration when I do

service heat-api restart I get the following message:

stop: Unknown instance: heat-api start/running, process 64603

I get the same message for heat-api-cfn too

I checked the /var/log/upstart logs and found the following error in heat-api.log:

ERROR: Unable to load heat-api from configuration file /etc/heat/api-paste.ini. Got: ImportError('No module named middleware.request_id',)

In heat-api-cfn.log i got the following error:

ERROR: Unable to load heat-api-cfn from configuration file /etc/heat/api-paste.ini. Got: ImportError('No module named osprofiler.web',)

How do i fix these errors?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-12-05 00:51:05 -0500

kashifkarar gravatar image

Hi,

Heat comes with a script which creates (and populates) the needed database for it to work but you need to know your MySQL's root account password. If you've used PackStack, than that is saved as CONFIG_MYSQL_PW in the answers file (/root/packstack-answers* by default). Now run the prepare script:

$ sudo heat-db-setup rpm -y -r ${MYSQL_ROOT_PASSWORD} -p ${HEAT_DB_PASSWORD_OF_CHOICE}

Check in /etc/heat/heat-engine.conf that your database connection string is correct::

sql_connection = mysql://heat:${HEAT_DB_PASSWORD}@localhost/heat

/etc/heat/heat-engine.conf contains a placeholder value for auth_encryption_key which needs to be replaced with a randomly generated key::

sed -i "s/%ENCRYPTION_KEY%/hexdump -n 16 -v -e '/1 "%02x"' /dev/random/" /etc/heat/heat-engine.conf

Now go through the usual steps needed to create a new user, service and endpoint with Keystone and don't forget to source the admin credentials before starting (which are in /root/keystonerc_admin if you've used PackStack)::

$ keystone user-create --name heat --pass ${HEAT_USER_PASSWORD_OF_CHOICE} --tenant-id ${SERVICES_TENANT_ID} $ keystone user-role-add --user heat --role admin --tenant ${SERVICES_TENANT_NAME} $ keystone service-create --name heat --type orchestration $ keystone service-create --name heat-cfn --type cloudformation $ keystone endpoint-create --region RegionOne --service-id ${HEAT_CFN_SERVICE_ID} --publicurl "http://${HEAT_CFN_HOSTNAME}:8000/v1" --adminurl "http://${HEAT_CFN_HOSTNAME}:8000/v1" --internalurl "http://${HEAT_CFN_HOSTNAME}:8000/v1" $ keystone endpoint-create --region RegionOne --service-id ${HEAT_SERVICE_ID} --publicurl "http://${HEAT_HOSTNAME}:8004/v1/%(tenant_id)s" --adminurl "http://${HEAT_HOSTNAME}:8004/v1/%(tenant_id)s" --internalurl "http://${HEAT_HOSTNAME}:8004/v1/%(tenant_id)s"

Note: ${HEAT_HOSTNAME} should be replaced by the hostname or IP address of your Heat host, while %(tenant_id) should remain literally as is in these commands. The various service IDs may be obtained by running the keystone service-list command.

For Grizzly, update the paste files at /etc/heat/heat-api{,-cfn,-cloudwatch}-paste.ini with the credentials just created::

admin_tenant_name = ${SERVICES_TENANT_NAME} admin_user = heat admin_password = ${HEAT_USER_PASSWORD}

For Havana, update the config files at /etc/heat/heat-api{,-cfn,-cloudwatch}.conf with the credentials just created::

admin_tenant_name = ${SERVICES_TENANT_NAME} admin_user = heat admin_password = ${HEAT_USER_PASSWORD}

Note: Check your value for ${SERVICES_TENANT_NAME} carefully, the packstack default tenant is "services", whereas some other install methods (which use /usr/share/openstack-keystone/sample_data.sh) name it "service"

In there you also need to make sure that the following variables are pointing to your Keystone host (127.0.0.1 should just work if you've used PackStack as Keystone is probably installed on the same host)::

service_host = ${KEYSTONE_HOSTNAME} auth_host = ${KEYSTONE_HOSTNAME} auth_uri = http://${KEYSTONE_HOSTNAME}:35357/v2.0 keystone_ec2_uri = http://${KEYSTONE_HOSTNAME}:5000/v2.0/ec2tokens

In /etc/heat/heat-engine.conf you've to make instead sure that the following variables do not point to 127.0.0.1 even though the services are actually hosted on the same system because URLs will be passed over to the VMs, which don't have them available locally::

heat_metadata_server_url = http://${HEAT_CFN_HOSTNAME}:8000 heat_waitcondition_server_url = http://${HEAT_CFN_HOSTNAME}:8000/v1/waitcondition heat_watch_server_url = http://${HEAT_CLOUDWATCH_HOSTNAME}:8003

The application templates can use wait conditions and signaling for the orchestration, Heat needs to create special users to receive the progress data and these users are, by default, given the role of heat_stack_user. You ... (more)

edit flag offensive delete link more

Comments

I am doing a manual configuration of icehouse. following the steps in the link:

http://docs.openstack.org/icehouse/in...

Did all the settings. Still dint work.

fresher gravatar imagefresher ( 2014-12-05 02:38:30 -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: 2014-12-04 22:41:32 -0500

Seen: 571 times

Last updated: Dec 05 '14