224 Commits

Author SHA1 Message Date
JUNJIE NAN
a055c1b6a9 Remove die_if_not_set check for var user_roles
Since the later logic will add role if the user role is not
found. "die_if_not_set" check will exit the main script.

Closes-Bug: #1389714

Change-Id: I995cf357d09267fee55e44575e3e301bcffebca3
2014-11-05 15:09:39 +01:00
Angus Salkeld
a98d2c9c5d Add OSprofiler integration into Heat
This adds builtin rpc and db traces to Heat, as well as
some toplevel stack methods to aid in reading the output.

A 'profiler' config group is added to enable profiling.

Change-Id: Ie5c1c8f1931f59e4d4bcf1ec3b791f55984eb6d2
Closes-bug: #1363782
2014-10-03 15:40:25 +10:00
Steven Hardy
4a461038a4 Remove cinder-keystone-setup script
This is a legacy script from the tools/openstack days, so we don't
need it now as that script no longer exists.

Change-Id: Iddcd76739447e65fcbf4f4bac517cf4fd919fac9
Closes-Bug: #1376712
2014-10-02 17:10:10 +01:00
Jenkins
1ab14e0eda Merge "Improve error handling in api files" 2014-09-29 20:35:21 +00:00
Sergey Kraynev
8faef30895 Improve error handling in api files
Change-Id: Ib9dccf5641d72aa5d16ad3179d0df030c7664fa6
Closes-Bug: #1364018
2014-09-25 08:08:18 -04:00
Angus Salkeld
33eb87b3e2 Add an option to disable cloud watch lite
This also adds a deprecation warning.
This also changes the default to use Ceilometer.

Release message:
Anyone deploying Heat should not be using OS::Heat::CWLiteAlarm, but
OS::Ceilometer::Alarm.
CWLiteAlarm should be explictly disabled in /etc/heat/heat.conf by
setting "enable_cloud_watch_lite=false". This will stop Heat from
running a period task check for alarms.

DocImpact
Change-Id: I2a10c14772bdafc001e211d7e94502ac1f6b32b1
Closes-bug: #1322128
2014-09-25 19:42:28 +10:00
Ethan Lynn
d5c449ab32 Import oslo.i18n and port heat bins to use oslo.i18n
Import oslo.i18n and port heat bins to use oslo.i18n

blueprint oslo-i18n

Change-Id: If30df87d7d2b8047225f0c413d338ace975062b1
2014-09-02 10:53:14 +08:00
Steve Baker
d70da16894 Detect neutron endpoint on-the-fly
This change does the following:
- reverts commit 04de60093b602c2eac4a612df5d4a2e31424a25d
- reimplements Resource.is_using_neutron to check for neutron by
  attempting to create a neutron client
- fix mocking in tests for changes which landed after 04de600

If there is no 'network' entry in the service catalog then
keystoneclient will raise an EndpointNotFound. The context will
already have a keystone client cached which has a full service catalog
locally, so calling is_using_neutron should have no particular overhead.

This fixes a tripleo regression where the autodetection is triggered
before keystone is ready, so that heat-engine fails to start. This
race does not affect devstack as keystone is fully configured before
heat services are started.

Not adding config option networking_service will also prevent
extra work required by downstream installation tools.

Change-Id: I45a6154fa560f672d8d1942bf57f39601110bfc6
Closes-Bug: #1362812
2014-08-29 11:11:59 +12:00
Pavlo Shchelokovskyy
04de60093b Allow to decide between Nova-network and Neutron
Adds a heat.conf option to set the OpenStack component responsible for
networking, and makes heat-engine auto-discover the networking service
on start up if such option is not set.
Also adds a convenience method to Resource class to let resources decide
what networking service to use.

Implements blueprint discover-networking-service

Change-Id: If7121089068cc2d2774bedb73e4e252b520eb5b3
2014-08-27 16:41:25 +03:00
Jenkins
90ceb492c7 Merge "Silence urllib3 redundant logging." 2014-08-23 16:34:03 +00:00
Jenkins
7b010ce90c Merge "Privilege checking for heat-keystone-setup-domain" 2014-08-18 09:22:54 +00:00
tengqm
4155c1e588 Silence urllib3 redundant logging.
This patch makes the default logging level of heat-keystone-setup-domain
to be WARNING and the 'urllib3.connectionpool' logging level to be
WARNING as well.

The intent is to remove unncecessary logging information from urllib3
library.

Closes-Bug: 1358093
Change-Id: I650e80aa1093c8c7e7c5dac3694d58139d2ec260
2014-08-18 12:39:56 +08:00
tengqm
a68e08cb47 Privilege checking for heat-keystone-setup-domain
This patch added additional exception handling so that a non-admin user
will understand why his/her attempt to run this script failed.

Change-Id: I20a593f613931de0b3c13094a2e0b6c2f2b0eea1
Closes-Bug: 1354687
2014-08-18 10:58:26 +08:00
aivanitskiy
9ed313a8be Fix typos in comments and help strings
Change-Id: I68446dd652186191d19551032a634aee03f9e637
2014-08-13 13:54:24 +04:00
Jenkins
8249ed170f Merge "Refactor service readiness notification" 2014-08-08 08:17:57 +00:00
Jenkins
b6304d4f8d Merge "Stop overriding CONF.default_log_levels per binary" 2014-07-17 10:41:31 +00:00
Alan Pevec
46d6b9306c Refactor service readiness notification
Build upon cceda95a35f18f5f7b52daaf0662a4cd3768b3ac apply Oslo systemd
module. It was imported in aef33d2d716c064f1f571c334fd36b1ea5928d5c. It
also drops heat.common.systemd and deprecates onready configuration
parameter.

Oslo commit 53e1214c092f09e3851b1a1b55289a93a72b09ec

Change-Id: I80f325c9be9c171c2dc8d5526570bf64f0f87c78
2014-07-16 11:01:52 +02:00
Morgan Fainberg
7354e68bde Support using domain_name instead of domain_id
When using keystoneclient (heat.common.heat_keystoneclient) to
perform actions, support the use of domain_name instead of
exclusively domain_id.

The new config option to use domain_name instead of domain_id
is ``stack_user_domain_name``. If ``stack_user_domain_id`` option
is set (renamed from ``stack_user_domain``), the new
domain_name-specific option will be ignored.

Change-Id: I0d3937a98b95100ccaaaf7a46d3ed722aba27de3
Closes-Bug: #1313003
2014-07-02 13:30:28 -07:00
Jenkins
0aaf6133b8 Merge "use register_cli_opts instead of register_opts" 2014-07-02 15:40:24 +00:00
Kanagaraj Manickam
35cf2f7a3b Don't expose password in heat-keystone-setup-domain logs
heat-keystone-setup-domain is logging
the password to the log file. This patch
removes the logging as it's security concerns

Change-Id: I0f017a9c114ac60ea9f5e0df012334ead8cb434a
Closes-bug: #1336225
2014-07-02 14:21:23 +05:30
Kanagaraj Manickam
55a4802b80 use register_cli_opts instead of register_opts
oslo.config provides api register_cli_opts
to register multiple opts at once and same
is used in this patch to replace the
register_opts

Change-Id: I80b9bf37308c9e7085947200bc7c393c15e5e29d
Closes-bug: #1336224
2014-07-01 22:42:03 +05:30
Thomas Herve
9090b988e6 Port to oslo.messaging
Move from oslo RPC to oslo.messaging.

Implements: blueprint oslo-messaging
Co-Authored-By: sdake@redhat.com
Change-Id: I2d222c248dd2cd405b8ec35c4c8198ed001fb69f
2014-06-26 06:45:52 +02:00
Joe Gordon
8208c64df3 Stop overriding CONF.default_log_levels per binary
Overriding CONF.default_log_levels means we loose some explicitly set
default values such as 'iso8601=WARN'. Also explicitly overriding
CONF.default_log_levels means that default_log_levels cannot be set in a
config file.

Change-Id: Ib5103b88ec3f9ccd9d516032c6a13dc2fa4bcb5e
2014-06-17 15:43:43 -07:00
Steven Hardy
507555a585 Move Engine initialization into service start()
Currently we create the ThreadGroupManager and EngineListener
objects in the service constructor, which is not necessarily
going to work if multiple worker processes are specified in
the config file (which fork multiple workers after the constructor).

The ThreadGroupManager appears to work, even when it is created before
the fork, but this is due to some magic in the oslo ProcessLauncher
implementation which decouples parent/child use of the eventlet hub.

So instead, we move all service startup code into the start() method,
which is the entry point for services, triggered via the oslo Services
class run_service method:

- Don't create anything common to the workers in the constructor
- Move ThreadGroup and EngineListener creation into start()
- Create the periodic tasks from bin/heat-engine, which means
  the periodic tasks will only be created by the parent, not
  duplicated in every worker process.

These changes should mean we work correctly with both the ServiceLauncher
(num_engine_workers==1) and ProcessLauncher(num_engine_workers>1) oslo
abstractions, and solves the issues observed when running multiple
workers with the impl_qpid rpc_backend.

Change-Id: If3a11050a03660560a364dec871f85c4b56c1c25
Closes-Bug: #1321303
2014-06-01 08:20:49 +01:00
Christian Berendt
105a806493 all non debug log messages should be translated
Updated a set of files to add missing translation support in the
log messages.

Change-Id: I58d561c5e1ecff550483ee0be696999e927c98ad
Partial-Bug: #1321283
2014-05-29 11:11:46 +02:00
Ethan Lynn
f864a0c84a Re-enable lazy translation
After enhancements to Oslo Message class, re-enable lazy translation to
enable REST API responses to be translated to the requested user locale.
bp i18n-messages
Change-Id: I4be508858547029d454412746609fd380af415c1
2014-05-27 18:29:01 +08:00
Pavlo Shchelokovskyy
50ff4ec2fe Order imports in alphabetical order (9/9)
This patch fixes all the missed and newly introduced violations of the H306
style checking rule and enables it in tox.

Change-Id: I5566e66421d5397c0103958f02ea38e6e3c68892
Implements: blueprint reduce-flake8-ignored-rules (partial)
2014-05-22 16:49:51 +03:00
Clint Byrum
047757e9f8 Use oslo.config for heat-keystone-setup-domain
Previously used environment variables exclusively.

Change-Id: If4b4266ce66212d7ae2579e7da6d3bae779ad04a
2014-05-20 23:38:03 -07:00
Clint Byrum
6d308d53e8 Revert "Default engine workers to the number of CPUs"
This reverts commit 56041687844c7c04bfcad974a07ac3ff35f99e5c.

Problems have been reported on systems using QPID. The gate only tests
RabbitMQ.

Change-Id: Iaf83dc7582835ce5bf4534116c918640da7373aa
Partial-Bug: #1321303
2014-05-20 10:15:23 -07:00
Clint Byrum
5604168784 Default engine workers to the number of CPUs
The engine is single-threaded and thus needs more workers to handle more
concurrent requests on a single machine.

Change-Id: I36117c3876f84a2ff7ba5576444fdbf7716cc69e
2014-05-15 12:24:18 -04:00
Clint Byrum
0bb12320f5 Allow setting the number of heat engine workers
This will allow scaling stack operations up on a single host.

Change-Id: I8e9a3a7f86663fdda9b03c42e16b3e2189cbbfa5
2014-05-14 17:49:28 -04:00
Clint Byrum
e8ab2b4745 Distribute create_heat_domain
Rename it to heat-keystone-setup-domain and ship it in bin with the
other helper scripts. This will make it consumable by automated systems
and packaging.

Change-Id: I7914869377cd08b6201007aa0eb6b8a70d763254
2014-04-25 21:13:12 -07:00
Jason Dunsmore
af464c9afc Make the first line of every file consistent.
Change-Id: I2e1a809cfca8e88693551d58d33e747f54ee5eb1
2014-03-04 09:03:04 -06:00
Jason Dunsmore
97135cbfc0 Remove vim header from files.
Change-Id: Ia6131f8fcac6902c80c80aa805c8cd7a2a41f280
Closes-Bug: #1229324
2014-03-04 08:51:56 -06:00
Jenkins
56bacbda1b Merge "Add systemd notification support to heat" 2014-02-19 23:22:19 +00:00
Lon Hohberger
cceda95a35 Add systemd notification support to heat
This mirrors work done in other OpenStack projects
to add systemd notification support to signal that
a given process is ready to accept requests.

The heat-api, heat-api-cfn, heat-engine, and
heat-api-cloudwatch processes are all covered by
a new, single, 'onready' configuration file option.

Additionally, the sample configuration file has been
updated to match.

Implements: blueprint systemd-integration

Change-Id: I90d2b915e2568a65ed9ed78923c9982e19f9c948
Signed-off-by: Lon Hohberger <lhh@redhat.com>
2014-02-19 09:43:44 -05:00
Thomas Herve
8b1b7d132e Revert "Merge "Re-enable lazy translation""
Revert enabling lazy translation, which doesn't work in many places
because we're doing string concatenation.

This reverts commit 1864efa320aadbb4f5503c15345dd363bb3691c1, reversing
changes made to 92e3e3ce74dc1e3f75d51600072227c2e44016a6.

Closes-Bug: #1281644
Change-Id: Iac0be685f8bb60f81715c0dd3dbe35787e38ee39
2014-02-18 18:58:28 +01:00
cbjchen@cn.ibm.com
fa133569a4 Re-enable lazy translation
After enhancements to Oslo Message class, re-enable lazy translation to
enable REST API responses to be translated to the requested user locale.

bp i18n-messages

Change-Id: I15ecffd678393c27c34336035d37915655e9f350
2014-02-16 02:12:37 +00:00
Shane Wang
8a688c0aaa Fix misspellings in heat
Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: I554143f00fe82154472e7eb6391291730dd3ddd4
Closes-Bug: #1257295
Closes-Bug: #1277515
2014-02-11 08:29:37 +08:00
Matt Riedemann
84e1942f0b Create heat database with default character set utf-8
The heat-db-setup script wasn't creating the heat database with default
character set utf-8 which can cause the migrations to fail.

Closes-Bug: #1276880

Change-Id: I35861af66d70314285fa76bb148e403aeea4b654
2014-02-05 17:26:25 -08:00
Jenkins
8e7a86dd7e Merge "Fix heat-keystone-setup error when try to create heat user" 2014-01-15 18:48:25 +00:00
Jenkins
4b5140bfe7 Merge "Fix get_column_num problem in heat-keystone-setup" 2014-01-11 18:51:19 +00:00
Jenkins
6cfa424002 Merge "log warning, when $SERVICE_HOST is localhost" 2014-01-10 20:21:48 +00:00
jufeng
02f3d70235 Fix heat-keystone-setup error when try to create heat user
Unset OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT temporarily to make
sure this command can run even if the OS_SERVICE_TOKEN and
OS_SERVICE_ENDPOIN exist in shell environment.
Remove die_if_not_set in get_data function, because there maybe no
data in get_data function, for example, if the heat user does not
exist, the die_if_not_set will be in error.
Remove die_if_not_set after keystone user-list for the same reason.

Change-Id: I132f975ac2da21e6ad7431ae326ad9bd538e4696
Closes-Bug: #1266670
2014-01-09 16:01:02 +08:00
DennyZhang
19948b1561 Fix get_column_num problem in heat-keystone-setup
get_column_num function searches the second line of command output,
to get the field number for a specific field.

But output of 'keystone user-list' may have an extra line: 'WARNING:
Bypassing authentication using a token & endpoint ...'

This messes up the functionality of get_column_num function

Closes-bug: #1260556
Change-Id: I8c6e7f939466154c5e31e6f019e20fb855e15878
2014-01-02 18:51:55 -06:00
DennyZhang
6cb6d30bc0 log warning, when $SERVICE_HOST is localhost
Warn users, if heat-keystone-setup can only use localhost as $SERVICE_HOST.
And remove an extra whitespace.

Change-Id: I1b2a1b93212b6ab0ca092bb6c834255ee75176ca
2014-01-02 10:59:04 -06:00
DennyZhang
88b8e20f1c add assertion to heat-keystone-setup script
Defensive check for various critical steps in the script

Change-Id: I9df01011940d80532787c3acaf0cc8ec10e97cc8
closes-bug: #1260561
2013-12-19 11:06:53 -06:00
Angus Salkeld
5f0faff409 Only log to console in heat-db-setup
Make sure heat-manage does not use heat.conf logging
in the heat-db-setup script as the logging directory
might not be setup yet.

Change-Id: I16db3fde1c7bfe5f027c77f2a25ffa2104d15491
Closes-bug: #1191925
2013-10-29 08:26:40 +11:00
Alexander Gordeev
4582a1a0dd Migrate to Oslo DB 96d1f887dda Part 3
Oslo version 96d1f887dda21b43ba4376187f31953dee6f5273

This commit just migrates Heat to new db related code from Oslo

Partially implements blueprint oslo-db-support

Change-Id: Ib0de40a70857fb3e029a2282f06746269a628c71
2013-10-09 13:13:30 +04:00
Ben Nemec
53b9314799 Disable lazy translation
Late in the Havana cycle bug 1225099 was found in the lazy
translation code, and to be safe it was decided to disable lazy
translation for Havana.  This change does that.

Change-Id: Ia934a7df9386baf6ae8eb9ff48c24386c47ecd23
Partial-bug: 1225099
2013-10-01 21:41:55 +00:00