Commit Graph

96 Commits

Author SHA1 Message Date
Ghanshyam Mann a43311b7ef Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Ic209179b0be9c3746a702ccea2dd35e883e78bee
2024-02-24 11:43:49 -08:00
Zuul ada0d3aad1 Merge "Use python3 for map-services-tripleo" 2021-05-05 01:19:48 +00:00
Sorin Sbarnea c69ead8b45 Drop pbr version ceiling and add py39 testing
- Ceiling of pbr version can create installation conflicts with pip.
- Fixes tox default env list to be python version agnostic
- Updated template to use newer jobs (include testing with newer python)

Bug: #1921679
Change-Id: Ifd0d2f810799992faa1db41b80bf93bc97d5d19d
2021-03-30 10:57:41 +00:00
Steve Baker a038c08017 Use python3 for map-services-tripleo
RHEL-8 doesn't have a 'python' alias set up by default.

Change-Id: Ib17a8009f335d7ef9e72e35e3477e471b69e895e
2021-02-25 10:26:40 +13:00
Hervé Beraud 99281bd30f Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I6d02b20797cf1a0208a24e740d1f9dc921434b82
2020-06-02 21:04:27 +02:00
jacky06 c5984fc6d7 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: If299ebc5849502954e812947c5b80006573710ed
2019-05-28 14:40:51 +08:00
Ian Wienand 253fe8831f Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I480c17e7357cf05532bc8949c5914227cbe04e2e
2019-03-24 20:36:18 +00:00
Alex Schultz a7837c9430 Add python jobs to tripleo-image-elements
This change also fixes the python tests to properly mock the path so our
stubs work if the command already exists on the system path.

Change-Id: I7c54b1d99e7cf6c4e3f4ded8c518bf447b2ba1de
2018-05-31 10:50:16 -06:00
Jenkins 22b3d0967e Merge "Remove vim configuration in source file" 2017-01-19 17:22:31 +00:00
Yolanda Robla Mota b9fb5326fd Copy map-services script to tripleo elements
map-services will be removed on dib v2 branch, but
tripleo still relies heavily on it. To prevent breakage,
copy the script to the internal element using it.
In the future, all elements will need to be migrated
to new svc-map, but it is a massive change.

Change-Id: I9f450de66044123ab07fa498b68f744d1029089a
2016-12-05 12:37:17 +01:00
howardlee 78630895c5 Remove vim configuration in source file
Trivial fix. Remove vim configuration in source file.

[H106] Don't put vim configuration in source files (off by default).
http://docs.openstack.org/developer/hacking/#general

Change-Id: I49660b150fd32bbde6d0472ab032ab10bb5abd78
2016-11-21 17:17:39 +08:00
Ben Nemec 638a863db8 Remove mysql-dev dependency from os-svc-install
Looking through the image build logs, I noticed we were pulling in
the mysql-devel packages for some reason.  It turns out this is a
historical artifact of the old TripleO source installs using
os-svc-install.  It was universally installing mysql-python on
every image where it was used because that package wasn't in the
requirements.txt for the OpenStack projects.

This was wrong in the first place, and now that we aren't supporting
that installation method anymore it doesn't make sense to keep
installing nine development packages that we'll never use on our
images.

Note that the only thing we use from os-svc-install now appears to
be os-svc-enable, so this should have no effect on the current
TripleO flow, except slightly smaller/faster image builds.

Change-Id: Iae3e6ae3f57de57639c4259361e82c8150fe2f0e
2016-03-10 13:29:10 -06:00
Derek Higgins 85c68ffc75 Update pbr version to match global requirements
The version of pbr we were using was having trouble parsing a new version
identifier for python-qpid, We have the pbr version hardcoded in many
places so update it to match whats currently in global-requirements.

Fixes bug #1470871
Change-Id: Ia5aec472555ad1368684b224a55c29242ae40b58
2015-07-02 16:53:06 +01:00
Gonéri Le Bouder e58007c9c4 tox: fix the test suite
fix pep8 syntax (H904 Wrap long lines in parentheses instead of a backslash).

fix two regressions in test_os_svc_daemon.py introduced by
    Ibd491881d79160ad1457526d51512f5fc1cf9ea5:
  - ensure os-svc-daemon won't try to write in /etc/os-logging by passing
    the “-l” extra parameter.
  - fix the test_standard_upstart test from test_os_svc_daemon.py to
     match the expected outpout.

Change-Id: I113504947d126e9d91409f97f8291d5b8fc15c42
2015-02-02 12:05:21 +00:00
Gregory Haynes 4c31859fbb Log from upstart console
We are no longer piping our service output to logger, so we should be
logging the stdout via upstart. This is useful for detecting tracebacks
and other info which does not go through python logging.

Change-Id: I5d4abb94ff15f74fd2478e70d0fa4d3bb9c09f2d
2015-01-14 19:50:42 -08:00
Jenkins ea88e1ad12 Merge "Remove setuptools <8.0 pinning" 2015-01-09 17:35:47 +00:00
Gregory Haynes d338bce587 Remove setuptools <8.0 pinning
This was added in If3300a6b1ef1c633fc339f884e9dab0d82bc0720 and should
be removed now that the new setuptools version fixes our issues.

Change-Id: I3ded4f83918d74ca91a8c7a4aede9ef4d1d7a489
2015-01-05 09:44:26 -08:00
Jenkins a39ec21014 Merge "Log directly to syslog from os services" 2015-01-05 17:29:44 +00:00
Gregory Haynes 5fc2040aa5 Log directly to syslog from os services
We currently have a horrible hack for upstart where we run our services
with stdout and stderr piped into logger. There are lots of issues with
this, such as upstart has a hard time knowing which PID to track.
Conveniently, python logging knows how to syslog, so why not just use
that!

This changes the default behaviour of os-svc-daemon to create a python
logging.conf so services log directly to syslog.

This also changes the default upstart respawn limiting to be 2 fails in
10 secs. This is becauce making upstart monitor the actual service
daemon was causing some services to respawn loop due to time it took
them to fail.

Closes-Bug: #1385346

Change-Id: Ibd491881d79160ad1457526d51512f5fc1cf9ea5
2015-01-05 09:28:57 -08:00
Gregory Haynes 01694b1547 Pin setuptools to <8.0
Setuptools 8.0 changed the way it parses version strings and many of our
openstack packages break when using it. Pinning this for now until our
packages are fixed.

Closes-Bug: #1402305

Change-Id: If3300a6b1ef1c633fc339f884e9dab0d82bc0720
2014-12-14 10:54:37 -08:00
Jenkins 2c52702d71 Merge "Remove selinux from os-svc-install element-deps" 2014-12-04 17:50:48 +00:00
Gregory Haynes 57dd108fd0 Deprecate positional args for os-svc-daemon
We advertise supporting passthrough arguments in os-svc-daemon by using
'--' followed by extra params. This does not work if using the
undocumented old-style positional arguments and fixing this is a
non-trivial parsing problem. Lets just deprecate this old behaviour so
we can remove it.

Change-Id: I0e75f7f975325b5f199daf697004628461a20075
2014-12-01 18:20:47 -08:00
Steve Baker 225e341e64 Remove selinux from os-svc-install element-deps
os-collect-config depends on os-svc-install, so non-tripleo images
are getting tripleo selinux policies installed on them. This is
making o-r-c runs much slower for no benefit (and sometimes making
o-r-c exit with an error http://paste.openstack.org/show/135018/)

Change-Id: I90a8fb67e688ed068b5e7123e76aeced9af968b1
2014-11-20 14:55:57 +13:00
Tom Howley cbff052e66 Install os clients from git
When installing openstack clients, which have been pulled in as
requirements for openstack services, allow for the installation
from source repos, if the source install type has been selected.

Change-Id: I72037c5679b17102de5df02d08194fdb56f856d4
Closes-Bug: 1390051
2014-11-18 13:28:20 +00:00
Derek Higgins 5b228d2064 Revert "We need to tell upstart to expect the logger fork"
This reverts commit 615c6bb95b.
Using "expect fork" results in hitting a bug causing some service
restarts to hang which in turn is preventing os-refresh-config
from completing.
https://bugs.launchpad.net/upstart/+bug/406397

Change-Id: Ib893b1428e3cac3084d07b4d98c9cb69d60bb3cf
2014-11-13 11:25:31 +00:00
Michael Kerrin 615c6bb95b We need to tell upstart to expect the logger fork
Otherwise upstart doesn't get the correct process id for the service
and in some causes can fail to kill the process during a servcie stop

Change-Id: I138dd2206ed1e511fbabaf43bd3cb1d163c76db4
Closes-bug: #1385346
2014-10-24 16:42:12 +01:00
Gonéri Le Bouder a59e7ea360 systemd: always use /lib/systemd
Debian and Ubuntu use /lib/systemd whereas Fedora usr /usr/lib/systemd as the
default system unit directory. This already leads to conflict when the
debian-systemd is used.

Fedora provides a symbolic link between /lib/systemd and /usr/lib/systemd
to also support /lib/systemd directory. With this patch, we use /lib/systemd
everywhere.

This patch supersedes I413a92284e6a79e7fcdde99c5138bc3ce8e85e80.

Change-Id: I459f7514ab35082d31607968252a9005fa25de2a
See: https://bugs.debian.org/719634
2014-10-17 10:27:28 +02:00
Ryan Brady 90b2f10302 Fix os-svc-install
The 'a' option was missing from the getops set of available options
in os-svc-restart.  This is causing CI failures in patces with an
"illegal operation -- a" error.[1]  This patch adds the 'a' option
to os-svc-restart.

[1] Ib3bc5c47de1b8bb6006530d56e9d47c3763af7b5

Change-Id: I527c5b0cda0cda7877d23422702517760c1bf340
2014-10-09 18:09:23 -04:00
Ryan Brady 49dbaae6df Add initial svc-map support
This patch incorporates the svc-map patch[1] into other
elements by integrating svc-map into the os-svc-install
element.  This patch adds the -a option to select svc-map
instead of the default of map-services.  The -a option
enables a phased transition from map-services to svc-map
usage throughout the rest of the elements.

[1] Id11433ea342aace71a358936a7ca3151ec11d506

Change-Id: I382631746e458f2f8603a7dcf5221a21f4b53255
2014-10-02 10:35:54 -04:00
Jenkins 42ffac22e1 Merge "Revert "Pull in patched eventlet to fix Second Simultaneous errors"" 2014-09-12 14:09:45 +00:00
Steve Kowalik f1d096d95a Drop all direct usage of systemctl enable
Since we already have a wrapper script for enabling services called
os-svc-enable, drop all direct usage of systemctl enable, replacing
it with os-svc-enable.

Also drive-by replacements of == with =. == is a pattern match.

Change-Id: I707bf6f02207308e8f61caff17a27b0697096359
2014-09-05 15:11:08 +10:00
Gregory Haynes 9edecd320a On ubuntu break app logs into their own files
Currently on ubuntu we are sending all app logs to syslog which munges
them all together into /var/log/syslog. This makes debugging a somewhat
painful experience.

Change-Id: I89f9ddc168f08b90cece7cf5af2e032b2c4f5371
2014-09-02 14:03:36 -07:00
Jenkins 42f751106c Merge "Log tripleo services to syslog" 2014-08-22 15:48:00 +00:00
Jenkins 4562892fcf Merge "PEP8 on the doc and elements files" 2014-08-20 23:13:04 +00:00
Gonéri Le Bouder 0172b5aacc PEP8 on the doc and elements files
ensure the Python scripts in the doc and elements directories are PEP8
compliant.

test_os_svc_daemon.py test is fixed in another patch:
  I9b1859f9fc5846c7c42606644231105618e1a1a0.

Change-Id: If5068ef77d6643c19de36bfcf4b4bf790f86b538
2014-08-19 10:02:00 +02:00
Michael Kerrin 872e508215 Revert "Pull in patched eventlet to fix Second Simultaneous errors"
This reverts commit 0011e19c15.

Eventlet version 0.15.1 has been released with the fix to the
"Second Simultaneous error"

Change-Id: I1e6e27f32f1b24e14a4ecb91f3433647fbb69a3e
2014-08-18 17:23:44 +01:00
Gonéri Le Bouder 553eef04e2 fix: test_os_svc_daemon.py
Since I6487d0726db08912eed3062dfee2552940eadcfb, a ExecStartPre call
is added in the systemd .service file.
This patch adjust test_os_svc_daemon.py.

For the record, the remaining PEP8 error is fixed in
If5068ef77d6643c19de36bfcf4b4bf790f86b538.

Change-Id: I9b1859f9fc5846c7c42606644231105618e1a1a0
2014-08-18 14:08:12 +02:00
Richard Su bd228e4b3a Fix /var/run SELinux file contexts
/var/run/<service> needs to be relabeled with the correct file
contexts. With systemd, these directories are created anew each
boot by /lib/systemd/system/<service>-create-dir.service.
os-svc-daemon was updated to correct the file contexts.

Change-Id: I6487d0726db08912eed3062dfee2552940eadcfb
Closes-Bug: 1346559
2014-08-01 17:12:31 -07:00
Michael Kerrin 0011e19c15 Pull in patched eventlet to fix Second Simultaneous errors
We have patched eventlet to resolve the issues around
Second simultanous read errors. Pulling in the eventlet
pull request here.

This is a temporary workaround until the changes get merged
into eventlet and released at which point this will be dropped.

Closes-bug: #1308079
Closed-bug: #1229475
Closed-bug: #1308045
Change-Id: I0495f8c443429d9bdbbd97d46fe9a8e180b867ee
2014-07-28 10:07:01 -04:00
Steve Kowalik 2171b584a2 Support init.d-using services in os-svc-enable
os-svc-enable-upstart currently only works for Upstart scripts,
and will print a warning that the job doesn't exist, and then
create an .enable file anyway. If the action is enable, and the
Upstart config file doesn't exist, but the initscript does, run
update-rc.d.

Change-Id: Ib1e3d4e2963dd2ce4d96078781a929205c25d886
2014-07-21 15:00:21 -04:00
Derek Higgins 1ad23b193f Log tripleo services to syslog
Logging to an upstart logfile results in log entries that are not
associated with a timestamp(e.g. os-collect-config). This isn't
consistent with the log files produced in other openstack CI tests
and means we can't index them in logstash (at least consistently
with how the other projects are indexed).

As a result of this we will need to remove the double time stamps that
get produced (by taking them out in each of the services configuration)
and extract the log at the end of CI into per-service files so that we
can selectively index the files we want.

In particular the service that doesn't contain timestamps in all of the
log entries is os-collect-config which is arguably one of the most
important service logs we want indexed. We could simply just divert this
service alone to syslog but doing them all is more consistent with other
distros and how this will presumably work when ubuntu moves to systemd.

Change-Id: Ib8c1fc39d56b2b9c6d8e9b64a868def619aa2f1f
2014-07-03 22:49:17 +01:00
Gonéri Le Bouder 0a71316726 indent using 4 spaces (3/3)
As advised in I072cf8bf6748d0c910fecffdf2282bcc4656d038, code should
use 4 spaces for indentation.
This commit enforces the use of 4 spaces indentation.
In order to simplify the review process, this patch only cover the
following elements:
 - os-apply-config
 - os-collect-config
 - os-refresh-config
 - os-svc-install
 - pacemaker
 - pypi-mirror
 - qpidd
 - rabbitmq-server
 - snmpd
 - stackuser
 - tripleo-cd

Change-Id: I3f365f6a1cd6fd9e56402ad3bd6572192b85d798
2014-05-23 00:32:41 +02:00
Ben Nemec 79f224d04a Add unit tests for os-svc-daemon
Adds a set of unit tests for os-svc-daemon to verify the output
of running it with various options.  Includes a base test class
with some convenience functions for testing scripts.

Change-Id: Id54291686d39ab1b9f0ce4848a2fcf3c18a9ea18
2014-03-28 19:55:29 -05:00
Jenkins c6e922197a Merge "Allow os-svc-daemon to specify dir name with -d option" 2014-03-27 14:58:27 +00:00
Jan Provaznik 195ad9d595 Adds mysql-dev and mariadb-dev elements
It have to be separate elements because installation differs depending
whether mysql or mariadb is used.

Change-Id: I9299b8e21a5ea2ff13ab9f11d851703a67c6b130
2014-03-26 21:22:31 +01:00
Ben Nemec 97f9fbed77 Allow os-svc-daemon to specify dir name with -d option
In some circumstances we need to be able to create a /var/run
directory without actually installing a service.  This behavior
was supported before, but these changes allow the user to specify
the directory name and streamline the process by making -c an
optional parameter instead of requiring a dummy value.  It also
makes this functionality available on upstart-based systems.

The existing uses of -d had to be updated as well to reflect this
new behavior.

Change-Id: I34f33f2290eeefb5be82c0cf5198ae53d34332ce
2014-03-25 13:53:59 -05:00
Jon-Paul Sullivan 1c998eb93f Create pip manifest files of installed packages
Create the pip-manifest element to encapsulate the saving and use
of pip manifest files.

Ensure that it installs prior to any elements that should be able
to use it.

Write pip manifest files for installs in:
    * os-svc-install
    * os-apply-config
    * os-collect-config
    * os-refresh-config
    * openstack-clients

Enable using a manifest file to reinstall exact versions of
packages in a subsequent run through the DIB_PIP_MANIFEST_*
environment variables.

Change-Id: I4d4ab5921c534727b48cb9969ec8ecfd2c26e6ed
2014-03-25 12:22:59 +00:00
Jenkins 3815353d6d Merge "Explicitly install pbr via pip" 2014-03-24 23:24:33 +00:00
Gregory Haynes aa62d27972 Explicitly install pbr via pip
When a pypi mirror is used with certain conditions installing pbr as a
dependency fails.  This is a temporary fix until the underlying cause
is resolved.

This is also required for a wheels based pip mirror to work.

Change-Id: Ia08eb16b96d9897fa2f86239ea264b145ef0b9b5
Closes-Bug: #1293812
2014-03-24 12:43:01 -07:00
Dan Prince 848f2b881b Add -i options to os-svc-install/os-svc-daemon...
Update os-svc-install with a new -i option which can be used
to specify the virtualenv directory.

Update os-svc-install with a new -s option which can be used
to enable system-site-packages within the virtualenv. By
default this is disabled (matches virtualenv's default...)
In doing this we remove a hard coded check for the 'nova' service
by making nova use the -s option instead.

Update os-svc-daemon with a new -i option which can be used
to specify the virtualenv directory.

NOTE:
 I used -i for both os-svc-daemon and os-svc-install since it wasn't
 already used and I wanted to make the option the same in both places.

Change-Id: Ief53567711b0153de890d50a28c471b1e5acd56c
2014-03-24 09:55:53 -04:00