Commit Graph

47 Commits

Author SHA1 Message Date
Erik Olof Gunnar Andersson de1ab6d96b Fixed sqlalchemy 2.x support
Re-arranged sessions to always be at the top level to make
it easier to know the origin of the current session. This
is important now that we no longer have autocommit enabled.

- Added zuul job testing sqlalchemy 2.x.
- Added new db api for service cleanup.
- Removed broken sqlite cleanup step during testing.

Change-Id: I168f3d9518611ac66cb9eec1132a7add19e92d5f
2023-12-29 12:06:57 -08:00
“miaoyuliang” 1bace4641d Update error in install-rdo.rst and update default port
Nova placement use port 8778, to avoid confusion, Update
senlin default port from  8778 to 8777. And update
spelling mistakes in install-rdo.rst

Change-Id: I342b1badf3910ea07ea64523cdb8a19a8a0ccb06
2020-09-26 00:31:31 +00:00
Duc Truong a46245e74a Fix devstack problems causing failed CI tests
- Use uwsgi binary from path:
Devstack projects have been fixed to run uwsgi binary from the path
instead of the project specific directory [1].  This applies the same
fix to senlin-api so that it makes uwsgi invocation to find it in the
path.

- Set keystone auth interface to public:
The default identity interface was changed from admin to internal in
[2].  Since devstack only creates admin and public endpoints for
identity service, senlin fails to talk to identity service without the
explicit setting to use public interface during authentication.

[1] https://review.opendev.org/#/c/577779/
[2] https://review.opendev.org/#/c/662734/

Change-Id: Ia8f56a7016eace5b7ce70dc661729e19284c3733
2020-08-05 20:39:21 -07:00
Zuul fdd714dd5a Merge "Bumping worker count during testing" 2019-11-14 21:27:15 +00:00
Zuul 719d058953 Merge "Split engine service into three services" 2019-11-14 21:18:35 +00:00
Erik Olof Gunnar Andersson 3c7a24a010 Bumping worker count during testing
We should always be testing with at least two workers
to make sure that we catch bugs when running multiple
copies of each process.

Change-Id: I1ad628d23b16454e572f65b8845ab8d70d5915b9
2019-11-04 13:28:05 -08:00
Erik Olof Gunnar Andersson 54997a14ea Split engine service into three services
This patch splits the engine into 3 services, conductor, engine and
health-manager.

The goal here is to make the engine more resilent by isolating the
pieces.

Before this patch each Engine worker could potentially be running many
thousands of threads and multiple thread groups, starving the process.
After this change each process would be limited to a single thread
group of 1000 threads, and more predictable and balanced workloads.

* Added two new services.
* Added workers opt to conductor and health manager.
* Merged Thread Group Manager into Engine Service code.

Change-Id: Id4a27ba934dc9777f7ae5b4d7d0a751318ea7877
2019-11-04 11:36:56 -08:00
Erik Olof Gunnar Andersson 91894f9bf6 Fix SENLIN_SERVICE_PROTOCOL not always being set
Change-Id: I6641817ca8bd737465919d17043f1ff0ecdffbb2
2019-10-31 16:59:18 -07:00
Erik Olof Gunnar Andersson e4eeb61627 Enable Apache by default
This switches senlin-api to use uwsgi (or mod_wsgi) and
changes the endpoint to use <host>/cluster instead of
<host>:<port>/.

Change-Id: I78c6242149854d32497aacb63f698be58afae922
2019-10-25 06:20:16 +00:00
Ghanshyam Mann b860edd838 [train][goal] Define new 'senlin-tempest-api-ipv6-only' job in gate
As part of Train community goal 'Support IPv6-Only Deployments and Testing'[1],
Tempest has defined the base job 'devstack-tempest-ipv6' which will
deploy services on IPv6.

This commit adds the new job 'senlin-tempest-api-ipv6-only'
run on gate which is derived from 'devstack-tempest-ipv6'.

Verification structure will be:
- 'devstack-IPv6' deploy the service on IPv6
- 'devstack-tempest-ipv6' run will verify the IPv6-only setting and listen address
- 'senlin-tempest-api-ipv6-only' will run the tests.

Story: #2005477
Task: #35929

[1] https://governance.openstack.org/tc/goals/train/ipv6-support-and-testing.html

Change-Id: Ib7695212e42ef16dbc1edd65c3516b277e99078d
2019-10-21 12:59:18 -07:00
Zuul fab28c0578 Merge "Cleaned up devstack logging" 2018-11-07 21:24:17 +00:00
Erik Olof Gunnar Andersson 586ed6160e Add missing www_authenticate_uri to devstack
Change-Id: Ic26389572254edc4e3cd1d5d3e7a4cf0840f493d
2018-11-05 15:45:50 -08:00
Erik Olof Gunnar Andersson f06ec494b4 Cleaned up devstack logging
Switch to systemd logging to take advantage of some of the newer
logging features.

Change-Id: I67c6fb710e9946a9a5947a7062e2b03106a8e5c2
2018-11-05 14:57:14 -08:00
Erik Olof Gunnar Andersson 4d298c6f2e Do not for force-reinstall when upgrading packages
Using fore-reinstall with upgrade will cause all
dependencies to always be reinstalled. This can
cause issues when other components install Senlin
as a dependency.

In this case we are causing issues because we are
re-installing certify, a file that is modified by
devstack after installation to make sure that the
system has the appropriate ssl certificates.

See the function fix_system_ca_bundle_path in devstack
for more information.

Change-Id: Ibb6578f45f9277f97ca61b60714c8ce2b4eacb61
Closes-Bug: #1769541
2018-05-07 01:17:08 +00:00
sgfeng 6f2d890db4 Fixes horizon can't open problem
This patch fixes horizon problem which is caused by
senlin-dashboard installing.

Change-Id: Id9e8704857fcc15cd84dcd492fb6740a1b215b3e
Closes-Bug:#1748609
2018-02-11 01:12:06 +08:00
tengqm 957d77a0a9 Update sdk connection, tests and isoformat
We can simplify connection creation now. The Connection constructor
understands not to load yaml or env vars if it doesnt' receive a cloud
argument - so this can all be done in one step.

Update the mocks in the tests to work for the new calling pattern.

Finally - isoformat wasn't processing UTC+00:00. There are some
dark issues with how isoformats get passed around OpenStack, but this
fixes the unittest matching to account for UTC+00:00.
openstacksdk has been working on merging the code from shade and
os-client-config. Part of this will result in the removal of the
Profile object in favor of the CloudRegion object from the new
openstack.config.

This updates the Connection construction code to code that should work
with both old and new versions of openstacksdk.

Temporarily mask some jobs to get this in. Will need to revise the
tempest plugin to fix gate jobs later.

Related-Bug: #1681620
Co-Authored-By: tengqm <tengqim@cn.ibm.com>
Change-Id: I10c74ca48b1ddb848a5a68cc4360431a21e0a2cc
2018-02-06 03:46:36 -05:00
chao liu 4ed683282f use . instead of source.
Code conventions: Use “.” to source script files
When you have to source a script file, for example ,
a credentials file to gain access to user-only or
 admin-only CLI commands, use . instead of source.
See more:
http://docs.openstack.org/contributor-guide/writing-style/code-conventions

Change-Id: I359c3b84643df2219b51715021f253257f8f29a2
2018-01-29 14:23:09 +00:00
lidong 53aeca7bea Modify the descriptions in some files
Modify the descriptions in some files:
devstack/lib/senlin,
senlin/profiles/os/heat/stack.py,
senlin/profiles/os/nova/server.py.

Change-Id: I90cb156449620cd8ae204475043b5dac92a6a5f6
2018-01-29 09:41:48 +08:00
Ethan Lynn c0b85e5c25 Fix keystonemiddleware.auth_token failure
The senlin script for devstack will setup to use
keystone v2 as default url in keystonemiddleware,
since keystone remove its v2 api, so it will failed
on authentication.

fix-bug: #1727904
Change-Id: I61cf8902eef86efb9cfc82f0061f8b82bfc221f8
2017-10-27 10:39:54 +08:00
Dai Dang Van ac1d1d71bf Implement policy in code (6)
Like oslo.config, with oslo.policy, we can define all of
default rules in code base and only change some rules
via policy file. Another thing that we should use yaml
format instead of json format[1].

This commit will move all default policies to code for:
- actions
- events
- services
- webhooks

[1] https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: I0919eb5dc84c0e134b4918f477923b53dc9fbbbb
Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
2017-10-20 02:04:35 +00:00
liyi 50e7b418a5 Add access log for devstack.
Miss access log in senlin devstak.

Change-Id: I9116a879d8ea3a97020ce2091476e91fbacf9f63
Closes-Bug: #1674241
2017-03-20 15:28:43 +08:00
jing.liuqing 931bddda3b Do not cleanup_senlin_dashboard in devstack install step
Change-Id: Ibf2e3b34d001f386ac0bb0eb3feea8054c6b1e0c
2017-02-04 23:55:59 +08:00
Jeffrey Zhang d60c35223e Make soft link _50_senlin.py from enabled folder
_50_senlin.py is moved into senlin_dashboard/enabled/ folder

Depends-On: Ibfe1731873c53e03cd808434bbcbd4dfc1b328d0
Change-Id: I558007b14a74a8f2660a26dacc05d5f40acf3b4f
2016-12-21 13:57:12 +00:00
tengqm c747d57585 Fix devstack plugin setup
We were checking if KEYSTONE_CATALOG_BACKEND when setting up senlin
service. This seems pointless and it is now rendering the gate jobs
failing.

Change-Id: I9edd08a0fa05994856a394d34ef43402acf3ced8
2016-11-23 05:01:52 -05:00
lvdongbing 1bc046717e Add toggle in devstack plugin to run senlin-api under Apache2
Add senlin-api apache mod_wsgi template file and related functions
to devstack plugin.

Change-Id: I24558509b2e310c665272f1831c69144ccd30dd7
2016-11-13 21:45:01 -05:00
yanyanhu ffb1a90a7d Configure Zaqar options in devstack plugin
This patch revises Senlin devstack plugin to configure Zaqar
related options for message receiver.

Change-Id: I40c96a34335f96160572a6cd558924d37ef0563d
2016-10-20 23:50:12 -04:00
jing.liuqing f67c830c18 Enable senlin policy for dashboard via devstack installation
Change-Id: Ib61677c6e450fedaaf755010656b134bd549bf16
2016-09-18 22:07:36 +08:00
jolie 2c5a4b9212 Correct the installation doc
The instacllation doc should provide the senlin dashboard install
in devstack method, because horizon is a core service, many
developer will install this service. And if the developer want
to develop senlin-dashboard there is no doc instruction to guide
them how to install this horizon plugin.
Besides, there is a incorrect step in the install guide.

Change-Id: I375f04cb1e2621ce59740770566692e6643add05
2016-08-04 03:11:05 +00:00
tengqm 028342cba9 Fix senlin-dashboard install
When setting up tempest gate for senlin api test, we are currently
running git-clone on senlin-dashboard. It is unnecessary and it is
rejected by devstack. This patch propose a separate path for develop
setup of senlin-dashboard. Hopefully, it will not impact any production
setup while it leaves us some room for getting tempest gate up asap.

Change-Id: I314cf2e01e889a8c19fa819090ceacb98ee885eb
2016-05-25 21:38:14 -04:00
Liuqing Jing d8851b35a3 Add devstack support for senlin dashboard
And record whole functions in devstack/lib/senlin

Change-Id: I8b0135eac49b3265e7333748ad3db911ab114022
2016-02-19 12:31:22 -05:00
Liuqing Jing f0c33eae2c Update devstack comment
Change-Id: I7b96d39047e9097b5d67f2065de209c0c23969ee
2016-02-17 19:16:29 -05:00
yanyanhu 3e49089f7a Enable default_region_name config option
This patch adds default_region_name config option. It specifies
the default region name of backend openstack services that senlin
engine talks to.

Change-Id: Id12fb3c29b5b15a6684138c50d36a5dfdc565686
2016-02-15 05:32:23 -05:00
tengqm 1f1184763b Remove some dead options in engine config
We are never using the 'region_name_for_services' option and the
'error_wait_time' option. This patch proposes a removal of both.

Change-Id: I1674d5da0b0fab9f3d0621616be372a347a5cd9c
2016-02-15 05:12:01 -05:00
Ethan Lynn 6d37d66f7a Don't set verbose in default group
Verbose is deprecated in default group, don't set it in senlin.conf.

Change-Id: I359f15b71c6cb3cef4a3609123c27f9f69a0a54d
Closes-Bug: #1538873
2016-01-28 12:03:39 +08:00
Ethan Lynn b3a3e78884 Fix devstack script to use console scripts
Fix devstack script to use console scripts

Change-Id: Ie4540612ef52ce15afb30251b8374a024ae022cb
2016-01-20 16:42:09 +08:00
tengqm 6e4191d929 Fix service setup script for new endpoints
We are removing 'tenant_id' from the senlin endpoints. This patch fixes
the setup script to make it: 1. work with latest service change; 2. work
with new changes to openstackclient.

Change-Id: I12a5b7acbe76370ceab3e79a807d91da22707d60
2015-12-07 22:29:10 +08:00
venkatamahesh 1f995c2b00 Change the repositories from stackforge to openstack
modified the steps in devstack/README.rst

Change-Id: I7e1ed4a5304bb87447c0faeea938103ef06468e9
2015-10-18 16:18:25 +05:30
yanyanhu 147b49da45 Install python-senlinclient using pip by default
After we have a release of python-senlinclient, we should install
it using pip by default.

Change-Id: Icdd8d26acc22f70c9abe99e31932e57b76e1c6eb
2015-09-24 21:38:15 -04:00
James E. Blair 34eaacfe32 Remove ERROR_ON_CLONE references
It is *never* acceptable to alter behavior based on this variable.
It defeats devstack gate testing.

Change-Id: I6c305468456742ac762da8b65e0831cd0c95c263
2015-09-23 15:35:07 -07:00
lawrancejing 0d20b9dd08 Remove extra comma
Change-Id: I24acffb8af449372cf0cb1489c45d99018e34d4b
2015-09-16 02:41:58 +00:00
Zhenguo Niu b83580b710 Improve devstack plugin
Enable senlin services in settings file instead of manually add in
devstack local[rc] file.

Change-Id: I0bad2a81225d35beb99f15ade04fdbb8a46b4afb
2015-08-28 23:10:33 +08:00
yanyanhu ef4db52c14 Fix gate job of Senlin functional test
This patch tries to fix gate job of Senlin functional test. Three
works were done:
 - Adding a judgement in plugin.sh to skip python-senlinclient
   installation when this is an installation happens in gate side;
 - Revising tox.ini to pass necessary environment variables for
   functional test;
 - Adding exetuable permission to post_test_hook.sh;

Partially implement: blueprint functional-test-startpoint
Change-Id: I36508910a50299afa388864704fbcbdbee609dec
2015-08-13 22:46:21 -04:00
tengqm 4d0a9e598a Stop stealing keystonemiddleware options
Previously, we have been stealing configuration options from the
keystonemiddleware. This is dangerous. The keystonemiddleware package
may deprecate options at any time. This patch proposes some options for
Senlin to do role delegations.

Change-Id: Iea0571ffc63b7ec1504e440bb1e0dd3a2ce85a71
2015-07-17 09:10:59 -04:00
tengqm 7f43aeab04 Revise devstack README.rst with new git repo
Revised devstack/README.rst file with new git repo URI.

Change-Id: I635461177a98d3448b7b868477fa85afdc86ab98
2015-07-16 08:07:56 -04:00
tengqm 9c14bb6d60 Fix admin requirement in trust middleware
Due to default policy.json settings in Keystone, a non-admin user is not
allowed to call 'list_users' or 'get_user' APIs. However, Senlin only
knows the user name but it needs a user ID to create the trust between
service requester and the 'senlin' user. The only workaround today is to
have Senlin query its own user ID using its user name. After this is
done, the trust middleware will use the service requester's credential
to raise the 'trust create' request to Keystone.

This necessitates two changes to the current code, one is to relax
Keystone's policy setting to allow a user with 'service' role to do user
list and user get (proposed here: https://review.openstack.org/181298);
the other one is to have Senlin trust middleware to raise user ID
checking request using 'senlin' credential.  This patch contains the
second part.

Since devstack doesn't provide a function to modify default policy
settings, we will wait to see if the patch to Keystone will be accepted.
If Keystone refuse to accept that change, we need to hack the devstack
plugin and 'setup-service' tool to modify the policy.json file.

Anyway, we need 'senlin' user to have a 'service' role in the
requester's domain (default to 'demo').

Change-Id: I87146a54f79e32a9175755f42da1e4406842c0b7
2015-05-08 03:53:50 -04:00
Ethan Lynn 07c06e7a67 Trivial fixes for devstack integration
Fix some typo in devstack integration
Fix endpoint url

Change-Id: I99711575d381054579da924acc7a5534f41f7019
2015-04-20 16:44:40 +08:00
Ethan Lynn 06c7f51383 Integrate senlin with devstack
Integrate senlin with devstack

Change-Id: I79360843bc2908d3045f27911cc090fed6f2a230
2015-04-17 10:59:35 +08:00