254 Commits

Author SHA1 Message Date
Ethan Lynn
267a4f076b Deprecate heat-keystone-setup
Keystone shell is deprecated in this release, use openstack client
in heat-keystone-setup. And add a deprecation warning to this
script.

Change-Id: I11334f0c8b035723a11f42bcfea054fc358a3e9f
Closes-Bug: #1460884
2015-11-13 10:28:42 +08:00
Peter Razumovsky
2f9ea624de Fix [H405] pep rule in bin
Implements bp docstring-improvements

Change-Id: If2daff413814fe0a7b5d5fbc4e2262b06aa90c5e
2015-10-08 15:13:52 +03:00
Sirushti Murugesan
063f80ffdf Add console_scripts entry points for all heat services
As a follow-up to Ibfd54e7b1bae700e4fb49a32e5bf7c00d1f104d9,
moving all the scripts from bin/ to setuptools entry points.

The devstack change is here: Iffb6d09bfef593d854b38e68200ae6039c4727e7

partial blueprint upgrade-tests

Change-Id: Ic8f5b8dc85098de752bbf673c4b15c06fdc4162a
2015-09-03 02:03:59 +00:00
ricolin
2251af415b unify REST word
Representational State Transfer, by official definition the abbreviation
should be *REST* not *ReST*. We should make it unified.

Change-Id: Ia1e5c5145ab0db22fd9ff1393bf507648a31112b
2015-08-26 09:33:17 +08:00
tyagi
2cf8aa6fad Update wsgi.py to support reload from conf on SIGHUP
These changes are taken from the glance wsgi.py from where
heat wsgi.py originated. These changes are to support reload
of the service with new configuration parameters when SIGHUP
is received.

The reload of conf will only work if the server is running
with workers. If workers is 0 then it wont reload.

Co-Authored-By: Tetiana Lashchova <tlashchova@mirantis.com>
Change-Id: I7fd391209591c149fb95136d92dd1d82cfb7a6de
Closes-Bug: #1449807
Closes-Bug: #1276694
2015-07-06 17:27:28 +03:00
zhangchunlong1@huawei.com
1e49aad113 Introduce Guru Meditation Reports into Heat
This commit integrates functionality from the `openstack.common.report`
module into Heat. This enables Heat services to receive SIGUSR1 and
print a Guru Meditation Report to stderr or file. The required modules
were added to 'openstack-common.conf' as well.

Change-Id: I36af98590e5556f012b0e9f79e21585e216b7280
Blueprint: guru-meditation-report
Co-Authored-By: huangtianhua <huangtianhua@huawei.com>
2015-07-02 16:55:25 +08:00
Ethan Lynn
6d8397f18a Add domain when list users in heat-keystone-setup-domain
Add domain when list users in heat-keystone-setup-domain

Change-Id: Ib4379e3880f206caed757a2718f31b82201f4495
Closes-Bug: #1470567
2015-07-01 23:38:19 +08:00
Ethan Lynn
7c5864ae37 Fix heat-db-setup error on rhel7.1
In bash, '-gt' can not work with flaot number.

Change-Id: I264e9e7ebe9de6aca116783a655a3efd9500c938
Closes-Bug: #1468217
2015-06-24 15:39:33 +08:00
Sergey Vilgelm
432430d2c6 Switch to oslo.service
oslo.service has graduated, so heat should consume it.

Change-Id: I9c1899eb37505e64967e9cb77da23bb169498aba
Closes-Bug: #1466851
2015-06-23 08:30:39 +02:00
Sean Dague
79dd4b423c make heat-manage a console_script entry point
pbr has extra sauce for correctly making installed cli tools not do
unneeded pkg_resources metadata checks (that can only end in tears) if
those scripts are installed via the console_script entry
point. heat-manage looks like it is ready to be used this way.

Other scripts should be converted in the future to avoid erroneous
errors due to library metadata mismatch, which these tools should not
care about.

Change-Id: Ibfd54e7b1bae700e4fb49a32e5bf7c00d1f104d9
2015-06-17 22:07:45 +05:30
Jenkins
ede071510b Merge "Use oslo.log in wsgi.py" 2015-03-25 12:54:31 +00:00
Jenkins
5aff162525 Merge "Using OS_TENANT_NAME in heat-keystone-setup-domain" 2015-03-24 22:29:13 +00:00
Michal Rostecki
501ae172d0 Using OS_TENANT_NAME in heat-keystone-setup-domain
Tenant name was not provided in Keystone client, so it was not
authenticated properly and raised Unauthorized exception.

Change-Id: I0b86ffa3eeff4a9631e36f56f4e111bb5eadf8b6
Closes-Bug: #1435415
2015-03-24 12:45:35 +00:00
Kanagaraj Manickam
cc95fcc5d8 Adds version reporting for heat commands
Adds --version option for following commands
heat-api-cfn
heat-api-cloudwatch
heat-keystone-setup-domain

Change-Id: I84bdf16fd053b5eccacd99bf26ecd9eb34e57ef8
Closes-bug: #1435406
2015-03-24 12:35:17 +05:30
Jenkins
068d6bd3df Merge "passed version information while parsing arguments" 2015-03-24 04:00:18 +00:00
Angus Salkeld
f898c2c24d Use oslo.log in wsgi.py
- Use WritebleLogger from olso.log
- Use oslo.log calls directly instead of the system logger.
- logging.set_default() with no arguments is pointless.

Change-Id: Ife0d3ff71d0b431cc88dcdf12a58b5104b318af4
Related-bug: 1435588
2015-03-24 11:38:26 +10:00
Angus Salkeld
a47639c4a4 Move stack_user_domain warning to startup
Add a startup_warnings() function in place to add other
warnings there if at all possible.

Change-Id: I4d8d02feccc42c2f3486f52bad488922eb08bbca
Closes-bug: 1434286
2015-03-23 13:07:55 +10:00
rajiv
0f4fee91b9 passed version information while parsing arguments
Change-Id: I1b9dd4a1353799f5001349f973f5d06ddd104069
Closes-Bug: #1432527
2015-03-22 12:33:44 +00:00
Jens Rosenboom
a99fe6a760 Make import of oslo libraries namespaceless
See https://blueprints.launchpad.net/oslo-incubator/+spec/drop-namespace-packages

Closes-Bug: 1423174
Change-Id: I48680ce6e7ce91005c147ab4388203946171d433
2015-02-18 22:54:10 +01:00
Steven Hardy
70112c103a Move logging to use oslo_log library
The oslo-incubator log modlule has been removed, so port to the oslo_log
library.  Note this uses the new (non namespaced, e.g oslo.log) import
convention, we'll need to align other imports in a future commit.

Some import reordering was required due to pedantic H30[57] checks, and
the services have all been converted to initialize the oslo_log library
as this is done differently to the log.py in incubator.

Change-Id: Ib5a97123fe1b287bc531e42d7887c13ba6205628
2015-02-17 09:23:34 +00:00
Pavlo Shchelokovskyy
4279bd2923 Enable H305 and H307 style checks
Correct grouping and ordering of imports

Change-Id: I47ea0d53f80d7f0aeb01c1c6afd63713be87ddf4
2015-01-20 09:47:25 +02:00
Tetiana Lashchova
ed76af4269 Check that template format plugins are registered
Otherwise log an error and exit

Change-Id: I2beb33371cf5e6701e22dbb41c8f5aa681c379de
Closes-Bug: #1402426
2014-12-16 12:41:36 +02:00
Jenkins
74dd800383 Merge "Use the right log marker functions" 2014-12-04 02:21:56 +00:00
Anderson Mesquita
6a1ff532f9 Fix invalid syntax on heat-db-setup
">=" comparison is only supported in certain shells.  This patch changes
it to "-ge" to fix this.

Change-Id: I2bf1294c31d38e18b02bebd190bd4bfa45beedc5
Closes-Bug: #1398535
2014-12-02 15:31:04 -05:00
Tetiana Lashchova
4801c0f894 Use the right log marker functions
According to [1] _LI() should be used for LOG.info(), _LE() for
LOG.exception() and LOG.error(), _LW() for LOG.warning().
The log marker functions must only be used when the message is
sent directly to the log.
Debug level log messages should not be translated.

[1] http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: Ib9f92ef6696b9a95ddae74f0d4a0a557c06ecc91
2014-12-02 14:57:13 +02:00
Ethan Lynn
140f32805c Fix package name when using heat-db-setup in rhel7
In rhel7 mysql-server is replaced by mariadb-server, using
the right name to install package.

Closes-Bug: #1395726
Change-Id: I02e79a6f8da5bd082568c22d3efc4c231dfbd8c7
2014-11-26 10:36:37 +08:00
Jenkins
66d136bc45 Merge "Mark stack_domain_admin_password as a secret option" 2014-11-14 17:24:34 +00:00
Ethan Lynn
0307d02677 Mark stack_domain_admin_password as a secret option
Add secret=True to option stack_domain_admin_password,
so that will avoid logging this option in engine.log.

Closes-Bug: #1392162
Change-Id: I04071f37a0053b969dc31a69e62ba9abb075c590
2014-11-14 10:40:13 +08:00
Jenkins
f39600e28b Merge "Remove die_if_not_set check for var user_roles" 2014-11-13 08:04:12 +00:00
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
Ethan Lynn
8d4e7acb83 Add CERT file support in heat-keystone-setup-domain
Add below options to support ssl connection.
--insecure
--os-cacert
--os-cert
--os-key

Change-Id: I9d1fd07df783d7410ac3f51b5d4e8434d57182a4
Close-bug: #1387063
2014-10-31 18:13:20 +08: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