Commit Graph

20 Commits

Author SHA1 Message Date
Ghanshyam Mann afc328f084 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: Id4d49b7bd8745828366a4ba21ff9c9ffbebbe130
2024-02-24 11:41:13 -08:00
Ian Wienand 51661c33a5 Show tracing around sourcing environment.d files
Sourcing of environment files is a bit different than running scripts,
because they are imported into the current environment.  That means
that if they are fiddling with "set -x" you can get odd things in the
output -- for example, if one environment file enables tracing then
all proceeding sourcing will have it on, but all the files sourced
before will not have output.  This is super confusing.

It's also very helpful to see how things are being expanded as they
set environment variables.

Thus I think the best idea is for environment files to leave tracing
alone and dib-run-parts can a) give a useful output about what file it
is sourcing and b) enable tracing around the import, then restore it
to the previous state afterwards.

Change-Id: I29f7df1514aeb988222d1094e8269eddb485c2a0
2016-10-20 13:30:41 +11:00
Jenkins 67fc832177 Merge "Source environment files in a subshell" 2016-06-03 01:39:50 +00:00
Andreas Florath 8849712178 Use 'output' function instead of 'echo' for statistics log
In bash the only sensible way of returning a string from functions
or scripts is via stdout.
dib-run-parts not only 'returned' the output of the called scripts but
also some statistics / performance output.
Other parts of the script already used an 'output' function so
the statistics output was adapted to also use this kind of function.

In addition three simple test cases are implemented to check
the basic functions of the script.

As a result the log-output of the dib-run-parts is somewhat cleaner.
It also makes debugging of the called scripts easier.
This change is the precondition for simplification of functions like
diskimage-builder's eval_run_d.

Change-Id: Ie2f0332359a72ca7ab03f94b7573e073df714a97
Signed-off-by: Andreas Florath <andreas@florath.net>
2016-06-02 12:09:43 +10:00
Ian Wienand 88097e830f Source environment files in a subshell
By sourcing the environment files directly into the running process,
dib-run-parts can pollute its own environment.  For example, if an
environment script enables tracing (set -x) then that enables tracing
for dib-run-parts; particularly annoying as it then spews a bunch of
stuff relating to the profiling.

Move to sourcing the environment files in a subshell with the scripts
to be executed to keep things separate.

Change-Id: I1e39822f218dc0322e2490a770f3dc867a55802c
2016-06-01 09:42:25 +10:00
Martin André ddd80eac8d Depend on awk rather than python
This allows to run dib-run-parts on systems where python is not
installed, such as Debian docker image. Generally, awk is more likely to
be available than python.

Change-Id: I26d7ad55a56ca4785a779f576e2da50a69400563
2015-02-18 15:51:52 +09:00
Jenkins bfe7957863 Merge "Sort the list of scripts in the profile view" 2014-09-29 10:23:38 +00:00
James Slagle 480e1e7ec8 Update dib-run-parts
dib-run-parts in dib-utils had several fixes missing that had been
committed to diskimage-builder. When diskimage-builder switched to using
dib-run-parts from dib-utils, we lost these fixes. The switch over
happened in Ia0a0df7784a14c49b5c47ac0b03e6c2602c84b3b

These are the fixes from diskimage-builder that this commit adds back:
I44cf98dfc80cfcaec54b88cc83be80a3dbf2cec3
I24fd76c2b4f66b8036010b5079db39ead729abee
Iad2d490c86dceab148ea9ab08f457c49a5d5352e
Ieb48faacb4c96b7b358771d70c17f2f22d0354f4
Ia68853505485fefbf0890313456e7edb6097666b
Ibfb562c5970b40598fc95da1e8d4beb9d51d7612

Change-Id: Ice4b6a4b3d36a02099a682ae8cda4721211d51d9
2014-09-18 09:47:45 -04:00
Jenkins 99949120d0 Merge "Use --tmpdir with mktemp" 2014-08-28 14:56:50 +00:00
Jenkins e9ca8f88db Merge "Set LC_ALL=C into dib-run-parts env" 2014-07-28 09:02:51 +00:00
Pino Toscano 494c067930 Sort the list of scripts in the profile view
When showing the timings of the executed scripts, sort the scripts in
the same way they were executed. This eases the comparison between runs
of dib-run-parts.

Change-Id: I171499c30e1a992d7225be8a9dc00e0f03ec46b0
2014-07-25 11:33:00 +02:00
Pino Toscano 5327bf9a08 Use --tmpdir with mktemp
Pass --tmpdir to mktemp so the new temporary directory is placed
within $TMPDIR, or falling back to /tmp. This way dib-run-parts can
use whatever the temporary directory is, instead of using an hardcoded
/tmp.

Change-Id: I6b55e3c6c1fe22108ea555d3766e0323695bd96d
2014-07-25 11:01:32 +02:00
Alexis Lee dade7ef1aa Set LC_ALL=C into dib-run-parts env
Force LC_ALL to C to allow printf to work independently
from the locale. Gives invalid number error if run in non-english
locale.

Port to dib-utils of: Ia68853505485fefbf0890313456e7edb6097666b
Change-Id: Ibbfa7a4a91dca72b16bb8fcb9602b71eccf54008
2014-07-14 14:58:59 +01:00
Alexis Lee 7c03ab48a1 Don't match editor backup files in environment
The current glob match for environment files can source editor backup
files (foo.bash~) which will override the real changes you have made.

Other parts use the regex to avoid matching such files, so do
the same for environment file matching.  Note this has to match "."
unlike the other regex, as most env files are "foo.bash"

Port to dib-utils of: I934486b3ff5884063d29c6d9b66fd9b11140464c
Change-Id: I11c030e8556d89c240e36233b249f0c1d9f80908
2014-07-14 08:50:51 +01:00
Giulio Fidente 45b7cf44bc Ensure dib-run-parts profiling works with py3 and py2
This change adjusts the "inline" python function used to profile
run-parts duration to make it run successfully on both py2 and py3

Change-Id: If1e6ac6fe528ca0225dcdbe5774545512be9d13a
2014-06-06 18:35:18 +02:00
Ben Nemec 3c377b5b24 Move dib-run-parts into bin/ 2014-04-24 22:01:36 +00:00
Ben Nemec 703c942b47 Fix up diskimage-builder references
There are a few things leftover after running filter-branch on the
repo.  This removes them.
2014-04-24 21:48:31 +00:00
Tim Serong 96a11fa46a Enable running disk-image-create on SUSE Linux
- Ensures /sbin and friends are in $PATH when invoked (without this,
  various sudo invocations fail in exciting ways).
- Use dib-run-parts in lib/common-functions instead of run-parts
  (neither SLES nor openSUSE ship run-parts).
- Ensure dib-run-parts doesn't descend into subdirectories (same
  behaviour as run-parts).
- Move dib-run-parts from root.d to bin (cleaner, consistent with
  other elements with separate bin scripts).
- Tested by building Ubuntu image on openSUSE 12.3.
- Note: this doesn't add support for creating SUSE images, it just
  lets you run disk-image-create on SUSE-based distros.

Change-Id: I906c6bc3cf51cdf2c4415adeae1ca250faac25e1
2013-07-22 20:06:54 +10:00
Chris Jones 86a5288ff5 Build ramdisks in an image chroot.
Ramdisks are now built inside a chroot which is built by the normal
image build process. Doing so improves our independence of the
precise state of the build host.

This fixes bug 1194055.

Change-Id: Ibc254fbb9e7b404b5f38c1b35bcde8a4136e8e28
2013-07-01 17:20:15 +01:00
Clint Byrum 6e194048ff Add a simple implementation of element dependency
This adds a new optional file to the root of elements. The
file lists dependencies which will be added to the list
requested by the user during disk image creation.

Change-Id: Id71c3b333563604bbbaf90f9cf40e24fa9738fc8
2013-01-21 17:35:31 -08:00