Commit Graph

47 Commits

Author SHA1 Message Date
Jenkins
9e16c8c5f1 Merge "Use dnf to cleanup old kernels" 2016-02-15 22:56:12 +00:00
Dmitry Tantsur
1f9e669dbc Do not remove python-dev from ironic-agent image
While it does save 1MiB of space, it might also pull python packages
depending on it. E.g. it makes impossible to install python-hardware
on the IPA image for advanced introspection.

Change-Id: Iab80dde63e6de62a5e45dcf404b4f9f633e50ac3
2016-02-11 13:47:31 +01:00
Ian Wienand
cb0e0e903d Use dnf to cleanup old kernels
As described in the comment, there is a dnf equivalent of this command
that doesn't require us installing yum-utils (which drags in yum on
dnf-only systems such as f23)

This is a small consequence to this -- due to us not installing
yum-utils some installs will now be completely yum free.  This causes
a breakage in ironic-agent 99-remove-extra-packages where we remove
the yum package.  There is a long-standing bug/feature where missing
packages in a group of packages do not cause yum/dnf to exit with
failure, but uninstalling a single package will.  Because we have made
the systems yum-free, the uninstall of yum can fail in this corner
case.

It has always been like this, so I'm in favour of the "ain't broke"
approach.  To work-around this, I have just put yum into the existing
list of packages to be cleaned up.  I have added a note to the yum
installer taking note of this behaviour for future reference.

Change-Id: I8bbdc07ccdb89a105b4fc70d5a215077c42fcd03
2016-02-08 14:20:56 +11:00
Paul Belanger
b7f6527a0e Remove zero length files
This is to aid with Fedora packaging, since rpmlint complains about
including empty files.

Change-Id: I4ad867cd21304880a571e46805ab56044542400c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-01-20 19:08:54 -05:00
Jenkins
a95b96f57f Merge "Use ironic-agent for source-repositories" 2015-12-09 23:18:58 +00:00
Dmitry Tantsur
901344ef7c Add kmod to package-installs of ironic-agent
The modprobe utility is required by the rtslib package (iSCSI Linux-IO).
It will also be required for inspection.

Change-Id: I6760c86160d1ceba45aedde62597a711bcb4543d
2015-12-09 14:27:21 +00:00
Dan Prince
d9dc8f1334 Use ironic-agent for source-repositories
I recently built a ramdisk for IPA and was confused by
the fact that the source-repositories name did not
match the element name. (this is a convention,
confusing when they don't match but certainly not
required).

This patch makes it so you can use DIB_REPOREF_ironic_agent to
customize the IPA ramdisk sources when building ramdisks.

For backwards compat if DIB_REPOREF_agent is set it automatically
sets the new DIB_REPOREF_ironic_agent to that value as well.

Change-Id: I082d989d0d85601f5984dc7c3767b8d66a3d5438
2015-11-22 15:03:31 -05:00
Martin André
bc2199144e Selectively prune /root for ironic-agent ramdisk
Previously all files in /root were ignored when building the
ironic-agent ramdisk. This prevented for example to use the
local-config element to connect to the ramdisk via ssh as root user.

This commit change the exclude rule on /root to only ignore the
/root/.cache directory.

Change-Id: I18d839e8d97636f5f2164ba407f252407d9bc956
Closes-Bug: #1451668
2015-10-26 11:19:28 +09:00
Derek Higgins
bdcd03d604 Avoid transcending /proc with find
Find doesn't like listings disappearing while its trying to find them,
in this case if a PID directory disappears while find is running. Using
-xdev prevents find from going into ./proc and as a side effect /dev
will also be avoided which is mounted on boot so not needed either.

Change-Id: Iaa282e58d81d533ad4445da0a44200dd14bf0850
Closes-bug: #1502142
2015-10-08 12:16:23 +01:00
Jenkins
ea94034331 Merge "agent: ensure vmlinuz file does not exist before hard-linking into it" 2015-10-05 20:56:09 +00:00
Derek Higgins
68856c6006 Restrict search for python object files to ./usr
Traversing the /proc filesystem causes find to error if it changes
while its being searched.

We have had a lot of ci failures on this find command since it was
added in Ibe40e6b8b884f37e3b5aeab6e7654593bcd63123

Change-Id: Ia8cfc923cce749a69d5108e588db2360238d866c
Closes-Bug: #1501949
2015-10-02 10:36:05 +01:00
Jenkins
5d8ab5a333 Merge "Install 'gdisk' when building ramdisk with ironic-agent" 2015-09-30 21:03:03 +00:00
Dmitry Tantsur
afda063697 agent: ensure vmlinuz file does not exist before hard-linking into it
Otherwise on rebuilding the agent the following error is produced:
    failed to create hard link /home/stack/ironic-agent.vmlinuz
and the vmlinuz file is not updated.

Change-Id: I2015da889c932a854727235b1e34256a28e9eac6
2015-09-30 11:37:28 +02:00
Jenkins
8e3f01fe82 Merge "Add functional test for ironic-agent on Fedora" 2015-09-29 22:23:09 +00:00
Gary Duan
398494568a Contains the directory name of /sys and /proc
When a ubuntu/IPA ramdisk is used to boot a baremetal machine with
ironic agent-ilo driver, it fails at the point of mounting /proc
and /sys. After the vmlinuz(kernel) is started and it tries to
load the partitions on ramdisk. It need the directory of "/sys"
and "/proc" to mount the corresponding filesystems.
In order to fix this issue, the directories of "sys" and "proc"
are retained but the subdirectories or files under them are empty.
With this change, the directories of "/sys" and "/proc" shows
up in the ramdisk and kernel will mount sys and proc filesystems
on them respectively.

Closes-Bug: #1488445
Change-Id: Iad5d62f373b73789118f23db4c932ea6e9a784c3
Signed-off-by: Gary Duan <duanlg@live.cn>
2015-09-25 16:51:44 +08:00
Shivanand Tendulker
cbd3a55d09 Install 'gdisk' when building ramdisk with ironic-agent
ironic-agent requires expect to be installed for config drive
creation and hence this commit adds it.

Change-Id: Ie1c0f488f416b4c373aa7f38dfd8df1917cd6be2
Depends-On: Ib4dd8c082a50e1dbaf0df91477b062716cb780ff
Closes-Bug: #1486967
2015-09-24 06:25:10 -07:00
Jenkins
626bf5d68e Merge "ironic-agent element to output a .kernel file" 2015-09-24 13:13:41 +00:00
Jenkins
bbea877f2c Merge "Remove dnf workaround in ironic-agent" 2015-09-24 11:01:30 +00:00
Jenkins
55a885b258 Merge "ironic-agent: remove python object files" 2015-09-24 10:13:09 +00:00
Lucas Alvares Gomes
ba808fa6ec ironic-agent element to output a .kernel file
The ironic-agent element is created using the disk-image-create utility
(even being a ramdisk) and outputs a .vmlinuz file for the kernel
(different than the ramdisk-image-create which outputs a .kernel file
for the kernel). This is inconsistent and make scripting against the
diskimage-builder more complicated if one wants to support different
types of ramdisk.

This patch creates a hard link for the .vmlinuz file to a .kernel file
at the end of the process (to keep backward compatibility) and print a
deprecation message.

Depends-On: I81400305f166d62aa4612aab54602abb8178b64c
Change-Id: I476f9ec9ec4206ece0261eaaf2b4182c6bcbd802
Closes-Bug: #1482606
2015-09-23 19:02:54 -04:00
Dmitry Tantsur
46dcaaedfc Add functional test for ironic-agent on Fedora
Added support for ramdisk-type elements in tests/test_functions.bash
Elements are distinguished by element-type file in a test element.
Note that ironic-agent ramdisk is built with disk-image-create.

Change-Id: I4759859e7f3c004c2d00e7318729602e6c3c4d95
2015-09-22 14:50:17 +02:00
Dmitry Tantsur
4f8d5d0439 Remove dnf workaround in ironic-agent
Now that we use dnf mark, it's no longer needed.

Change-Id: I0ed8176f7ab5122fbddd37e3ce1584091f0a3cc2
2015-09-21 13:13:19 +02:00
Dmitry Tantsur
79ffe86e34 ironic-agent: remove python object files
Makes the compressed ramdisk 2MiB smaller

Change-Id: Ibe40e6b8b884f37e3b5aeab6e7654593bcd63123
2015-09-21 13:10:47 +02:00
Dmitry Tantsur
2641fe0143 Install ironic-agent dependencies via package-installs
Some were still installed in shell scripts.

Change-Id: I96c55274c764fa04dc00863dcff3677fe9603d2a
2015-09-21 13:10:30 +02:00
Jenkins
b2fd0f3ad7 Merge "[ironic-agent] Use svc-map for enabling agent" 2015-09-03 15:05:24 +00:00
Dmitry Tantsur
5f68750b4b ironic-agent: ensure dmidecode and ipmitool are installed
Currently they are used for inspection, but may be also used for
other purposes, as they're accessed from IPA generic hardware layer.

Change-Id: I32c6a711d466131b9445023812a2a260ed2e01f3
2015-09-01 17:39:51 +02:00
John Trowbridge
109e02b1ce [ironic-agent] Use svc-map for enabling agent
Switch to using svc-map element for systemd based agent.

This allows both .deb and .rpm installs to share the
element for systemd based installs. There are not any
plans to package a .rpm package for upstart or sysv, so
these are left as is.

Change-Id: Idca7ad97355cae785162989774a7e6dea6fdc5b5
Closes-Bug: #1490584
2015-09-01 07:12:52 -04:00
Julia Kreger
51816f7dba Fix ironic-image pkg-map
Fixing the ironic-agent pkg-map by adding missing commas. Validated
updated form passes json linting. Also includes a listing for curl.

Change-Id: I1983f7a581be3a5aaa771b19c6609cf12b61a7bb
Closes-Bug: #1488969
2015-08-27 15:40:19 +00:00
Jenkins
0035b1440e Merge "Reduce the size of the ironic-agent ramdisk" 2015-08-24 16:52:14 +00:00
Jenkins
f372425970 Merge "Add ability to build ironic-python-agent ramdisk from packages" 2015-08-22 15:04:13 +00:00
Lucas Alvares Gomes
1181fb8543 Reduce the size of the ironic-agent ramdisk
This patch is reducing the size of the ramdisk image generated by the
ironic-agent element. It does remove extra packages (graphical stuff,
dev stuff, miscs, docs, etc...) and purges directories that are not
needed for a ramdisk (like /boot since it boots using an external
kernel)

Currently it was tested generating a Fedora 22 image and reduced the
size of the final image from 464 MB to 211MB compacted (54% decrease).

I was able to boot a VM with 1.3 GiB of ram instead of the previous 3 GiB
needed.

Change-Id: Id6333ca5d99716ccad75ea1964896acf371fa72a
2015-08-06 16:34:30 +01:00
Julia Kreger
00d4e3faba Correct URL in ironic-agent README
URL was pointing to https://github.com, when it should be pointing
to https://git.openstack.org/cgit/

Change-Id: If86e45f3e8eb57f9dfb53b5a80db7dbac8bed93e
2015-08-04 07:58:03 -04:00
Julia Kreger
a71e8d7279 Add curl to ironic-agent package installs
The script for ironic-agent utilizes curl, however an extremely
minimal system may not have it, and as such we should list it as
a package that must be installed to support the element.

Change-Id: Id118f84e2d5e6adf0ae3d653864565368b0d76bf
2015-08-04 07:44:50 -04:00
John Trowbridge
db713fdf2d Add ability to build ironic-python-agent ramdisk from packages
Splits the install.d into source-install and package-install in
order to allow building from a distro packaged version of
ironic-python-agent.

Change-Id: I17513c29efd8c199e07ac1ef20ea5d7456585413
2015-07-31 14:04:52 +00:00
Om Kumar
9f46c3ba0c Adds Ubuntu and Debian to ironic-python-agent Support-list
Adds support for Ubuntu and Debian to ironic-python-agent. This will
enable building ramdisk with Ubuntu and Debian as base OS.

Updated README to further clarify what the element does.

Change-Id: I194f85b051974d8ccb197a0993a67761046cfe98
2015-07-30 12:51:24 +00:00
Om Kumar
870ea5bb5e Removes hardcoded refrences for ethernet interface
Remove hardcoded refrences for ethernet interfaces from ironic-agent
and sets a dependency on dhcp-all-interfaces to ensure it works for
all interfaces for all other operating systems.

Change-Id: I7ae6d1c5bd9911ef3db45187c0010cf0973badf1
Closes-Bug: #1471802
2015-07-08 07:14:06 +05:30
Ramakrishnan G
eeb979fa13 Address follow-up comments
This commit addresses follow-up comments on
I1ffb832ebab009b2d77a46e6c8fc758dd9632359. The change
is to delete get-pip.py immediately after installing pip.

Change-Id: I2768da2365b08304b8e7fcf55c91101b05ec33ea
2015-06-01 02:14:41 +00:00
Jenkins
80057470a6 Merge "Fix disk image create errors behind proxy" 2015-05-29 16:53:46 +00:00
Ramakrishnan G
afe739ceed Fix disk image create errors behind proxy
This commit fixes errors while trying to create a
DIB ramdisk with ironic-agent element when built
behind proxy. It fixes the issue by making it install
latest versions of pip and setuptools which has the
fixes for them.

Change-Id: I1ffb832ebab009b2d77a46e6c8fc758dd9632359
Closes-Bug: 1449852
2015-05-04 21:17:47 -07:00
Ramakrishnan G
45db8f1280 Add packages required for iscsi extension in agent
In Kilo, we added added an iscsi extension in
ironic-python-agent which requires tgtd and tgtadm.
This commit adds scsi-target-utils to the ramdisk for
this.

Also the git protocol for retrieving the source code is
changed to http.  Git protocol doesn't go through a proxy,
but http can.

Closes-Bug: 1449854
Change-Id: I8cf274913a16404941770d0c6115bd6feec1ccb8
2015-05-04 00:16:19 -07:00
Pino Toscano
92dab2c82a ironic-agent: exclude content of /tmp from initramfs
/tmp does not contain anything useful anyway, and excluding its content
makes the initramfs smaller too.

Change-Id: Ia72867e0cdebacf668ac1a1f551a965da0d69694
2015-03-10 19:03:04 +01:00
Ian Wienand
36b59c001c Standarise tracing for scripts
There is a wide variety of tracing options through the various shell
scripts.  Some use "set -eux", others explicity set xtrace and others
do nothing.  There is a "-x" option to bin/disk-image-create but it
doesn't flow down to the many scripts it calls.

This adds a global integer variable set by disk-image-create
DIB_DEBUG_TRACE.  All scripts have a stanza added to detect this and
turn on tracing.  Any other tracing methods are rolled into this.  So
the standard header is

---
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
    set -x
fi
set -eu
set -o pipefail
---

Multiple -x options can be specified to dib-create-image, which
increases the value of DIB_DEBUG_TRACE.  If script authors feel their
script should only trace at higher levels, they should modify the
"-gt" value.  If they feel it should trace by default, they can modify
the default value also.

Changes to pachset 16 : scripts which currently trace themselves by
default have retained this behaviour with DIB_DEBUG_TRACE defaulting
to "1".  This was done by running [1] on patch set 15.  See the thread
beginning at [2]

dib-lint is also updated to look for the variable being matched.

[1] https://gist.github.com/ianw/71bbda9e6acc74ccd0fd
[2] http://lists.openstack.org/pipermail/openstack-dev/2014-November/051575.html

Change-Id: I6c5a962260741dcf6f89da9a33b96372a719b7b0
2015-02-12 10:41:32 +11:00
Gregory Haynes
c4bbb6f3bc Create docs site containing element READMEs
We currently do not have the ability to create a docs site which
outlines all the elements.

Change-Id: I77ccf61e0c4b1509b3e7ce9b8f15ea5ccfd50d9b
2015-02-10 11:45:35 -08:00
Jenkins
302fdd57bb Merge "Add install section to Ironic agent systemd service file" 2015-01-21 08:58:23 +00:00
Clint Byrum
4dceacd5ed Allow absolute path to image with ironic-agent
The element was prepending the work directory forcibly, which will have
problems when the image name has an absolute path, which is allowed.

Change-Id: I0cb7b96e24daab8ee73611936af72074c70ac1aa
Closes-Bug: #1400405
2014-12-16 10:40:55 -08:00
Yuriy Zveryanskyy
26e2ec6faa Add install section to Ironic agent systemd service file
"Install" section is necessary for for "systemctl enable" command.

Change-Id: I590ac3a1b58a80e156967dd2787a1ba88e8a6fd5
2014-12-16 18:53:45 +02:00
Yuriy Zveryanskyy
676b1b738d Add element for building ramdisk with ironic-python-agent
This element creates kernel and ramdisk files based on Fedora,
example:
disk-image-create -a i386 -o test fedora ironic-agent disable-selinux

Change-Id: Ifa133d1680b81cb87d32a405aa7d7b40fe91f835
2014-11-13 19:30:44 +02:00