Remove support for CoreOS images

Also remove the remaining elilo test template instead of updating it.

Change-Id: I79a49837f4d0dd6a432895e8997158a51feb99c3
This commit is contained in:
Dmitry Tantsur 2019-09-05 15:13:18 +02:00
parent 9eebf2603e
commit cbeb9cc79f
19 changed files with 27 additions and 166 deletions

View File

@ -232,12 +232,12 @@ IRONIC_DEFAULT_TRAITS=${IRONIC_DEFAULT_TRAITS-CUSTOM_GOLD}
IRONIC_BUILD_DEPLOY_RAMDISK=$(trueorfalse True IRONIC_BUILD_DEPLOY_RAMDISK)
# Ironic IPA ramdisk type, supported types are:
IRONIC_SUPPORTED_RAMDISK_TYPES_RE="^(coreos|tinyipa|dib)$"
IRONIC_SUPPORTED_RAMDISK_TYPES_RE="^(tinyipa|dib)$"
IRONIC_RAMDISK_TYPE=${IRONIC_RAMDISK_TYPE:-tinyipa}
# Confirm we have a supported ramdisk type or fail early.
if [[ ! "$IRONIC_RAMDISK_TYPE" =~ $IRONIC_SUPPORTED_RAMDISK_TYPES_RE ]]; then
die $LINENO "Unrecognized IRONIC_RAMDISK_TYPE: $IRONIC_RAMDISK_TYPE. Expected 'coreos', 'tinyipa' or 'dib'"
die $LINENO "Unrecognized IRONIC_RAMDISK_TYPE: $IRONIC_RAMDISK_TYPE. Expected 'tinyipa' or 'dib'"
fi
# If present, these files are used as deploy ramdisk/kernel.
@ -261,10 +261,6 @@ if [[ "$IRONIC_BUILD_DEPLOY_RAMDISK" == "False" && \
! (-e "$IRONIC_DEPLOY_RAMDISK" && -e "$IRONIC_DEPLOY_KERNEL") && \
(-z "$IRONIC_AGENT_KERNEL_URL" || -z "$IRONIC_AGENT_RAMDISK_URL") ]]; then
case $IRONIC_RAMDISK_TYPE in
coreos)
IRONIC_AGENT_KERNEL_URL=${IRONIC_AGENT_KERNEL_URL:-https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe-${IPA_DOWNLOAD_BRANCH}.vmlinuz}
IRONIC_AGENT_RAMDISK_URL=${IRONIC_AGENT_RAMDISK_URL:-https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem-${IPA_DOWNLOAD_BRANCH}.cpio.gz}
;;
tinyipa)
IRONIC_AGENT_KERNEL_URL=${IRONIC_AGENT_KERNEL_URL:-https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-${IPA_DOWNLOAD_BRANCH}.vmlinuz}
IRONIC_AGENT_RAMDISK_URL=${IRONIC_AGENT_RAMDISK_URL:-https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-${IPA_DOWNLOAD_BRANCH}.gz}
@ -2428,9 +2424,6 @@ function build_ipa_ramdisk {
local ramdisk_path=$2
local iso_path=$3
case $IRONIC_RAMDISK_TYPE in
'coreos')
build_ipa_coreos_ramdisk $kernel_path $ramdisk_path $iso_path
;;
'tinyipa')
build_tinyipa_ramdisk $kernel_path $ramdisk_path $iso_path
;;
@ -2438,30 +2431,11 @@ function build_ipa_ramdisk {
build_ipa_dib_ramdisk $kernel_path $ramdisk_path $iso_path
;;
*)
die $LINENO "Unrecognised IRONIC_RAMDISK_TYPE: $IRONIC_RAMDISK_TYPE. Expected either of 'dib', 'coreos', or 'tinyipa'."
die $LINENO "Unrecognised IRONIC_RAMDISK_TYPE: $IRONIC_RAMDISK_TYPE. Expected either of 'dib' or 'tinyipa'."
;;
esac
}
function build_ipa_coreos_ramdisk {
echo "Building coreos ironic-python-agent deploy ramdisk"
local kernel_path=$1
local ramdisk_path=$2
local iso_path=$3
# on fedora services do not start by default
restart_service docker
git_clone $IRONIC_PYTHON_AGENT_REPO $IRONIC_PYTHON_AGENT_DIR $IRONIC_PYTHON_AGENT_BRANCH
cd $IRONIC_PYTHON_AGENT_DIR
imagebuild/coreos/build_coreos_image.sh
cp imagebuild/coreos/UPLOAD/coreos_production_pxe_image-oem.cpio.gz $ramdisk_path
cp imagebuild/coreos/UPLOAD/coreos_production_pxe.vmlinuz $kernel_path
if is_deploy_iso_required; then
imagebuild/coreos/iso-image-create -k $kernel_path -i $ramdisk_path -o $iso_path
fi
sudo rm -rf UPLOAD
cd -
}
function build_tinyipa_ramdisk {
echo "Building ironic-python-agent deploy ramdisk"
local kernel_path=$1

View File

@ -31,8 +31,6 @@ operation. This will differ somewhat between different deploy environments,
but an example of how to do this is outlined below:
#. Create and configure ramdisk that supports rescue operation.
The ramdisk types that supports rescue operation is ironic-python-agent
with CoreOS/tinyIPA and DIB based ramdisk.
Please see :doc:`/install/deploy-ramdisk` for detailed instructions to
build a ramdisk.

View File

@ -181,9 +181,6 @@ directory back::
.. note:: You don't need to modify the kernel (e.g.
``tinyipa-master.vmlinuz``), only the ramdisk part.
.. note:: For CoreOS-based ramdisk you also need to unpack and pack back the
squashfs archive inside the unpacked ramdisk.
API Errors
==========

View File

@ -101,22 +101,15 @@ them to the Image service:
There are several methods to build or download deploy images, please read
the :ref:`deploy-ramdisk` section.
The recommended method is to use CoreOS to build deploy images, you will get
one kernel disk ``coreos_production_pxe.vmlinuz`` and one ram disk
``coreos_production_pxe_image-oem.cpio.gz``.
.. note:: If you want to customize your deploy images, please read `Image Builders <https://docs.openstack.org/ironic-python-agent/latest/install/index.html#image-builders>`_.
#. Add the deploy images to the Image service
Add the *coreos_production_pxe.vmlinuz* and *coreos_production_pxe_image-oem.cpio.gz*
images to the Image service:
Add the deployment kernel and ramdisk images to the Image service:
.. code-block:: console
$ openstack image create deploy-vmlinuz --public \
--disk-format aki --container-format aki \
--file coreos_production_pxe.vmlinuz
--file ironic-python-agent.vmlinuz
Store the image UUID obtained from the above step as ``DEPLOY_VMLINUZ_UUID``.
@ -124,6 +117,6 @@ them to the Image service:
$ openstack image create deploy-initrd --public \
--disk-format ari --container-format ari \
--file coreos_production_pxe_image-oem.cpio.gz
--file ironic-python-agent.initramfs
Store the image UUID obtained from the above step as ``DEPLOY_INITRD_UUID``.

View File

@ -6,102 +6,14 @@ Building or downloading a deploy ramdisk image
Ironic depends on having an image with the ironic-python-agent_ (IPA)
service running on it for controlling and deploying bare metal nodes.
You can download a pre-built version of the deploy ramdisk built with
the `CoreOS tools`_ at:
* `CoreOS deploy kernel <https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz>`_
* `CoreOS deploy ramdisk <https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz>`_
.. TODO(dtantsur): a link to DIB ramdisks once we finally build them
.. _ironic-python-agent: https://docs.openstack.org/ironic-python-agent/latest/
Building from source
--------------------
There are two known methods for creating the deployment image with the
IPA service:
Check the ironic-python-agent-builder_ project for information on how to build
ironic-python-agent ramdisks.
.. _BuildingCoreOSDeployRamdisk:
CoreOS tools
~~~~~~~~~~~~
#. Clone the ironic-python-agent_ project::
git clone https://opendev.org/openstack/ironic-python-agent
#. Install the requirements:
RHEL7/CentOS7::
sudo yum install docker gzip util-linux cpio findutils grep gpg
Fedora::
sudo dnf install docker gzip util-linux cpio findutils grep gpg
Ubuntu 14.04 (trusty) or higher::
sudo apt-get install docker.io gzip uuid-runtime cpio findutils grep gnupg cgroup-lite
SUSE::
sudo zypper install docker gzip util-linux cpio findutils grep gpg2
#. Change directory to ``imagebuild/coreos``::
cd ironic-python-agent/imagebuild/coreos
#. Start the docker daemon:
Fedora/RHEL7/CentOS7/SUSE::
sudo systemctl start docker
Ubuntu::
sudo service docker start
#. Create the image::
sudo make
#. Or, create an ISO image to boot with virtual media::
sudo make iso
.. note::
Once built the deploy ramdisk and kernel will appear inside of a
directory called ``UPLOAD``.
.. _BuildingDibBasedDeployRamdisk:
disk-image-builder
~~~~~~~~~~~~~~~~~~
#. Follow `diskimage-builder installation documentation`_ to install
diskimage-builder.
#. Create the image::
disk-image-create ironic-agent fedora -o ironic-deploy
The above command creates the deploy ramdisk and kernel named
``ironic-deploy.vmlinuz`` and ``ironic-deploy.initramfs`` in your
current directory.
#. Or, create an ISO image to boot with virtual media::
disk-image-create ironic-agent fedora iso -o ironic-deploy
The above command creates the deploy ISO named ``ironic-deploy.iso``
in your current directory.
.. note::
Fedora was used as an example for the base operational system. Please
check the `diskimage-builder documentation`_ for other supported
operational systems.
.. _`diskimage-builder documentation`: https://docs.openstack.org/diskimage-builder/latest/
.. _`diskimage-builder installation documentation`: https://docs.openstack.org/diskimage-builder/latest/user_guide/installation.html
.. _ironic-python-agent-builder: https://docs.openstack.org/ironic-python-agent-builder/latest/

View File

@ -2,7 +2,7 @@ default deploy
label deploy
kernel {{ pxe_options.deployment_aki_path }}
append initrd={{ pxe_options.deployment_ari_path }} text {{ pxe_options.pxe_append_params }} ipa-api-url={{ pxe_options['ipa-api-url'] }} coreos.configdrive=0
append initrd={{ pxe_options.deployment_ari_path }} text {{ pxe_options.pxe_append_params }} ipa-api-url={{ pxe_options['ipa-api-url'] }}
label boot_partition
kernel {{ pxe_options.aki_path }}

View File

@ -880,8 +880,6 @@ def build_agent_options(node):
"""
agent_config_opts = {
'ipa-api-url': get_ironic_api_url(),
# NOTE: The below entry is a temporary workaround for bug/1433812
'coreos.configdrive': 0,
}
return agent_config_opts

View File

@ -7,7 +7,7 @@ goto deploy
:deploy
imgfree
kernel {% if pxe_options.ipxe_timeout > 0 %}--timeout {{ pxe_options.ipxe_timeout }} {% endif %}{{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} BOOTIF=${mac} ipa-api-url={{ pxe_options['ipa-api-url'] }} initrd={{ pxe_options.initrd_filename|default("deploy_ramdisk", true) }} coreos.configdrive=0 || goto retry
kernel {% if pxe_options.ipxe_timeout > 0 %}--timeout {{ pxe_options.ipxe_timeout }} {% endif %}{{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} BOOTIF=${mac} ipa-api-url={{ pxe_options['ipa-api-url'] }} initrd={{ pxe_options.initrd_filename|default("deploy_ramdisk", true) }} || goto retry
initrd {% if pxe_options.ipxe_timeout > 0 %}--timeout {{ pxe_options.ipxe_timeout }} {% endif %}{{ pxe_options.deployment_ari_path }} || goto retry
boot

View File

@ -2,7 +2,7 @@ default deploy
label deploy
kernel {{ pxe_options.deployment_aki_path }}
append initrd={{ pxe_options.deployment_ari_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} ipa-api-url={{ pxe_options['ipa-api-url'] }} coreos.configdrive=0
append initrd={{ pxe_options.deployment_ari_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} ipa-api-url={{ pxe_options['ipa-api-url'] }}
ipappend 2

View File

@ -3,7 +3,7 @@ set timeout=5
set hidden_timeout_quiet=false
menuentry "deploy" {
linuxefi {{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_server={{pxe_options.tftp_server}} ipa-api-url={{ pxe_options['ipa-api-url'] }} coreos.configdrive=0
linuxefi {{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_server={{pxe_options.tftp_server}} ipa-api-url={{ pxe_options['ipa-api-url'] }}
initrdefi {{ pxe_options.deployment_ari_path }}
}

View File

@ -1,16 +0,0 @@
default=deploy
image=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel
label=deploy
initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk
append="selinux=0 troubleshoot=0 text test_param ip=%I::%G:%M:%H::on ipa-api-url=http://192.168.122.184:6385 coreos.configdrive=0"
image=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel
label=boot_partition
initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk
append="root={{ ROOT }} ro text test_param ip=%I::%G:%M:%H::on"
image=chain.c32
label=boot_whole_disk
append="mbr:{{ DISK_IDENTIFIER }}"

View File

@ -7,7 +7,7 @@ goto deploy
:deploy
imgfree
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk coreos.configdrive=0 || goto retry
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk || goto retry
initrd http://1.2.3.4:1234/deploy_ramdisk || goto retry
boot

View File

@ -7,7 +7,7 @@ goto deploy
:deploy
imgfree
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk coreos.configdrive=0 || goto retry
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk || goto retry
initrd http://1.2.3.4:1234/deploy_ramdisk || goto retry
boot

View File

@ -7,7 +7,7 @@ goto deploy
:deploy
imgfree
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk coreos.configdrive=0 || goto retry
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk || goto retry
initrd http://1.2.3.4:1234/deploy_ramdisk || goto retry
boot

View File

@ -7,7 +7,7 @@ goto deploy
:deploy
imgfree
kernel --timeout 120 http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk coreos.configdrive=0 || goto retry
kernel --timeout 120 http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 initrd=deploy_ramdisk || goto retry
initrd --timeout 120 http://1.2.3.4:1234/deploy_ramdisk || goto retry
boot

View File

@ -1805,7 +1805,6 @@ class AgentMethodsTestCase(db_base.DbTestCase):
self.config(api_url='https://api-url', group='conductor')
options = utils.build_agent_options(self.node)
self.assertEqual('https://api-url', options['ipa-api-url'])
self.assertEqual(0, options['coreos.configdrive'])
@mock.patch.object(utils, '_get_ironic_session')
def test_build_agent_options_keystone(self, session_mock):
@ -1815,7 +1814,6 @@ class AgentMethodsTestCase(db_base.DbTestCase):
session_mock.return_value = sess
options = utils.build_agent_options(self.node)
self.assertEqual('https://api-url', options['ipa-api-url'])
self.assertEqual(0, options['coreos.configdrive'])
def test_direct_deploy_should_convert_raw_image_true(self):
cfg.CONF.set_override('force_raw_images', True)

View File

@ -2,7 +2,7 @@ default deploy
label deploy
kernel /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel
append initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk selinux=0 troubleshoot=0 text test_param ipa-api-url=http://192.168.122.184:6385 coreos.configdrive=0
append initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk selinux=0 troubleshoot=0 text test_param ipa-api-url=http://192.168.122.184:6385
ipappend 2

View File

@ -3,7 +3,7 @@ set timeout=5
set hidden_timeout_quiet=false
menuentry "deploy" {
linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel selinux=0 troubleshoot=0 text test_param boot_server=192.0.2.1 ipa-api-url=http://192.168.122.184:6385 coreos.configdrive=0
linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel selinux=0 troubleshoot=0 text test_param boot_server=192.0.2.1 ipa-api-url=http://192.168.122.184:6385
initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk
}

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
The explicit support for CoreOS ironic-python-agent images have been
removed. If you use a ramdisk based on CoreOS, you may want to re-add
``coreos.configdrive=0`` to your PXE templates, see `story 1433812
<https://storyboard.openstack.org/#!/story/1433812>`_ for the background.