Commit Graph

1455 Commits

Author SHA1 Message Date
Bob Ball
b5794f3665 Add support for Xen PV disks
Xen paravirtualised disks (supported by most modern kernels) have the
"xvd" prefix (e.g. xvda0).  The functions to strip partitions need to
match on Xen PV disks otherwise the device name is discarded.

Change-Id: I5539d2afba3fae30d1ddb49dcbf077113d38bbf7
Closes-Bug: #1498576
2015-10-19 15:38:00 +01:00
Gregory Haynes
757b8cee3b Add --force to grub-install
Grub fails to install the bootloader due to it being on the root
partition of a block device. This is not actually a problem for us, so
we need to force it to succeed.

Change-Id: I335ef04ca8a8a8a5c242d3444b09bcce0a9f51e7
2015-10-18 02:26:31 +00:00
Derek Higgins
63641aa2ce Preserve env when calling yum with sudo
In particular we need [http|https]_proxy to be preserved.

Change-Id: I5bcd1b1deac917a1be8d8155f1283e330e3d5862
2015-10-16 17:36:09 +01:00
Derek Higgins
614661ec5b Define a default for $YUM
This is set by elements that require it not to be yum.

Change-Id: Ie01f357eef382bd1549fbe2b911129a3c48818e0
2015-10-16 09:55:00 +01:00
Jenkins
21f5e6146c Merge "Reset yum/dnf cache to correct location" 2015-10-15 13:21:57 +00:00
Jenkins
2ed4c1d860 Merge "Remove extra install of release pkgs in fedora-minimal" 2015-10-15 04:01:08 +00:00
Jenkins
654fb0311d Merge "Update default fedora-minimal to f22" 2015-10-15 04:01:05 +00:00
Jenkins
98bbd432a9 Merge "Update rhel7 element readme" 2015-10-14 19:03:38 +00:00
Colleen Murphy
a6e6570102 Fix devuser pubkey defaults
Without this patch, the devuser element attempts to find public keys by
iterating over the string "rsa dsa". When two keys are grouped together
in quotes, a bash for loop treats it as a single key. You can see the
issue this causes when debug output is turned on:

   + for fmt in '"rsa dsa"'
   + '[' -f '/home/krinkle/.ssh/id_rsa dsa.pub' ']'

This is not a reasonably named key to look for, so this patch removes
the quotes so that the loop will look for id_rsa.pub and id_dsa.pub
separately.

Change-Id: I0b5b1abd14013de85d90e76a95918a8071a5e013
2015-10-13 17:54:09 -07:00
Ian Wienand
283c9705c0 Reset yum/dnf cache to correct location
Make sure we reset the yum/dnf cache to /var/cache/${YUM}, not just
/var/cache/yum

This was resulting in the F22 fedora-minimal image being larger than
the base-image.  Because F22 fedora-minimal does some installs with
dnf when bootstrapping the chroot before we set "cachedir=" to the
bind-mounted external cache, we have "/var/cache/dnf" created and and
populated with the package meta-data, etc.

When we globally point dnf to /var/cache/yum here, we effectively
orphan the /var/cache/dnf created in those first steps.  dnf doesn't
care, but we end up with two copies of all the package metadata, etc
in "/var/cache/dnf" & "/var/cache/yum".

This also cleans up the sed a bit, by just replacing the lines.

Change-Id: Icc98fe30c34cb941aed4b987647ab67ac34af15a
2015-10-14 06:36:06 +11:00
Ian Wienand
c40aa76d83 Remove extra install of release pkgs in fedora-minimal
I'm not sure why we try to do an extra install of these, it is done
inside the chroot in _install_repos.  Currently it just gets skipped
saying the packages are already installed.

Change-Id: Ic7aa8cbe13e4347b447e84bb9c12483a4e125228
2015-10-14 06:36:06 +11:00
Ian Wienand
b00258cfc1 Update default fedora-minimal to f22
Testing shows this works

 $ ./bin/disk-image-create -x vm fedora-minimal
 [wait]
 $ ls -lh image.qcow2
 -rw-r--r--. 1 545M Sep 24 14:11 image.qcow2

Change-Id: Ifab2afa439e62e9ee2909460ac6bb4b07bc41662
2015-10-14 06:36:06 +11:00
Ian Wienand
ebdf48623e Add Fedora 22 support to yum-minimal
Add basic F22/dnf support to yum-minimal path.  We extract common
code, add some comments and reduce duplication.

Change-Id: If4bd5f88e26bd6f2168958f1ec1efff1072de7ba
2015-10-14 06:35:22 +11:00
Ben Nemec
e23274921d Update rhel7 element readme
Evidently the readme file hasn't been updated since rhel7 finished
beta, so this is long overdue.

In addition, since it's not possible to download the base image
file directly, let's stop pretending we can and bail out if the user
didn't set the necessary env vars.

Also updated the README to use the new table format instead of free text

Co-Authored-By: Augustina Ragwitz <aragwitz+lp@pobox.com>
Change-Id: Ie8343ee2ce1715583c28de7f59daed7e58c8ca0f
2015-10-12 15:31:09 -05:00
Jenkins
89d1eaf5a5 Merge "Adds debian support to iso element" 2015-10-12 20:15:07 +00:00
Jenkins
bf4c57dfb8 Merge "Update apt-preferences element README from free text to table formatting" 2015-10-12 19:26:06 +00:00
Jenkins
32a96a536f Merge "Update apt-conf elements README from free text to table formatting" 2015-10-12 19:23:45 +00:00
Jenkins
caaf20926a Merge "Move yum-based install into function" 2015-10-10 00:22:22 +00:00
Ian Wienand
829d626f0a Move yum-based install into function
Move yum-based install into a function, to make way for a second
related function where use dnf later

Change-Id: Iad09f3753ecdfa0c10cb8a0970a3c8e5a2dccab1
2015-10-09 12:03:19 +11:00
Jenkins
ff6abe3e8a Merge "Fix title of env vars section of redhat-common README to match template" 2015-10-09 00:51:19 +00:00
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