Commit Graph

3216 Commits

Author SHA1 Message Date
Anshul Jain
dfc8fbf907 python-brickclient: accommodate python2/3 changes
Following a similar fix to pip-and-virtualenv element in
Ia730850a48e2478fd5461710a9d2619408725cd8, python-brickclient is also
required to be fixed to handle python3 only systems.

Change-Id: I442469beb5a20074425e7059eec7f78604d6cc5a
2017-02-08 09:33:02 +11:00
Andreas Florath
23ac49bf83 Move Ubuntu specific use_tempaddr setting to ubuntu-common element
By default (during boot) the use_tempaddr is set to <=0 for all
up-to date kernels.  Only Ubuntu installes a sysctl setting which
sets the use_tempaddr to 2 (/etc/sysctl.d/10-ipv6-privacy.conf) [1].
The 80-disable-rfc3041 overwrites this setting and sets
use_tempaddr back to 0.

Because this only affects Ubuntu it makes sense to move the script
to the ubuntu-common element. The other motivation for the move is,
to clear the base element that it can be removed.

[1] https://bugs.launchpad.net/ubuntu/+source/procps/+bug/1068756

Change-Id: Ibf261818ca8243874fde9eb3650bb65188fa228d
Signed-off-by: Andreas Florath <andreas@florath.net>
2017-02-07 20:41:13 +00:00
Jenkins
740c0a85df Merge "Move generation of dib_[environment|args] to manifest element" 2017-02-07 20:23:06 +00:00
Jenkins
15969b9c21 Merge "Preinstall pyOpenSSL" 2017-02-07 08:53:23 +00:00
Jenkins
0713387588 Merge "Turn down some low-value tracing output" 2017-02-07 08:20:02 +00:00
Jenkins
cac1471cc8 Merge "yum/install-packages output cleanup" 2017-02-07 06:34:26 +00:00
Jenkins
ab478545b1 Merge "Target map-packages deprecation message" 2017-02-07 06:24:41 +00:00
Jenkins
6372de09fe Merge "Use strings in package-installs follow output" 2017-02-07 05:50:40 +00:00
Nam Nguyen Hoai
e3b67a3d45 Fix typo in README.rst
There is a wrong word, it should be updated.

Change-Id: Iff70cc9154ef3b3121207df627e83271fd3159a9
2017-02-07 13:58:24 +07:00
Ian Wienand
cc177cc215 yum/install-packages output cleanup
Rather than echo the package list separately, turn on tracing around
the yum/dnf call so that we get more complete output.  No loss of
info, as this effecitvely shows the packgae list; plus it has the
bonus that it makes more sense in the logs, because otherwise you get
all the yum/dnf output without knowing what the call was.

Change-Id: I44df6e944af602e6b03f669c15a521056de1ad79
2017-02-07 15:49:47 +11:00
Ian Wienand
124cec0bba Preinstall pyOpenSSL
With the warnings added in Ibfe69dc84246662ed8caa0d4c3e2edf68314c87e
we can see that this element is relying on map-packages to translate
the debian package name python-pyopenssl -> pyOpenSSL.

This makes no sense because this is not a generic element; it should
just use the fedora/redhat names directly.

Change-Id: Id6ecb6f978b60d6a527692692a408d1d35828de2
2017-02-07 15:47:37 +11:00
Ian Wienand
5bd8158862 Target map-packages deprecation message
Currently every run of install-packages puts out a warning that
map-packages is obsolete.  This happens even if map-package does no
mapping.  The caller can't prevent the call (it's part of
install-packages) and it gives no actionable help if there is
something wrong.

Keep track of any mappings we are doing in the obsolete map-packages
run and only output a warning if we actually translate anything.  If
we do output, tell the caller what packages were translated so they
can make appropriate pkg-map entries.

Change-Id: Ibfe69dc84246662ed8caa0d4c3e2edf68314c87e
2017-02-07 15:44:51 +11:00
Ian Wienand
3c6972a5c0 Turn down some low-value tracing output
There are a couple of loops identified here that output a lot of
tracing each iteration for little value.  Make them only trace at
higher levels (-x -x and above).

Points of actual interest within the loops are replaced with an
explicit "echo" statement.

Additionally, export DIB_DEBUG_TRACE explicitly and in all cases, not
just when tracing is turned on.

Change-Id: Id710c0b111fc1f5e1ae87fc35f6db28b24867bad
2017-02-07 15:26:11 +11:00
Andreas Florath
870374c8da Move generation of dib_[environment|args] to manifest element
dib_[environment|args] manifest files are currently generated by the
base element and then moved by the manifest element.

This creates too many corner cases -- if you don't include the base
element (we are trying to empty it ATM) you don't get the env/args
saved at all; if you include base but don't include the manifest
element they're saved to /etc, but if you do have the manifest element
they're moved to the manifest dir.

Move generation of these into the manifest element directly and update
the documentation to reflect this.  In practice this doesn't change
things, because the "manifests" element gets pulled in via deps for
most builds.

Change-Id: I3f23037058137d166b29f0b70fd1a02c22c07fc8
Signed-off-by: Andreas Florath <andreas@florath.net>
2017-02-07 11:33:16 +11:00
Jenkins
0f224d3ae6 Merge "Check return of _load_state" into feature/v2 2017-02-06 23:41:50 +00:00
Andreas Florath
df1f583903 Check return of _load_state
In error scenarios there might be no loadable state available.
This patch adds some robustness handling this scenarios
by checking the result and possible bailing out.

Change-Id: I02e2731b14bec22c22db08d60d8d15db1911a84e
Signed-off-by: Andreas Florath <andreas@florath.net>
2017-02-04 19:21:48 +00:00
Andreas Florath
a8953dd277 block-device: change top level config from dict to list
With the old configuration structure it was only possible
to use one image and one partition layout.  The new
block-device configuration uses a list at top level;
therefore it is possible to use multiple instances
of each element type.

Change-Id: I9db4327486b676887d6ce09609994116dbebfc89
Signed-off-by: Andreas Florath <andreas@florath.net>
2017-02-03 20:15:39 +00:00
Ian Wienand
3f8800832a Release 1.27.0
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYk8+9AAoJEBty/58O8cX8LdIH+wU/VrEVs0XYohiL6DUgabzs
 112U3UUihH5xMc/ca9Tarx+XwEvfMZkwYN2Qr0JoRJjmSt2AL6AezUhGSV+98vaY
 iQEccaFDFYlyDHm4V2r7N1xwS0B3mx87FPqVQQSUKlc3JsQxCy4o9RtD9aM8Gvqy
 +gAxMxL3p3O131K0Rvb0U5lC1FLgft9SuljCV8i5nU4/HdoryD6hedz2/ss8a9KG
 KKEdBKvPBKn73+nb8peQD/VXpej9C31r87q5VEjUsZkJ7gduY/qYLlGGgoBQqAXN
 WQ/ef1RkQKW5ba2jsjnk7fdOrA0+wYENxorR2WecuZbe2ieXw6fP3lYiD6VeWsM=
 =IUuh
 -----END PGP SIGNATURE-----

Merge tag '1.27.0' into merge-branch

Release 1.27.0

Change-Id: I9f6948636cae6d375d1d8315976504021f5a3bbb
2017-02-03 11:49:45 +11:00
Jenkins
111cb51055 Merge "Unify tidy up logs in lib/img-functions" 2017-02-03 00:29:48 +00:00
Jenkins
03d1af7380 Merge "Don't run unit tests from run_functests.sh" into feature/v2 2017-02-02 22:51:04 +00:00
Ian Wienand
adf39c52cf Release 1.21.1
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYW2GoAAoJEBty/58O8cX8uSAH/15dJsglP6Zie7jSSJcR6k+e
 PJembHn9qrqrCjmJ5EwakojySaaLhwEJKvlP54OU9v7pmUXL9gJtK2OzW54LQ41g
 xBHIu0Pg4z7juyHm9+1P2Sr7Mzs1pVSEbsIYpDYUU19eghI1EAeIj3I1woKgajN7
 JlI61j3r67G6EAVtPOnmD1jvXS8CrtjiJ9wtWTH20pWfmksovg/GuXUCZrLkAAhO
 NcK35CdMii1Hkr7XOH424La/Ar+3qfUX18ZkbJY6yHzkq/ityTzzKOFjAaDl2Jg9
 WNc+SLCVYpPhPwgt7miTywamUNj3ZviA5/Hd8fuLXmtHSLQ23WOtBiaQMLtwXHs=
 =8dIl
 -----END PGP SIGNATURE-----

Merge tag '1.26.1' into merge-branch

Release 1.21.1

Change-Id: Ib9eb3dd1d384fc5b6a9846608216e056c57a173a
2017-02-02 20:36:23 +11:00
Ian Wienand
19f13958f7 Handle blank lines in element-deps
When merging feature/v2 we have re-enabled the centos-minimal test
which has a blank line in the element-deps.  The modified get_elements
functions added in If97bcd21e45de1b5ed91023fdc441a4617051a6b were not
handling this.

Fixing this, we can extract this into some common code for
element-deps and element-provides.

Also, I noticed while debugging that the element list is an iterator
from reverse(), so printing it doesn't help.  Fix up the debug output.

Change-Id: I8e9b079f586e8a36dba3797a0fc03ca1b2041a04
2017-02-02 18:18:46 +11:00
Ian Wienand
f1af76f228 Don't run unit tests from run_functests.sh
Change ec7f56c1b2 add added unit tests
in diskimage_builder/tests/functional (this is probably misnamed).

These are found and run by testr just as part of the normal "setup.py
test" run.  Don't run them as part of the functional tests (this
breaks "-h"/"-l" because it installs a virtualenv and runs tests, and
also is incorrect in the gate where it's creating a nested virtualenv
underneath the testing virtualenv).

Change-Id: I9908e080042d3026a198ba89eb653c6eff376d22
2017-02-02 15:20:24 +11:00
Ian Wienand
bfca36c772 Release 1.25.2
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYV1yqAAoJEBty/58O8cX8hLwIAKP66w6MdPN8PDgUOteui/Sx
 N0UFKJ9yR4GQOAP0NffPLjch5/g0iJLs3eFKOhtGC1LjbDjpVgjX8vW18ib8wBZK
 GemOZPF3uxg8FROrZF1vpoDy/cHgL1YV10hCnwdjN/r9rb8zOuSabqjW+Dennj2n
 fZ0SJfa8Owfudn3YxGuOymVb/wMtEloDmVGBEI1Y+h7osELCCDi3OXmwsA8qMsdl
 cTwbeugBs4PlOVbZUK/JKGuwIHKgPnDYzYu5KpXw77/MdjGT0fo5Tlq5AOBDI2sC
 9JOFEBDli4Ro05VwvI58ADMpvvOax+9EvOhLbB1dRPdZl21Iyb6gOdy2PUbFO0c=
 =aKxq
 -----END PGP SIGNATURE-----

Merge tag '1.25.2' into merge-branch

Release 1.25.2

Change-Id: I698bcf2e82117bd81649cd065a7af5cac85990c7
2017-02-02 11:20:00 +11:00
Jenkins
b4266001d0 Merge "Spec for changing the block device handling: partitioning" 2017-01-31 17:45:19 +00:00
Jenkins
47e1ab5c9e Merge "Create ubuntu/fedora test for pip-and-virtualenv" 2017-01-31 17:45:14 +00:00
Jenkins
7f08bd6234 Merge "Speed up chroot checking loop" 2017-01-31 17:42:04 +00:00
Jenkins
f054e5f24a Merge "debootstrap: avoid duplicate network configuration" 2017-01-31 17:39:28 +00:00
Ian Wienand
83bdfe179a Git ignore coverage stuff
One less piece of clutter when you're trying to merge ...

Change-Id: I794027280359f5d1e02d4f3b99222d35783075d5
2017-01-31 14:21:21 +11:00
Ian Wienand
b6e631360f Release 1.24.0
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYP+r7AAoJEBty/58O8cX8ZcMIAI7Yy2BfGqY/jfyLYNryATSu
 g78McMxAeOiPYII+KKyVkeWsChKJUafLZr/ppO95pm7ZLXeHQeC4MHDI68RmghIX
 HVXn4hPYzwlZ+Yr4hqaEf11H+vw0TDxo2a5bxlQZw+FCx9+3lkR60QxWf8a6QCxv
 nLqKIhtpwGi9mIyvAya+MaOmHMHqbNYgIBHKP0yXhTdxoHZoJWZeXN1rkelwAF9N
 TS1+KwIk+uemn1ZlqzYDWj8euyFyAv8L0WlF0ztCKe7TAFvNeMo26fLykeKHVDEo
 GC5R8MshiOtihPC972rNIponIzd62AetTlDxfK+gcUZO21pNTrlgdLX5Jn04fo0=
 =BpQc
 -----END PGP SIGNATURE-----

Merge tag '1.24.0' into merge-branch

Release 1.24.0

Change-Id: I23cfa6f8dc66bb6a1d957a49a5b468cfd47c005b
2017-01-31 14:14:19 +11:00
Jenkins
cb7173609d Merge "Remove hardcoded components" 2017-01-31 00:10:38 +00:00
Jenkins
619a0d736a Merge "Don't set base element path in run_functests.sh" 2017-01-27 16:40:48 +00:00
Jenkins
7421f61366 Merge "move post-install.d to finalize.d" 2017-01-27 16:40:15 +00:00
Jenkins
7f218fe10e Merge "Use %i instead of %I in dhcp-interface@.service" 2017-01-26 23:02:15 +00:00
Jenkins
7b8b673d15 Merge "Update hpssacli to ssacli in proliant-tools element" 2017-01-25 07:48:35 +00:00
Andreas Florath
ec7f56c1b2 Refactor: block-device handling (partitioning)
During the creation of a disk image (e.g. for a VM), there is the need
to create, setup, configure and afterwards detach some kind of storage
where the newly installed OS can be copied to or directly installed
in.

This patch implements partitioning handling.

Change-Id: I0ca6a4ae3a2684d473b44e5f332ee4225ee30f8c
Signed-off-by: Andreas Florath <andreas@florath.net>
2017-01-24 19:59:10 +00:00
Jenkins
29ac096e49 Merge "Bump fedora release to 25" 2017-01-24 16:36:19 +00:00
Jenkins
1a94a72965 Merge "Set grub device in /etc/default/grub" 2017-01-24 06:16:21 +00:00
Jenkins
fbe5f5a11a Merge "ironic-agent: use /sbin for modprobe" 2017-01-23 23:19:55 +00:00
Andrey Shestakov
11d384e2fa Add DIB_IPA_COMPRESS_CMD option
This option allows to specifiy command for compress built initramfs image
for ironic-agent element. This command can be specified with arguments and
should read raw data from stdin and write compressed data to stdout.
Default if "gzip".

Change-Id: I0fdd2ab91d7bf7aaaa6cdd5278e3902d44c5b883
2017-01-23 13:28:32 +00:00
Ian Wienand
ca60b2cf7d ironic-agent: use /sbin for modprobe
On redhat/fedora /sbin is a symlink to /usr/sbin, but not on all
platforms.  This was put in with
Ibf74dd1b2678ea76e0676711a7aa5ba6b88d5421

Change-Id: I7847b29503c3c07503430a7d85a5364911894c6c
Closes-bug: #1658297
2017-01-23 14:35:25 +11:00
Matthew Thode
dc8449bf02
move post-install.d to finalize.d
It looks like I installed the cleanup file in the wrong location.  Moving it
to the correct location and cleaning some more stuff up should allow for a
much smaller image, currently tested at 300M vs 490M.

Change-Id: I9d0a24b0fe59d4f2d38aa88ba47e4400e0476b46
2017-01-22 15:53:02 -06:00
Paul Belanger
90a347707c Bump fedora release to 25
Now that fedora-25 is released, bump fedora-minimal / fedora elements
to use it.

Change-Id: Ifdb05255e7a138b99099252fe17041fe4621b6f4
Depends-On: I3cc467a2d08486458b3f625f94ba969532f6cd04
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-01-21 16:00:54 -05:00
Jenkins
6c0eb3d905 Merge "Add get_elements; preserve backwards compat for expand_dependencies" into feature/v2 2017-01-20 10:25:54 +00:00
Jenkins
48bbbe6268 Merge "Fix coverage report" 2017-01-20 00:13:31 +00:00
Jenkins
75e5ab5393 Merge "Fix dhcp-all-interfaces for ubuntu-minimal xenial" 2017-01-19 21:11:40 +00:00
Jenkins
074a10fd74 Merge "Allow disto-specific mirror settings" 2017-01-19 21:00:56 +00:00
Andrey Shestakov
a45ad8eaf5 Fix dhcp-all-interfaces for ubuntu-minimal xenial
The start script of dhcp-all-interfaces currently requires ifup command.
ifup command provided by package ifupdown, which is not installed in
ubuntu-minimal Xenial.

This change adds ifupdown package for debian family, as it required for
dhcp-all-interfaces.

Closes-bug: #1647853

Change-Id: I6dfc0108ec067f350b22e9fb933b9e8d47b09fde
2017-01-19 17:29:43 +00:00
Ian Wienand
fb942b752d Use strings in package-installs follow output
I noticed in debugging that with python3 all the pkg-installs output
is preceeded by a b'foo', which suggests coding issues lurking.

The universal_newlines argument makes subprocess readline() returns a
decoded str (via locale) instead of a byte-string.  This clears up a
couple of points where we explicitly decode and cleans up the print
output.

Minor formatting cleanup of command and exit display.  Don't strip the
leading spaces so indents retain in the output

Change-Id: I2894f10a0c2fc618563641b9d106b716f4a544aa
2017-01-18 19:26:40 +11:00
Ian Wienand
0ceb138d87 Don't set base element path in run_functests.sh
DIB automatically includes it's base elements in the ELEMENT_PATH;
this double-set means the base elements are in the path twice, leading
to some tools that walk the element list (package-installs-squash, for
example) to do things twice.

Change-Id: Icf631427601cfd2abed436711cedb9e002fff8f9
2017-01-18 19:26:28 +11:00