The iptables and lshw utilities are both required for IPA: iptables is
used when collecting system logs and lshw is used to get the total
physical memory and system details. However, they were not installed in
the docker image embedded in CoreOS IPA images. Since the docker image
is used as a chroot to run IPA, it cannot access binaries available
outside in the main CoreOS file system.
Change-Id: Ic2188b49e717c62315db6c33b74b2e161436b052
Story: #2004092
Task: #27494
Adds dependency upon smartmontools's binary smartctl to
query the block devices via ATA mode which fails on pass-thru
buses such as ATA over SCSI and ATA over USB, in an effort
to prevent the initiation of ATA secure erase with one
of these interfaces in place which may render the disk
unreachable after security options are enabled for
ATA Secure Erase or upon the Secure Erase command being
sent to the Hard Disk.
Change-Id: I7635a197eb000650e919fac386b38ac15ef17041
Story: #2002546
Task: #22109
Depends-On: Ibbfd168844524d91927bdd6e67d973e0bd519bf2
Increases the amount of ram for CoreOS IPA to 2GB
as the base CoreOS image is now 310MB.
Bumped CPU count for CoreOS runs to 2 CPUs as the
concurrency helps boot times for the CoreOS ramdisk.
Adds netbase, udev, and open-iscsi to debian jessie container
as they are no longer present in the default container.
Explicitly set path variable for execution in the debian
container as udevadm is in /sbin, and we may not have
/sbin on the path that is passed through to the
chroot.
Also fixed new pep8 test failures.
Story: #1600228
Task: #16287
Change-Id: I488445dfd261b7bca322a0be7b4d8ca6105750a3
IPA does not return 'root_uuid' as part of command status when
provisioning of whole disk image is done using 'agent' deploy
interface from ironic. This commit fixes the issue.
Also updated Dockerfile to include package 'bsdmainutils' related
to 'hexdump' binary.
Change-Id: I89597fe4a704686fe31c064c3443fd8404a300e5
Partial-Bug: #1713916
Currently, building ramdisks installs ironic-python-agent without any
upper-constraints. This causes the package to be installed with newer,
untested dependencies.
This commits introduces a tool to generate a local upper-constraints
file based on predefined strategies (below). Additionally, the fallback
to the openstack/requirements uses the URL defined in tox.ini instead of
redefining it. This prevents having to keep track of two separate
variables when releasing.
upper-constraints lookup strategies (in order):
* UPPER_CONSTRAINTS_FILE points to a local file
* UPPER_CONSTRAINTS_FILE points to a URL
* /opt/stack/new/requirements/upper-constraints.txt
* upper-constraints.txt from openstack/requirements git repository
Partial-bug: #1616554
Change-Id: Ib5c0c57cafdb6ffd7456e61f3b1bb5fa57520e5a
This configures tox to use upper-constraints for everything, except
environments used for post jobs (as constraints aren't supported there
yet).
This also doesn't enable constraints for our image builds, as it isn't
possible to pass an environment variable into the Dockerfile to allow
folks to choose their own constraints file (and we don't want to force
people to rely on git.o.o for building images).
Change-Id: I285855c6386f59e9dd352473aa28463109818c90
httpredir has multiple mirrors behind it, meaning on any given build
we're relying on several mirrors to all stay up at the same time. This
happens much less often than we'd like.
By forcing this to http.us.debian.org, we're using a more curated set of
mirrors which are less likely to be flakey.
The long term fix is to use a debian mirror provided by infra for
check/gate builds, but until that exists this should help.
Depends-on: I5169faf25c36cfb494c9c1fafb14fb4f7f82cd9e
Related-bug: #1571829
Change-Id: Ia7ea8d909df9ae86a6dbd68ba94746b171535eb8
qemu-image has been installed from testing to fix issues when
qemu-img can't convert image:
qemu-img: error writing zeroes at sector 0: Invalid argument
The issue has been fixed in qemu 2.2.0-rc2, reference [0].
Which has been added to debian backports.
This patch fixes issue with building coreos image, when qemu-utils
can't be installed from testing due to dependency problems.
Reference:
[0] http://git.qemu-project.org/?p=qemu.git;a=commitdiff;h=f3a9cfddae
[1] https://bugs.launchpad.net/cinder/+bug/1389728
Change-Id: Ie62a88e1d012aba1392b19c18137529c4c3ebf31
Related-Bug: #1490086
Closes-bug: #1570090
Closes-Bug: #1569835
This commit adds the 'psmisc' and 'dosfstools'
packages for python-ironic-agent. 'psmisc' is required
by fuser command and dosfstools is required by
mkfs for vfat creation.
Partial-Bug: 1526289
Change-Id: I30bda5cd50c66d3a22ea611ad3ae7f43533d5770
When building the docker image, the 'apt-get' and 'pip install' that are
run inside the docker image will fail in a an environment that uses
proxy servers.
Support environments with proxy servers by dynamically propagating
'http_proxy', 'https_proxy', and 'no_proxy' into the docker environment
when running 'apt-get' and 'pip install'
This can not be done with either --env-file or --env as those are
arguments to 'docker run'. The command being run here is 'docker build'
Once Docker 1.9 is widely deployed, we should switch to using the 'ARG'
command which was added in Docker 1.9. Currently Ubuntu 14.04 uses
Docker 1.6. Using the ARG command will be a much cleaner solution.
Change-Id: Idd994cd58b9fb75bae13a43fc8363c36f113527d
Closes-Bug: #1533796
Downstream agent builders that inherit from this Dockerfile will often
need git installed to be able to install hardware managers and such.
Removing git and reinstalling it can cause weird apt dependency issues
down the line, so leave it installed.
Change-Id: I8d5f35d0c8c6a231144a7b0a5b5c8f6d051ab0b1
By disabling pip cache, we're able to reduce the size of generated
docker image by 10%. The resulting ramdisk size goes from 229MB to
218MB.
It is possible to decrease the size even further by combining all the
RUN instructions into one but it doesn't provide a substantial gain and
it harms readability.
Change-Id: Ie23636fe709ab7c1bcf4d6c51299c173a5b642ac
This fix enables creation of config drive for UEFI only whole disk
images.
It will not work with the hybrid images that support booting in BIOS
and UEFI boot mode.
Change-Id: Ib4dd8c082a50e1dbaf0df91477b062716cb780ff
Closes-Bug: #1486887
Depends-On: I81400305f166d62aa4612aab54602abb8178b64c
The get_memory() method relies on dmidecode to get the total amount of
RAM present in the node but, but by default dmidecode is not installed
in the image.
Same for get_bmc_address() and ipmitool.
This patch fixes both cases by installing the "dmidecode" and "ipmitool"
packages when generating the CoreOS image of IPA.
Closes-Bug: 1494367
Change-Id: Ibded7bd533d604cf21a3b60afd396dc7b8b8750b
Ubuntu licensing does not allow for distributing derivatives of Ubuntu,
including containers based on Ubuntu. We currently publish a CoreOS PXE
image with an IPA container embedded. Basing this container on Ubuntu
appears to violate Ubuntu's license. Let's move to Debian to fix this.
Also remove the python3 purge as python3 doesn't exist in the Debian
base image.
Closes-Bug: #1475325
Change-Id: I051e3123f0cd1e66b5e3bae727559fe31467791b
Mark required packages before purging and autoremove'ing for cleanup.
* python-minimal - For /usr/bin/python
* python-setuptools - For required setuptools module
Change-Id: Ibe5cbe9090041db2d158cfccee82c66dcfe3fb2f
Closes-Bug: #1470199
Python 2.7 is being removed, somehow, despite python3 being specified.
This should fix the issue and make the container usable again.
Change-Id: Ida8aa7e527f8230cc893adf9192003340fc0dbf5
Bump IPA container to use trusty. This gives us a newer version of pip
which is required to install newer requirements that are packaged as
wheels.
Only other change to dockerfile is to ensure python 3 is
removed, in order to avoid raising the size of the container. After this
patch, the agent image goes up in size 3M, which is managable.
Change-Id: I11f39fadb87d42dd15885e6afc63df2c927ce771
While auditing our dependencies in antipiation of DIB elements being
created, I found these dependencies not being explicitly installed by
docker. We should explicitly install them even if we expect them to
exist in the base image.
Change-Id: I38ec7167ae24b9abbda08cbbbdd55205612b7288
This cleanup command was invalid. Not removing the apt lists adds a few
unneeded megabytes to the agent image.
Change-Id: I55ad4434d20a8984ea4cf5866360fd2622d811f4
Add erase_devices method to the HardwareManager class. By default this
method iterates block devices, and calls a new abstract
erase_block_device method for each device. This patch includes a
simple implementation of erase_block_device on the
GenericHardwareManager which attempts to issue an ATA secure erase on
supported devices.
Change-Id: I81da065395b8785f636f1b0a0d60c9f1c045441e
- Apt lists were not getting cleaned out, adding almost 100M of unneeded
stuff to the final image.
- Also removed some unneeded post-build deps
Change-Id: I716aba65ae0e9153a64a359f431d6d8a6adfb4da
Changing to precise means we don't have both python 3 and 2 installed in
the image, only python 2. Also do some cleanup at the end of the build
since we are exporting the final filesystem, and don't care about the
size of the intermediate layers.
Change-Id: Iac61d4a882aee19214de5dd74bbbaacc8b0f3414
This commit:
- Removes all references to teeth-rest.
- Brings in encoding.py and errors.py from teeth-rest.
- Removes the "view" thing from the encoding module.
- Adds structlog as a dep. This was missing and overlooked
because teeth-rest was installing it in the environment.