Commit Graph

1725 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Jenkins
9ac2a5bbb3 Merge "Package ldlinux.c32 along with isolinux.bin if it exists" 2015-05-07 22:42:34 +00:00
Jenkins
cb4ce88048 Merge "package-installs: fix error case for Python 2.6" 2015-05-07 17:25:54 +00:00
Jenkins
85325a41a0 Merge "Fix $DIB_DEFAULT_INSTALLTYPE export statement" 2015-05-07 14:53:41 +00:00
Jenkins
a10ac00756 Merge "Support arch-specific package-installs" 2015-05-07 09:29:29 +00:00
Jenkins
ffbdfc893f Merge "epel: support centos element" 2015-05-07 06:48:56 +00:00
Jenkins
b62d9043ea Merge "debootstrap: fix syntax issues" 2015-05-06 18:50:31 +00:00
Jenkins
5ee056ab7e Merge "Turn docs warnings into errors and fix issues" 2015-05-06 17:48:16 +00:00
Pino Toscano
655648f99b package-installs: fix error case for Python 2.6
subprocess.CalledProcessError in Python 2.6 does not have the 'out'
parameter for __init__, so pass only two of them and manually set
'output' in that case.

Fixes/improves commit 7f410aaff2.

Change-Id: I279bdf433b1272a9c3af4d66a2a52c78a7ac5de2
2015-05-06 16:18:30 +02:00