Commit Graph

1406 Commits

Author SHA1 Message Date
Jenkins
ce16f9d38c Merge "Remove quotes from subshell call in bash script" 2015-11-02 21:07:20 +00:00
Jenkins
727b4cddf6 Merge "Prettyfy source-repositories doc" 2015-11-02 20:14:10 +00:00
Ian Wienand
94a7a7cf67 Create YUM_CACHE_DIR in yum-minimal
yum-minimal/root.d/08-yum-chroot runs before yum/root.d/50-yum-cache,
and thus if run on a completely fresh system will fail in
08-yum-chroot as the YUM_CACHE directory isn't made.

This is probably hidden by testing & nodepool builds, because it sets
DIB_IMAGE_CACHE.  It was hidden from me because locally I have done
builds using the "yum" element previously, which had created the
cache.

Change-Id: I333f5f7e67d198f75a522cc296c118c2e94a5ecb
2015-10-23 15:17:18 +11:00
Derek Higgins
0c0c7275a9 Use DIB_EPEL_MIRROR when finding the epel-release package
download.fedoraproject.org uses dns round robin and occasionally
hits a bad server. Using DIB_EPEL_MIRROR when finding the
epel-release package will allow us to avoid it e.g. in ci.

Change-Id: I756223b3e669532476663c05e79c238449b8a0db
2015-10-20 17:25:58 +01:00
Jenkins
b902189eaa Merge "Fix devuser pubkey defaults" 2015-10-20 01:41:16 +00: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