Code Monkey home page Code Monkey logo

ironic-image's Introduction

Metal3 Ironic Container

This repo contains the files needed to build the Ironic images used by Metal3.

Description

When updated, builds are automatically triggered on https://quay.io/repository/metal3-io/ironic/

This repo supports the creation of multiple containers needed when provisioning baremetal nodes with Ironic. Eventually there will be separate images for each container, but currently separate containers can share this same image with specific entry points.

The following entry points are provided:

  • runironic - Starts the ironic-conductor and ironic-api processes to manage the provisioning of baremetal nodes. Details on Ironic can be found at https://docs.openstack.org/ironic/latest/. This is the default entry point used by the Dockerfile.
  • rundnsmasq - Runs the dnmasq dhcp server to provide addresses and initiate PXE boot of baremetal nodes. This includes a lightweight TFTP server. Details on dnsmasq can be found at http://www.thekelleys.org.uk/dnsmasq/doc.html.
  • runhttpd - Starts the Apache web server to provide images via http for PXE boot and for deployment of the final images.
  • runlogwatch - Waits for host provisioning ramdisk logs to appear, prints their contents and deletes files.

All of the containers must share a common mount point or data store. Ironic requires files for both the TFTP server and HTTP server to be stored in the same partition. This common store must include, in <shared store>/html/images, the following images:

  • ironic-python-agent.kernel
  • ironic-python-agent.initramfs
  • final image to be deployed onto node in qcow2 format

The following environment variables can be passed in to customize run-time functionality:

  • PROVISIONING_MACS - a comma seperated list of mac address of the master nodes (used to determine the PROVISIONING_INTERFACE)
  • PROVISIONING_INTERFACE - interface to use for ironic, dnsmasq(dhcpd) and httpd (default provisioning, this is calculated if the above PROVISIONING_MACS is provided)
  • PROVISIONING_IP - the specific IP to use (instead of calculating it based on the PROVISIONING_INTERFACE)
  • DNSMASQ_EXCEPT_INTERFACE - interfaces to exclude when providing DHCP address (default lo)
  • HTTP_PORT - port used by http server (default 80)
  • HTTPD_SERVE_NODE_IMAGES - used by runhttpd script, controls access to the /shared/html/images directory via the default virtual host (HTTP_PORT). (default true)
  • DHCP_RANGE - dhcp range to use for provisioning (default 172.22.0.10-172.22.0.100)
  • DHCP_HOSTS - a ; separated list of dhcp-host entries, e.g. known MAC addresses like 00:20:e0:3b:13:af;00:20:e0:3b:14:af (empty by default). For more details on dhcp-host see the man page.
  • DHCP_IGNORE - a set of tags on hosts that should be ignored and not allocate DHCP leases for, e.g. tag:!known to ignore any unknown hosts (empty by default)
  • MARIADB_PASSWORD - The database password
  • OS_<section>_\_<name>=<value> - This format can be used to set arbitary Ironic config options
  • IRONIC_RAMDISK_SSH_KEY - A public key to allow ssh access to nodes running IPA, takes the format "ssh-rsa AAAAB3....."
  • IRONIC_KERNEL_PARAMS - This parameter can be used to add additional kernel parameters to nodes running IPA
  • GATEWAY_IP - gateway IP address to use for ironic dnsmasq(dhcpd)
  • DNS_IP - DNS IP address to use for ironic dnsmasq(dhcpd)
  • IRONIC_IPA_COLLECTORS - Use a custom set of collectors to be run on inspection. (default default,logs)
  • HTTPD_ENABLE_SENDFILE - Whether to activate the EnableSendfile apache directive for httpd (default, false)
  • IRONIC_CONDUCTOR_HOST - Host name of the current conductor (only makes sense to change for a multinode setup). Defaults to the IP address used for provisioning.
  • IRONIC_EXTERNAL_IP - Optional external IP if Ironic is not accessible on PROVISIONING_IP.
  • IRONIC_EXTERNAL_CALLBACK_URL - Override Ironic's external callback URL. Defaults to use IRONIC_EXTERNAL_IP if available.
  • IRONIC_EXTERNAL_HTTP_URL - Override Ironic's external http URL. Defaults to use IRONIC_EXTERNAL_IP if available.
  • IRONIC_INSPECTOR_CALLBACK_ENDPOINT_OVERRIDE - Override Inspector's callback URL. Defaults to use IRONIC_EXTERNAL_IP if available.
  • IRONIC_ENABLE_VLAN_INTERFACES - Which VLAN interfaces to enable on the agent start-up. Can be a list of interfaces or a special value all. Defaults to all.

The ironic configuration can be overridden by various environment variables. The following can serve as an example:

  • OS_CONDUCTOR__DEPLOY_CALLBACK_TIMEOUT=4800 - timeout (seconds) to wait for a callback from a deploy ramdisk
  • OS_CONDUCTOR__INSPECT_TIMEOUT=1800 - timeout (seconds) for waiting for node inspection
  • OS_CONDUCTOR__CLEAN_CALLBACK_TIMEOUT=1800 - timeout (seconds) to wait for a callback from the ramdisk doing the cleaning
  • OS_PXE__BOOT_RETRY_TIMEOUT=1200 - timeout (seconds) to enable boot retries.

ironic-image's People

Contributors

akiselev1 avatar bfournie avatar derekhiggins avatar dhellmann avatar dtantsur avatar elfosardo avatar fmuyassarov avatar furkatgofurov7 avatar imain avatar iurygregory avatar juliakreger avatar lentzi90 avatar lorbuschris avatar maelk avatar mahnoorasghar avatar metal3-io-bot avatar mquhuy avatar namnx228 avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar openshift-merge-robot avatar rhjanders avatar rozzii avatar russellb avatar shibapuppy avatar stbenjam avatar tuminoid avatar vrutkovs avatar yselkowitz avatar zaneb avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ironic-image's Issues

[OCP4.10] Old scciclient is unexpectedly used which causes bootstrap error on iRMC IPI

What happend

OCP4.10.0-0.nightly-2021-11-12-161948 and later versions unexpectedly use old scciclient which causes bootstrap error on iRMC IPI.

What you expected to happen?

To make sure iRMC IPI succeed, the expected version of scciclient is at least 0.9.1-0.20210827164043.21a184b.el8.

Anything else we need to know?

Until OCP 4.10.0-0.nightly-2021-11-09-181140, the version of scciclient is as follows 0.9.1-0.20210827164043.21a184b.el8.

sh-4.4# dnf list python3-scciclient
Last metadata expiration check: 0:00:08 ago on Wed Nov 17 06:34:41 2021.
Installed Packages
python3-scciclient.noarch 0.9.1-0.20210827164043.21a184b.el8 @rhel-8-server-ose-rpms-embargoed-x86_64

But from OCP 4.10.0-0.nightly-2021-11-12-161948, it uses as follows older scciclient.

sh-4.4# dnf list python3-scciclient
Last metadata expiration check: 0:06:58 ago on Wed Nov 17 05:58:25 2021.
Installed Packages
python3-scciclient.noarch 0.9.1-2.20210527215016.e66d50c.el8ost.1 @openstack-16-for-rhel-8-rpms-x86_64

From the version number, it is true that 0.9.1-2 > 0.9.1-0, but the commits they built from is 0.9.1-2 older than 0.9.1-0

cp error when starting dnsmasq

There is an error copying a pxe file on startup, in my environment dnsmasq starts, and deployment still works fine but we should probably review the files copied to ensure we have the expected files for vm/baremetal environments;

[core@localhost ~]$ sudo podman logs dnsmasq
cp: cannot stat '/usr/share/ipxe/ipxe.efi': No such file or directory
dnsmasq: started, version 2.79 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt DBus no-i18n IDN2 DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify
dnsmasq-dhcp: DHCP, IP range 172.22.0.10 -- 172.22.0.100, lease time 1h
dnsmasq-dhcp: 
dnsmasq-tftp: TFTP root is /shared/tftpboot 
dnsmasq-dhcp: DHCPDISCOVER(ens4) 00:c8:ff:b6:7b:04 
dnsmasq-dhcp: DHCPOFFER(ens4) 172.22.0.72 00:c8:ff:b6:7b:04 

The copy happens here:

https://github.com/openshift/ironic-image/blob/master/rundnsmasq.sh#L22

Looking inside the container we can see these files:

[root@localhost /]# ls /usr/share/ip<tab>
ipmitool/ ipxe/     ipxe.efi/ 
[root@localhost /]# ls /usr/share/ipxe
10222000.rom  10ec8139.rom  1af41000.rom  808610d3.rom	ipxe-i386.efi	 ipxe.dsk  ipxe.lkrn  undionly.kpxe
10ec8029.rom  15ad07b0.rom  8086100e.rom  80861209.rom	ipxe-x86_64.efi  ipxe.iso  ipxe.usb
[root@localhost /]# ls /usr/share/ipxe.efi/
10222000.rom  10ec8029.rom  10ec8139.rom  15ad07b0.rom  1af41000.rom  8086100e.rom  808610d3.rom  80861209.rom

I'm not certain atm if we can just remove the copy of ipxe.efi, or if we need to rename ipxe-x86_64.efi which does exist

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.