Commit Graph

1485 Commits

Author SHA1 Message Date
Augustina Ragwitz
b1958bfbbe Update apt-preferences element README from free text to table formatting
Change-Id: Iae04b809c8008487fabe1a173123928ab157c78d
2015-10-08 17:14:16 -07:00
Augustina Ragwitz
b3c448e765 Update apt-conf elements README from free text to table formatting
Change-Id: Ie89ce94fd063e04d57158a2e0faf11719537d450
2015-10-08 17:12:46 -07:00
Augustina Ragwitz
b4cc1a59ec Fix title of env vars section of fedora README to match template
Change-Id: I5cfc977dd21eb6f6b737fa272469a34e6cbc5e24
2015-10-08 17:10:05 -07:00
Augustina Ragwitz
7df60c31b9 Fix title of env vars section of redhat-common README to match template
Change-Id: I37b33eba8af507c03088bc0025280a696e85b04f
2015-10-08 17:05:57 -07:00
Jenkins
77edd112f6 Merge "Avoid transcending /proc with find" 2015-10-08 16:32:29 +00: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
Nisha Agarwal
1cd45803f2 Reorder the script number of 'elements/dkms/post-install.d/99-dkms'
Reorder the script number of 'elements/dkms/post-install.d/99-dkms'
to 'elements/dkms/post-install.d/97-dkms' to ensure that
it will always get executed before the
'elements/ramdisk/post-install.d/99-build-ramdisk'. This
would make sure that the DKMS module is there in the ramdisk.

Closes bug: #1492904

Change-Id: I2145d0ac29646335f76745a7678d169a62f13d44
2015-10-06 09:57:06 -07: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
3972510d20 Merge "Use --nodeps when installing fedora-release" 2015-10-01 00:30:23 +00:00
Jenkins
5d8ab5a333 Merge "Install 'gdisk' when building ramdisk with ironic-agent" 2015-09-30 21:03:03 +00:00
Jenkins
81e68357f3 Merge "Fix variable misspelling error" 2015-09-30 19:42:52 +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
Jenkins
292d895fdc Merge "Contains the directory name of /sys and /proc" 2015-09-29 12:28:08 +00:00
Zhao Lei
c01517925d Remove quotes from subshell call in bash script
Always no quotes for $() statement.

We don't need quotes to hold blanks in result:
 # i=$(echo 1 2 3)
 # echo $i
 1 2 3
 #

These quotes can make something wrong in some case:
 # i=$(echo '!')
 #
 # i="$(echo '!')"
 -bash: !: event not found
 #

No real problem for current code, only to use a better code style.

Change-Id: I5909636bdc8de3d44a305d033c8c892af446acf3
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2015-09-28 17:36:05 +08:00
Jenkins
4733b2fce7 Merge "svc-map: do not specify user/group for install" 2015-09-25 21:38:49 +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
Ian Wienand
afaba5b42d Use --nodeps when installing fedora-release
fedora-release >= 22 has acquired a dependency on /bin/sh.  This comes
from a %posttrans section of the spec file, which is symlinking the
os-release file.

As discussed in [1], the links are setup correctly in the rpm, so the
post-install script isn't doing anything.  Thus we can safely ignore
the dependency with --nodeps

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1265873

Change-Id: Icf17c84580a75d42d8e90d5d6e81ae7f5f576c32
2015-09-24 21:03:36 +10: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
Jenkins
5f73230908 Merge "Install ironic-agent dependencies via package-installs" 2015-09-24 10:10:51 +00:00
Gloria
f30ddfc379 Adds debian support to iso element
Adds support for debian to iso.
Updated README to further clarify what the element does.

Change-Id: I17ac89cfbc84365860c591fab0e4c78123035983
Co-Authored-By: zhangjian <jian.zhang8@hpe.com>
2015-09-23 23:55:18 -07: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
Derek Higgins
6b82210f9d Add option to set EPEL mirror
In some environments it may be desirable to set the EPEL
mirror to use. Add this ability.

Change-Id: Iefa22bde7a64b40e6d36ba39efa9102de9393e06
2015-09-21 17:28:33 +01: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
7db3196e68 Merge "Deprecate the deploy-ironic element" 2015-09-18 11:07:51 +00:00
Jenkins
a04723e2ae Merge "Download a compressed centos cloud images" 2015-09-18 10:18:55 +00:00
John L. Villalovos
0d92e2ffbb Fix variable misspelling error
'passthru' was spelled as 'passhru'.

Change-Id: I313b1a9393eccc6813b8e207ecc22db9fca93bb4
2015-09-17 16:52:26 -07:00
Antoine Musso
71950d8bcd Prettyfy source-repositories doc
Largely enhance the documentation so it renders nicely when generated
with Sphinx.

Culpirt: the 'package' type is documented but unhandled in the shell
script.

Change-Id: I9f4f46e770077c147c0a5b1245b779bc3afa4e98
2015-09-17 13:24:46 +02:00
Derek Higgins
fadb613e78 Download a compressed centos cloud images
The centos cloud images are both arround a GB in size, and
downloading them causes lot of CI timeouts, downloading the
compressed version saves 700MB of bandwith and should save
a lot of time.

Change-Id: I8dcd1db81fe5c4661945638ef3e6344fdf651243
2015-09-17 10:03:59 +01:00
Derek Higgins
65e4fcb5e0 Add centos7 support for DIB_DISTRIBUTION_MIRROR
The ability to specify a distro mirror is part of other
distro elements, centos should have one too.

Change-Id: I4cc9062ff92fbe301f414820798e08c66e9793f7
2015-09-16 10:55:56 +01:00
Derek Higgins
d1d7fa6bd5 Don't create a centos yum repository
This exact repository along with others are part of the
centos cloud image. From the looks of it this was required for
a very early cloud image.

Change-Id: Ib928e4ea739bc48f196f81c96ed4fba3177471f0
2015-09-16 10:20:19 +01:00
Jenkins
6afe6577ac Merge "Update redhat-common elements README from free text to table formatting" 2015-09-16 02:12:23 +00:00
Jenkins
c459274bb9 Merge "Update fedora elements README from free text to table formatting" 2015-09-15 23:56:31 +00:00
Lucas Alvares Gomes
400417dbe2 Deprecate the deploy-ironic element
Completed in Kilo the blueprint ipa-as-default-ramdisk [1] ported all
the Ironic drivers in tree to be able to use the IPA ramdisk for the
deployment.

Now in Liberty the blueprint deprecate-bash-ramdisk is deprecating the
bash ramdisk created using the "deploy-ironic" element in DIB.

This patch is printing a deprecation message when the user uses the
"deploy-ironic" element and as well updating the README file to indicate
that it has been deprecated.

[1] https://blueprints.launchpad.net/ironic/+spec/ipa-as-default-ramdisk
[2] https://blueprints.launchpad.net/ironic/+spec/deprecate-bash-ramdisk

Related-Blueprint: deprecate-bash-ramdisk
Change-Id: I8057f52104225326f45eb3ae6065cd02a27f5ef2
2015-09-15 17:18:21 +00:00
Dmitry Tantsur
b544e91494 Make sure dnf won't autoremove packages that we explicitly installed
As dnf 1.1.1 is pretty recent, make sure we update it as early as possible.

Change-Id: I30039090cfe652b864d847713ab2986c5659023d
2015-09-10 10:43:02 +02:00
Augustina Ragwitz
63b63e9533 Update fedora elements README from free text to table formatting
Change-Id: Iafb7f1b2f225dbe96e2e24bb7f405bcec74f8621
2015-09-09 15:35:37 -07:00
Augustina Ragwitz
099bdc3d34 Update redhat-common elements README from free text to table formatting
Change-Id: Ie87cf9937a54110719814046c4f46829e307ff3d
2015-09-09 15:08:29 -07:00
Pino Toscano
430ea923e0 svc-map: do not specify user/group for install
Since install is run as root already (using sudo), the resulting file
will be already root:root.

Change-Id: I6023fd277ea77fbfa4f7ad42b04d58c8cd6bd4fe
2015-09-07 17:04:03 +02:00
Jenkins
bf4a60a9e3 Merge "Update dpkg elements README from free text to table formatting" 2015-09-03 18:23:28 +00:00
Jenkins
b2fd0f3ad7 Merge "[ironic-agent] Use svc-map for enabling agent" 2015-09-03 15:05:24 +00:00
Jenkins
08da5f4bac Merge "ironic-agent: ensure dmidecode and ipmitool are installed" 2015-09-03 13:47:45 +00:00
Evgeny Antyshev
8349f0350e Remove grub2 in redhat-common/pre-install.d/15-remove-grub
In Id1e430e7d050a0b99ac449e2ea435e06cda1c4e6 I made the mistake of not
actually removing grub in 15-remove-grub.

This restores the removal phase and adds a bunch of comments.  It
seems the centos7 and centos (6) images have grub2 installed, but F22
does not; hence the check.

For anyone interested in the history; it seems the whole idea of
removing grub and re-installing it in the finalise stage is to do with
Ubuntu grub scripts failing in the chroot.  It is not clear this does,
or has ever, affected rpm based systems; but that's how it is, so
leave well enough alone.

The whole reasoning behind the rpm download & re-install is actually
explained in If095adc4abb52a19a3aa0b1caebfb3e4d8f605ef, but over time
the comments got lost as code moved around.  I've restored in here
some detailed explaination of why we don't just re-install the package
"normally".  I've also added a note to the pre-install of various
things that are related to this step.  Again I think there are some
questions around this that we can investigate in another change.

Change-Id: I1acd19da8567ab93b5003caf67673cc70efea5fa
2015-09-02 15:15:13 +10: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
Augustina Ragwitz
2cffdcda30 Update dpkg elements README from free text to table formatting
Change-Id: Iaf890c85b72f01999d3ae31398bdb65a356218e7
2015-08-31 13:43:04 -07:00
Jenkins
12d71c6447 Merge "Fix ironic-image pkg-map" 2015-08-28 17:17:00 +00: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
Clark Boylan
ea79655a08 Run growroot after all filesystems are mounted
Appears that growroot was running before /dev is mounted so the script
is unable to introspect the filesystem partition info. Run this after
all local filesystems are mounted to fix this issue.

Change-Id: Ia7c41ba6ef79788fdbf198998622eeaa20dd4245
2015-08-25 17:04:38 -07:00
Jenkins
9618974f92 Merge "create growroot element" 2015-08-24 18:35:57 +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
Jenkins
243fc75d06 Merge "Add explicit f21 test" 2015-08-21 10:22:18 +00:00
Jenkins
cb3799f0e5 Merge "Add test for centos 6" 2015-08-21 10:22:02 +00:00
Jenkins
3b770adf4c Merge "Install-static depends on rsync" 2015-08-21 10:21:59 +00:00
Jenkins
1356885447 Merge "Fix init-scripts element path munging and deps" 2015-08-21 10:21:25 +00:00
Gregory Haynes
16fc1f9012 create growroot element
We can resize the rootfs without the initrd based approach. Create a
growroot element which performs rootfs resizing as part of system init.

Change-Id: Ibeb846b0170d141fb72323a441d14b65b93ae0a1
2015-08-19 21:12:56 +00:00
Gregory Haynes
7f6dbe534f Install-static depends on rsync
We just dont express it.

Change-Id: Id4235d262ec9db9797ece76fce94541998fbf4fc
2015-08-17 16:21:09 +00:00
Gregory Haynes
ca594ef20f Fix init-scripts element path munging and deps
There is a bug where the init scripts element incorrectly munges the
install path making it useless. Also removing the dep on rsync since
this occurs from inside the chroot.

Change-Id: I8f2717d36d7d2ff4b195ec21e91afeaf30a1d803
2015-08-17 16:16:43 +00:00
Jenkins
988d9f4699 Merge "Pin the Fedora mirror for testing" 2015-08-14 05:09:07 +00:00
Gregory Haynes
e354dcdc94 Pin the Fedora mirror for testing
We are getting mirror failures for Fedora, lets pin to a known stable
one.

Change-Id: I22ea750136f68d707f45ececb97bd564f13eeff3
2015-08-11 22:14:18 +00:00
Jenkins
caf402fd04 Merge "Handle modern sfdisk and correctly align image partition" 2015-08-07 04:55:08 +00:00
Jenkins
9e42c69c80 Merge "Set and export DIB_RELEASE for centos7" 2015-08-07 04:54:46 +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
Jenkins
c2b96259a4 Merge "Add element to disable cloud-init resizefs" 2015-08-06 02:01:44 +00:00
Jenkins
a9fd90b8ea Merge "Correct URL in ironic-agent README" 2015-08-05 05:00:27 +00:00
Jenkins
2f4fde2294 Merge "debian: properly configure interfaces" 2015-08-05 02:41:30 +00:00
Abel Lopez
570ecf16a5 Set and export DIB_RELEASE for centos7
The default value was set in the centos7 element, but not
exported, which caused issues in rpm-distro. Also changed
a test in rpm-distro to only check for DIB_RELEASE > 22
if it's fedora.

Closes-Bug: #1477172

Change-Id: Ib6f4227411c2e8f1965c3b78bc318512c59a7876
2015-08-04 08:35:20 -07: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
Jenkins
eda377e5bf Merge "Adds Ubuntu and Debian to ironic-python-agent Support-list" 2015-08-04 07:27:30 +00:00
Jenkins
7e5c1c812f Merge "Only warn about missing map files with debug" 2015-08-04 05:30:18 +00:00
Ian Wienand
2c32c7ae1a Handle modern sfdisk and correctly align image partition
As described in the comments, sfdisk was rewritten for util-linux 2.26
(as shipped in F22) and now interprets arguments a sectors, rather
than cylinders.

The current partitioning line is "1 - - *" (start/size/type/bootable)
which means you start getting:

---
/usr/sbin/grub2-install: warning: this msdos-style partition label has
no post-MBR gap; embedding won't be possible.

/usr/sbin/grub2-install: warning: Embedding is not possible.  GRUB can
only be installed in this setup by using blocklists.  However,
blocklists are UNRELIABLE and their use is discoura ged..

/usr/sbin/grub2-install: error: will not proceed with blocklists.
---

when building images, because the start is interpreted by the new
sfdisk as sector 1 and it crams the partition right next to the MBR.

Specifying "-" for the size is undefined in the man page; even reading
the source it's not totally clear what "-" for the size does [2].  In
any case, the alignment is wrong in sectors or cylinders; we want to
be a multiple of 4KiB for best performance.

The intent here is to create one single, Linux, bootable, partition
taking up the whole disk starting at 1MiB, so "2048 + L *" makes this
clear.

We use the -uS argument to ensure both versions treat this start-value
as a sector offset (newer sfdisk essentially ignores the argument).
As described in the comments, bugs in the older sfdisk necessitate
usage of "--force".

Although we could choose more or less, it seems most common to align
to a 1MiB boundary (i.e. starting at sector 2048).  libguestfs has
some disucssion around --alignment and where it sets it's default to
this [3].  The 2.26-era sfdisk also defaults to putting partitions
here.  1MiB should be enough for GPT schemes in the future as well.

[1] https://github.com/karelzak/util-linux/blob/master/libfdisk/src/script.c#L1050
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1249893
[3] http://libguestfs.org/virt-resize.1.html

Change-Id: I2c2966f98d1d5ad4ebb433ea148b3b26c65dc1b5
2015-08-04 15:26:13 +10:00
Steve Kowalik
f2cf224e5f Set DIB_RELEASE for the Debian test-element
Using the default release for the Debian test-element leaves
us at the mercy of packaging problems in Debian unstable. Since
we only care if the image itself builds, use the safe choice of
Debian stable.

Change-Id: I4dd58171489aa07d60db7e4e353ccde6aa534da7
2015-08-03 17:59:35 +10: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
Jenkins
9ac258f028 Merge "Add init-scripts directory support" 2015-07-28 18:43:46 +00:00
Jenkins
d4c27b603a Merge "Update default Fedora to 22" 2015-07-24 15:44:44 +00:00
Jenkins
4b0c1876a1 Merge "opensuse: Update README" 2015-07-24 12:57:08 +00:00
Jenkins
c79d21ff1f Merge "openSUSE: Fix link to the images download folder" 2015-07-24 12:56:32 +00:00
Saverio Proto
754dd058c0 debian: properly configure interfaces
interfaces are not configured at all because specific interface files
are created but not sourced. This will result in the VMs running with
the loopback interface only

This is a regression, the problem was already fixed in the past, see commit
b822581d88

Change-Id: I846642772ab582d7567e5182c860cfa0fe882a15
2015-07-23 14:34:28 +02:00
Gregory Haynes
1a1dd59e33 Only warn about missing map files with debug
This is a very typical warning, lets only print it out when we have
debug turned on.

Change-Id: I93c5be5e328305ac3515b4d983835add05cadf8f
2015-07-22 22:36:33 +00:00
Jenkins
dc197197a2 Merge "Use official mirror name for debian-minimal" 2015-07-22 19:12:31 +00:00
Jenkins
4c0482e91c Merge "debian: install DHCP client and ifconfig packages" 2015-07-22 04:45:44 +00:00
Clint Byrum
2af0348fd3 Add element to disable cloud-init resizefs
The resize module is problematic for using grub on very large root
partitions. It is also extremely slow on large partitions, and users are
likely better off creating new partitions in the empty space.

Change-Id: Ic050c74aa71165b43c8908c4d6c7c0ea99ddafa3
Story: 2000175
2015-07-21 14:09:07 -07:00
Jenkins
6971116959 Merge "Add base element for using docker as image base" 2015-07-20 09:59:19 +00:00
Ian Wienand
e37f0e5894 Update default Fedora to 22
Update the default Fedora build to 22.  Testing with prior changes
produces a bootable .qcow2.

Change-Id: Icbd08fb5aa69446ad65ff72af631902c4e1fa12b
2015-07-20 09:08:06 +10:00
Ian Wienand
e42066d685 Cleanup yum downloading
Using "yum --downloadonly" breaks the abstraction of
"install-packages" because it downloads to the yum cache.  It also
acts funny if the package is already there.

Add an argument to "-d" which is the directory to download to.  dnf
has "download" built in, and for the old case use yumdownloader which
acts about the same.  Ensure it is installed, since it comes in
yum-utils.

Also a slight cleanup of the getopt parsing so it's easier to have the
required argument for -d

Thus we can remove most of the stuff in 15-remove-grub.  The check for
centos6 and it's lack of grub2 is clarified.  All the stuff about
having to remove the package, purging the cache etc so yum gets the
right thing is no longer relevant.  The long section of commented out
code at the end is also removed for clarity.

I tested this with an F21, F22 & centos (6) build

Change-Id: Id1e430e7d050a0b99ac449e2ea435e06cda1c4e6
2015-07-20 09:08:06 +10:00
Jenkins
1654a2002e Merge "Use the init scripts from the glean package" 2015-07-19 11:08:39 +00:00
Monty Taylor
4bddca2573 Add base element for using docker as image base
Docker can export root filesystems, which is what we want out of root
elements. Make a very simple passthrough element that will grab a docker
image and export it into a root filesystem.

Change-Id: Ie1e2d5dd5a61558f100e02c953b18d697a8fe8a2
2015-07-19 10:23:34 +00:00
Jenkins
61914629f1 Merge "Work around yum/dnf differences" 2015-07-17 23:44:43 +00:00
Jenkins
148a5fc40a Merge "Add YUM variable to for Fedora >= 22" 2015-07-17 23:44:14 +00:00
Gregory Haynes
3a186698a6 Add init-scripts directory support
There is a common pattern of if init_system == foo then install init
script foo-service-init into /etc/init... Lets encode this pattern by
allowing elements to put files into init-scripts/init-system directories
and then copying the appropriate files for them.

Change-Id: I541db18a0a8c5e0755a0af5732f4e15a5e5cf984
2015-07-16 17:59:05 +01:00
Clint Adams
b0ee421a2a Use official mirror name for debian-minimal
The canonical name of the official Debian mirror redirector is
httpredir.debian.org.

Change-Id: I61455919d84d414d5da7df699a5b14439f07ff3d
2015-07-09 23:41:49 -04:00
Antoine Musso
ec2be8a75e debian: install DHCP client and ifconfig packages
When building an image having the elements debian and vm, cloud-init
fails with:

    ci-info: !!!!!!!!Net device info failed!!!!!!!!

Looking at the source code, it executes ifconfig to gather informations
but the `debian` elements does not provide it.  There is also no DHCP
client available which is rather painful.

Install isc-dhcp-client to provide a DHCP client.
Install net-tools to provide ifconfig, required by cloud-init.

Ref: https://phabricator.wikimedia.org/T105152
Change-Id: I76dfd4f87a5c9f08e7c572fb4f5ebeeb34f5f66a
2015-07-09 14:01:13 +02: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
Dirk Mueller
5f5d9e3548 opensuse: Update README
The fix for static links to the latest image has been rolled out.
Update documentation accordingly.

Change-Id: Ic92d0e1d584ca2bf1d82f411102079cb4455bddb
2015-07-01 22:03:50 +02:00
Dirk Mueller
b422d3af16 openSUSE: Fix link to the images download folder
Change-Id: Idc1c3c354bb77871b40e8c0f3144ee38d016c3d5
2015-07-01 22:03:45 +02:00
Jenkins
c08d1cbaec Merge "Optimize Python install in deploy-targetcli" 2015-06-29 20:21:46 +00:00
Monty Taylor
1603aa2457 Use the init scripts from the glean package
The init scripts have now been moved in to glean itself, so just consume
them directly.

Change-Id: Ib85128579c62020df23d73404c0563894038d2dd
Depends-On: I2ed25ce434023bfc8b6a88a08c0c06c1cef63982
2015-06-27 12:51:25 -04:00
Jenkins
96c134b429 Merge "Have glean set hostname if a config drive exists" 2015-06-26 20:44:37 +00:00
Jenkins
070c8d34c8 Merge "Add oat-client element" 2015-06-26 19:49:29 +00:00
Gregory Haynes
243d28ba72 Have glean set hostname if a config drive exists
Glean now supports setting a hostname, lets ask it to do this.

Change-Id: Iea8d210b4b5add8fed4038cf81ce28d1d7c7c1c4
Depends-on: Ia9155bc565ad79af44d88acc06759be2bf4e5f20
2015-06-26 14:40:34 +00:00
Jenkins
8fe0009534 Merge "Change simple-init to use a PATH variable" 2015-06-26 02:32:56 +00:00
Lin Tan
59f83ef37b Add oat-client element
This element installs oat-client on the image, that's necessary for
trusted boot feature in Ironic to work. This element only works on Fedora.

Intel TXT will measure BIOS, Option Rom and Kernel/Ramdisk during trusted
boot, the oat-client will securely fetch the hash values from TPM.

Change-Id: I0f1221b5708e9a5792df62ee6e73034f8bf1577c
2015-06-26 09:57:12 +08:00
Jenkins
ba6959bb92 Merge "Allow source-repositories ref to be "*"" 2015-06-26 01:40:54 +00:00
Jenkins
c742daaa95 Merge "Wait longer for root device to become available" 2015-06-25 20:43:00 +00:00
Jeremy Stanley
f82400b432 Allow source-repositories ref to be "*"
Passing a source-repositories ref of "*" should signal fetching all
heads similar to when a non-cached ref is requested. Reuse the same
fallback logic, but skip unnecessary checks since "*" is not a real
refname. Also expand the fallback to update tags, and to --purge
local refs that no longer exist on the remote for additional safety.

Change-Id: I4562c9689a8d235ebe09b2f7178aa5890dbc85f1
2015-06-24 20:50:06 +00:00
Ian Wienand
b183e024ba Work around yum/dnf differences
Some minor workarounds for Fedora >= 22 where dnf is the default
package manager. The changes are documented on the Fedora release
notes https://fedoraproject.org/wiki/Changes/ReplaceYumWithDNF

Change-Id: I7d7d6f5d294980dcb217d6190a1efd9e0bbea9a6
2015-06-24 09:20:45 +10:00
Ian Wienand
f112b6f690 Add YUM variable to for Fedora >= 22
Add a YUM variable that defaults to dnf for Fedora 22 and greater.  At
this stage the yum element can do double-duty with dnf -- it's mostly
the same.  If we find it starts getting too unwieldy we can separate
this later.

Modify the install-packages for yum to use this variable when set, but
default back to "yum" to retain the status-quo.

Change-Id: Ibff71465b392d9f66b6f93955ff9223575d6165c
2015-06-24 09:20:45 +10:00
Ben Nemec
3f3cded06b Optimize Python install in deploy-targetcli
Installing Python to a ramdisk takes quite a long time because of
the way dracut checks for dependencies of every single file
installed.  We could avoid that, but then we might miss a required
library file.

This change alters the installation method to speed up
the process.  First, it creates a list of files that are needed and
then installs them all at once using inst_multiple instead of calling
inst on each file separately.  This doesn't make a huge difference,
but in my testing it is marginally faster.

Second, and more significantly, we don't need the *.pyo and *.pyc
files as those are simply an optimization to speed up module
loading.  Because the deploy ramdisk is a short-lived operation,
we probably lose more time transferring those extra files to the
target system than we save in improved load times.

In my testing, these two changes netted about a 20% improvement
in build times, and about 13% decrease in image size.

Change-Id: Ibc2b778c28fc9fb7177380dffe8dbce5722d0733
2015-06-22 13:19:14 -05:00
Jenkins
6bf4631cfa Merge "Add debian build test case" 2015-06-17 21:10:23 +00:00
Ben Nemec
05764de6e7 Wait longer for root device to become available
On some systems, it can take longer than 10 seconds for the root
disk to be detected.  Because enterprise hardware.  Increase the
wait time to 60 seconds so we don't incorrectly fail due to a
missing root device.

Change-Id: I4f67ef0295af8f2ae783fe3aea347b41987c6a66
2015-06-17 11:53:57 -05:00
Ian Wienand
19f769f049 Revert "Revert "Ensure DIB_RELEASE is exported for fedora""
This reverts commit 7a4c396948.

Note this time it sets it to F21, not F22, and gets rid of the
duplicate definition that doesn't get exported.

Change-Id: I240ad25d7a73c379559517a2a8399ae8c098314b
2015-06-17 11:24:35 +10:00
Gregory Haynes
1fe62a5211 Add test for centos 6
Lets have a test that we can build centos 6 images using the centos
element.

Change-Id: I9c818b9404db2e337fbdb5837d883b2fe103a8db
2015-06-16 21:23:12 +00:00
Julia Kreger
5487af6b2a Change simple-init to use a PATH variable
Changed simple-init to utilize a PATH variable in order to allow
for glean to be executed in the event the operating system places
glean in /usr/bin, such as what occurs on CentOS 7.

Change-Id: Ibf95fcd7ca368595e8fb3473f25eb0a919726e39
2015-06-16 10:24:28 -04:00
Jenkins
de90ad1cbe Merge "Dont fail if were missing setfiles" 2015-06-12 04:53:37 +00:00
Jenkins
1f9a113926 Merge "CentOS-6 resize support" 2015-06-12 04:05:32 +00:00
Gregory Haynes
037e71c023 Add explicit f21 test
Now that we are changing fedora to default to f22, lets gate on f21
still working.

Depends-On: Icbd08fb5aa69446ad65ff72af631902c4e1fa12b

Change-Id: I8b7b957fafc028aa2970803bd23ea644114f9b7f
2015-06-11 16:39:50 +00:00
Gregory Haynes
fe559242cb Dont fail if were missing setfiles
We are using which to find the location of setfiles. Our script is set
-e though, and we need to also be able to handle the case where setfiles
does not exist (like on centos-minimal).

Change-Id: If53c7a80efc081b95b143c28be64d39b12bfb469
2015-06-11 01:47:07 +00:00
Jenkins
6b1d482423 Merge "Add Ironic API version to passthru URL for deploy-ironic" 2015-06-04 22:13:43 +00:00
Jenkins
8fd7fd9e0a Merge "Add smoketest for fedora" 2015-06-04 03:34:17 +00:00
Jenkins
b35c6f27c8 Merge "Revert "Ensure DIB_RELEASE is exported for fedora"" 2015-06-04 01:24:25 +00:00
Jenkins
250cdbc9f1 Merge "Address follow-up comments" 2015-06-03 19:21:42 +00:00
Gregory Haynes
7a4c396948 Revert "Ensure DIB_RELEASE is exported for fedora"
The default release for fedora is actually 21 for us, and we are unable
to build 22 right now.

This reverts commit 379d6a2650.

Change-Id: Iffcc505f1e115cb6bc662b57a78878e498ce338e
2015-06-03 19:13:35 +00:00
Abel Lopez
184311b7f8 CentOS-6 resize support
Wrong package in the list, dracut-modules-growpart is wrong,
needed dracut-modules-growroot for proper resize to work

Change-Id: Iea8789ea3d44d182197a4713244b551f2cd4dd55
Closes-Bug: 1461601
2015-06-03 09:13:00 -07:00
Jenkins
348c15fdc3 Merge "Add grub2 element" 2015-06-03 10:48:18 +00:00
Jenkins
ee5893d859 Merge "Ensure DIB_RELEASE is exported for fedora" 2015-06-02 09:50:46 +00:00
Lucas Alvares Gomes
1b9520e955 Add grub2 element
This patch is adds a new grub2 element that installs the
grub2 bootloader on the image so it can work with Ironic's
local boot support.

This patch also modifies the iso element which was installing
same grub2. It removes the grub2 installation from iso element
and makes it dependent on grub2 element.

Co-Authored-By: Ramakrishnan G <rameshg87@gmail.com>
Change-Id: I37bcf2c525708d1e2e0f95cf5874a279f76861f7
2015-06-02 05:35:03 +00:00
Jenkins
f0dc50e83b Merge "Support custom kernel cmdline args for deploy iso" 2015-06-01 21:05:13 +00:00
Ramakrishnan G
af629c914c Support custom kernel cmdline args for deploy iso
This commit adds support for providing custom kernel
cmdline args while building deploy ISO.  This is useful
for adding kernel cmdline like 'console=ttyS1' in
environment (assuming all bare metals have been configured
to output to COM2 in BIOS).

Closes-Bug: 1451634
Change-Id: I20b04d9d104cfe46df0439c3f567a721a27e186a
2015-06-01 15:40:01 +00:00
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
Jenkins
8efa1fe154 Merge "rhel-common element should not use attach with activation key" 2015-05-29 10:13:23 +00:00
Yuriy Zveryanskyy
5de277fb54 Add Ironic API version to passthru URL for deploy-ironic
Add current version of Ironic API for consistensy with IPA and Ironic
API settings, and for compatibility in the future.

Change-Id: I13c7a26b6cfb47a14aa49ee78441a1d97d7b42d0
2015-05-29 09:12:21 +03:00
Jenkins
934608cad6 Merge "Make $DIB_YUM_REPO_CONF accept a list of repo files" 2015-05-28 23:53:18 +00:00
Ian Wienand
379d6a2650 Ensure DIB_RELEASE is exported for fedora
This variable is useful for scripts to know what release they are
building.

Change-Id: Ib5f5d13a8f25f00fda07dad19aa1d603c1616a2e
2015-05-27 12:46:13 +10:00
John Trowbridge
6856d96f03 rhel-common element should not use attach with activation key
In the case of using portal registration with an activation key, the
rhel-common element is still executing a `subscription-manager attach`
command. This should not happen if an activation key is provided. This
is because an activation key already provides the subscriptions to
attach.

This patch fixes this behavior.

Change-Id: I5a8425d1778362bb7a0dadc91a46308f16b2a526
Closes-Bug: #1456648
2015-05-25 07:18:47 -04:00
James Slagle
aee9cc0ce6 Make $DIB_YUM_REPO_CONF accept a list of repo files
It's useful to be able to pass in multiple yum repo configuration files
via $DIB_YUM_REPO_CONF, not just a single one.

Change-Id: I43722229a2df58be55bdb2b50c253e957b18e6fe
2015-05-22 19:37:29 -07:00
Jenkins
31b0b5a1ca Merge "Use environment setfiles" 2015-05-22 23:44:27 +00:00
Monty Taylor
da65ce3c26 Pass glean output to the console log
When something goes wrong, you usually can't boot the image. nova
console-log is usually available though.

Change-Id: Ie4525d0c3ee8b59f035544592b30f0635aba1811
2015-05-22 13:19:39 -07:00
Jenkins
2d62cd93ee Merge "redhat-common: rename 01-clean-old-kernels.sh to drop .sh extension" 2015-05-22 00:35:00 +00:00
Jenkins
6fb2a28495 Merge "Simple-init should disable cloud-init" 2015-05-21 23:29:54 +00:00
Abel Lopez
7514fc066f Use environment setfiles
Hard coded path fails on Distros (such as el6) with setfiles bin
in different places, for example, rhel6 has this in /sbin/setfiles

Change-Id: I7aff9cdadd9aed9cfc806a1010acbf36b7b6d0e7
2015-05-21 14:59:31 -07:00