Commit Graph

1948 Commits

Author SHA1 Message Date
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
Jenkins
9b45586f0e Merge "Use DIB_EPEL_MIRROR when finding the epel-release package" 2015-10-21 15:08:16 +00:00
Jenkins
48a9dd4d3d Merge "Fix tests/test_functions.bash" 2015-10-20 22:15:46 +00: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
75d73ee379 Merge "Add flake8 to requirements" 2015-10-20 00:11:55 +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
Dmitry Tantsur
c49b733fef Fix tests/test_functions.bash
I am not sure why we didn't hit it before, but
1. The command is 'docker images', not 'docker image'
2. Calling 'docker rmi' requires a check on image presence

Change-Id: I127359043f975a25bb1bfad7469dfe01be67e2d9
2015-10-14 13:41:01 +02: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
Jenkins
af2226305d Merge "Prevent overwriting of user modified blacklist.conf" 2015-10-05 18:57:01 +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
Ian Wienand
4a936fe741 Add flake8 to requirements
flake8 is called directly by dib-lint, so this is a hard requirement
to be installed for dib-lint to work outside of tox.  This came up
when proposing a dib-lint job for the nodepool elements in
project-config (I28459a9bbaaa6175d03dbe753498849a75942538)

Change-Id: I3052f860cebc66844cd21f34be64aea8474d2248
2015-10-01 19:08:29 +10:00
Jenkins
3972510d20 Merge "Use --nodeps when installing fedora-release" 2015-10-01 00:30:23 +00:00
Jenkins
abc5e1ec32 Merge "Output failing lines when dib-lint finds wrong indents" 2015-09-30 22:49:18 +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
Nisha Agarwal
d9ce041237 Prevent overwriting of user modified blacklist.conf
The ramdisk-functions overwrites user modified
/etc/modprobe.d/blacklist.conf with a single entry
"blacklist evbug". Due to this, ramdisk fails to recognise
the hardware/disks etc for which user has modified
/etc/modprobe.d/blacklist.conf.
The commit enables copying all the *.conf files under
/etc/modprobe.d to the ramdisk. It creates
a config file /etc/modprobe.d/blacklist-dib-ramdisk.conf
instead of overwriting /etc/modprobe.d/blacklist.conf.

Closes bug: #1492804

Change-Id: Ib88272e4b8f4641c58e7e68bb0c2e4b82efc4fc1
2015-09-30 02:04:15 -07: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
Jenkins
8298591d74 Merge "Updated from global requirements" 2015-09-25 22:45:00 +00:00
Jenkins
4733b2fce7 Merge "svc-map: do not specify user/group for install" 2015-09-25 21:38:49 +00:00
Jenkins
5dc0921b2c Merge "Activate pep8 check that _ is imported" 2015-09-25 19:41:30 +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
Ian Wienand
e678910166 Output failing lines when dib-lint finds wrong indents
When dib-lint complains about wrong indents, it doesn't give you any
indication where the problem is.  This repeats the grep on failure,
outputting the line and line-number.

As a bonus, skip *.orig files from merges

Change-Id: Ifbbdf854ea19191f66e9823468dbc0afc2f93e1f
2015-09-24 21:03:36 +10:00