Commit Graph

2383 Commits

Author SHA1 Message Date
Ben Nemec
1b92a11268 Don't log tmpfs message during cleanup
By that point in the build it isn't generally useful, and it causes
confusion when builds fail because people think that's the error.

Change-Id: I26dee4ac0947b71a4a065ef6c5a18103e7df6667
2015-06-01 10:48:48 -05: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
Ian Wienand
ab05a8b7e2 Skip backups and other non-relevant files for dib-lint
I noticed dib-lint was running on my editor backup files and checking
python files (covered by flake8) and RST files

Change-Id: Ide2e8a4c1aa8d619bc4b0326a2cfc5e63c74475f
2015-05-29 15:39:46 +10:00
Jenkins
8d5923be11 Merge "Make it clear that tmpfs is optional" 2015-05-28 23:53:32 +00:00
Jenkins
934608cad6 Merge "Make $DIB_YUM_REPO_CONF accept a list of repo files" 2015-05-28 23:53:18 +00:00
Jenkins
38a3d98099 Merge "Cleanup /tmp in the guest" 2015-05-28 23:38:04 +00:00
Gregory Haynes
2d6e977b2e Use tar -t instead of -l because centos 6
Centos 6 tar appears to only support unix style tar args. Use tar -t
when we inspect test builds.

Change-Id: I91bf321cf6700d59956779a60f613eddd2856024
2015-05-27 17:58:24 +00:00
Dougal Matthews
a6751c53a0 Make it clear that tmpfs is optional
Given this is often the final output, it can look like an error occured.
Changing the wording makes this clearer.

Change-Id: I70f157054e3120cffee6fa5241b1ffe0b7bfa650
2015-05-27 12:49:38 +01: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
Jenkins
d490404682 Merge "Install debian locales" 2015-05-21 20:19:26 +00:00
Jenkins
eb732d3d65 Merge "Initial element tests" 2015-05-21 20:19:20 +00:00
Jenkins
75a0b91fe2 Merge "doc: small snippet about operating system elements" 2015-05-20 19:09:46 +00:00
Jenkins
8287a3fa6a Merge "Use Centos 7 cloud image symlink" 2015-05-20 19:08:46 +00:00
Jenkins
061669fee2 Merge "Have simple-init regenerate ssh keys on boot" 2015-05-20 19:06:42 +00:00
Pino Toscano
f91df5dfc6 redhat-common: rename 01-clean-old-kernels.sh to drop .sh extension
dib-run-parts filters the acceptable characters in script names,
and "." is not allowed (see $allowed_regex there), so
01-clean-old-kernels.sh is never executed.

Rename it to drop its .sh extension, so it is executed for real.

Change-Id: Ieb633b31214f1accf03b92a2b06590fdf2127b6b
2015-05-20 16:17:53 +02:00
Pino Toscano
37572a548c Cleanup /tmp in the guest
Clean all the content in the /tmp directory of the guest, leaving the
directory itself (usually has special attributes).

Modern distributions usually either setup a tmpfs on /tmp, or clean it
at every boot, so the leftovers will be just few bytes in the generated
image.
Regarding other distributions, a clean /tmp at their first boot will
surely not be a bad idea anyway.

Change-Id: I2b0f8864bc4909542d924f5bd9296dca5d0189f2
2015-05-20 11:24:17 +02:00
Jenkins
76f64ae0da Merge "Export DIB_RELEASE in centos" 2015-05-20 01:29:12 +00:00
Jenkins
2835199ace Merge "Update install docs to be more user friendly" 2015-05-19 22:31:19 +00:00
Gregory Haynes
9a6cf7ee6f Add debian build test case
Weve had some regressions recently with the changes in the debian
element. Lets tests that we can build debian images.

Change-Id: I048e7a32ecb4088ec1b1e3b1efdf146187b093db
2015-05-19 19:23:53 +00:00
Gregory Haynes
917962d26c Install debian locales
Building debian images failes due to missing the locale were trying to
set.

Change-Id: I9fa330fd82e5289b549713f6b31345f6113cef1d
2015-05-19 19:22:43 +00:00
Gregory Haynes
b4300fdc5c Add smoketest for fedora
Adding a test case which verifies fedora images successfully build

Change-Id: Ie9a41cde02d6380d9bfa6eeff43ab62480519ac7
2015-05-18 18:31:57 +00:00
Gregory Haynes
b9b6640fa7 Initial element tests
Adding a test function which allows us to use elements to perform
element-specific tests. In order for this to work sanely, also adding
some configuration to our break system so we can assert on negative
tests.

Also adding a test for apt-sources to verify this code actually works.

Change-Id: I378a74255010eca192f5766b653f8a42404be5ea
2015-05-17 02:07:40 +00:00
Jenkins
a4db3f5ccb Merge "centos/centos7: switch to epel element" 2015-05-15 18:07:52 +00:00
Jenkins
c30f3d85ff Merge "vm: use $DISTRO_NAME instead of lsb_release" 2015-05-15 17:40:40 +00:00
Jenkins
d469e6086d Merge "ramdisk: switch from lsb_release to $DISTRO_NAME" 2015-05-15 17:40:33 +00:00
Jenkins
c0b02f4623 Merge "rax-nova-agent: switch to $DISTRO_NAME" 2015-05-15 17:40:14 +00:00
Pino Toscano
2a7052e8ff doc: small snippet about operating system elements
Add a small documentation paragraph about the operating system elements,
what they are required to provide (and thus what other elements can rely
on).

This makes DISTRO_NAME a prime-class variable, which can now be assumed
to always exists (it was de-facto required so far).

Change-Id: Iffbc69de0516b58bfde48e87cd73073428d66b05
2015-05-15 19:12:41 +02:00
James Slagle
6e358d1cd4 Use Centos 7 cloud image symlink
We should make use of the CentOS-7-x86_64-GenericCloud.qcow2 symlink from
http://cloud.centos.org/centos/7/images/ instead of having a hard coded cloud
image. Specific cloud images can still be downloaded by overriding
$DIB_RELEASE.

More importantly, using the symlink will keep us automatically up to date with
the latest CentOS 7 cloud image. The image in use by the hard coded value
occassionally exhibits "No space left on device" errors after the cloud-init
filesystem resize. More info about this issue is at:
http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_receive_No_space_left_on_device_after_xfs_growfs.3F

The newer cloud image (with a newer kernel) does not exhibit this issue.

Change-Id: I3e19f6269ceba937fcd630bab265d132bd525519
2015-05-14 15:24:13 -04:00
Jenkins
df437f9b7c Merge "Add packages required for iscsi extension in agent" 2015-05-13 20:47:35 +00:00
Jenkins
f8d618bfa6 Merge "force arch amd64 for EL7 elements" 2015-05-12 20:30:00 +00:00
Pino Toscano
043711e3fa vm: use $DISTRO_NAME instead of lsb_release
Use the distribution string already available as $DISTRO_NAME.

Change-Id: I4aa3b19d66cc4bed39e9778f0ed21e86743afe41
2015-05-12 17:49:03 +02:00
Pino Toscano
341ad6c15c rax-nova-agent: switch to $DISTRO_NAME
Check for the current distribution using $DISTRO_NAME instead of
`lsb_release`.
Also, remove the existency check, as $DISTRO_NAME is supposed to be
provided by distribution elements.

Change-Id: I2276c63e9ac43576da528a70235129800c093b3e
2015-05-12 17:48:49 +02:00
Pino Toscano
cb37ef5384 ramdisk: switch from lsb_release to $DISTRO_NAME
Instead of executing `lsb_release` to know the current distro being
built, use the $DISTRO_NAME environment variable, already provided by
distribution elements.

Change-Id: I22b67afb481983cc40c198fd408ad5c7f4d68bec
2015-05-12 17:03:46 +02:00
Jenkins
97954ccd4e Merge "Make managing hosts entries optional" 2015-05-12 13:29:48 +00:00
Jenkins
556644388d Merge "Address comments on virtual media device label commit" 2015-05-11 19:36:26 +00:00
Gregory Haynes
dc33f6ddd0 Simple-init should disable cloud-init
Cloud-init and simple-init are not meant to play together. Lets disable
cloud-init if simple-init is installed.

Also guarding cloud-init-datasources against running in an environment
where cloud-init is not installed.

Change-Id: I5bfa9a3e83d3259db2436404034ad58c780de1c9
2015-05-11 16:55:02 +00:00
Jiri Stransky
a43b23c45a Make managing hosts entries optional
Diskimage-builder currently writes cloud-init config file which adds a
host entry mapping the hostname and FQDN to 127.0.0.1 into every image
built. This is probably useful for some use cases but not for all, so we
now allow customizing the manage_etc_hosts value via
DIB_CLOUD_INIT_ETC_HOSTS variable and also not writing the config at all
if that variable is explicitly set to an empty string (currently the
default is 'localhost' but in the future the default will be empty
string).

Particular description of the problem this causes in TripleO follows:

We get hosts files like this:

    ::1     localhost       localhost.localdomain   localhost6      localhost6.localdomain6
    127.0.0.1       localhost       localhost.localdomain   localhost4      localhost4.localdomain4
    127.0.0.1       ov-rl5i5saoc6h-1-hj5tzsbrdv4c-controller-dy6nuyarqy5z.novalocal ov-rl5i5saoc6h-1-hj5tzsbrdv4c-controller-dy6nuyarqy5z

    # HEAT_HOSTS_START - Do not edit manually within this section!

    192.0.2.17 ov-rl5i5saoc6h-0-wfzcsrqo34p6-controller-m3hy26lhxavl ov-rl5i5saoc6h-0-wfzcsrqo34p6-controller-m3hy26lhxavl.novalocal
    192.0.2.15 ov-rl5i5saoc6h-1-hj5tzsbrdv4c-controller-dy6nuyarqy5z ov-rl5i5saoc6h-1-hj5tzsbrdv4c-controller-dy6nuyarqy5z.novalocal
    192.0.2.16 ov-rl5i5saoc6h-2-a6v7saxnivm5-controller-7jboskte34r7 ov-rl5i5saoc6h-2-a6v7saxnivm5-controller-7jboskte34r7.novalocal
    # HEAT_HOSTS_END

The duplicate hostname/FQDN entry for 127.0.0.1 and 192.0.2.15 confuses
Corosync, which then fails to start a cluster when using hostnames in
the config file instead of IPs.

Change-Id: Ia8582883f737548e2911d3f36a1943e5b236281b
Partial-Bug: #1447497
2015-05-11 14:40:43 +02:00
Monty Taylor
53a57e8713 Have simple-init regenerate ssh keys on boot
If the keys aren't there on boot, we want to generate them.

Change-Id: I84d185887007d501306fe22731dd073e62fdfe36
2015-05-10 13:50:49 -04:00
James Slagle
d8ff69957e Remove install of vlan/vconfig from base
vconfig is actually deprecated in favor of the ip command, and is not
available on some newer distros (RHEL 7 at least). I'm not honestly sure
why it needs to be installed in all images anyway. I traced the origins
of installing the vlan package here all the way back to the first dib
git import from some other repo...so, I don't see any obvious reason why
it needs to be installed.

Change-Id: I272667cf29f5e41c217a26f70937b2842a04f748
2015-05-08 15:42:37 -04:00