Commit Graph

107 Commits

Author SHA1 Message Date
3e6fe6fd47 Merge "Poll resource tracker for ironic cpus as well as count" 2014-12-12 23:52:48 +00:00
31f70b4016 Delete is_ironic function
This function is not used in DevStack anymore.

Change-Id: I4a4430e451094d638704a2da1eb2de7f22f25b84
2014-12-12 15:44:38 +08:00
0c99e2f65b Poll resource tracker for ironic cpus as well as count
When ironic nodes are enrolled, their resources are not available
to the nova scheduler until after a round of ironic and nova periodic
tasks have run  In addition to waiting for ironic nodes to show up in
the resource tracker, also wait for associated CPU resources.  In
the worst case, this means waiting for 3 total rounds of periodic
tasks.

Change-Id: Idbbc43bf74ff5fff3d50f3494148454bb51e378f
Closes-bug: #1398128
2014-12-11 12:43:00 -08:00
7411bf2574 Merge "Move ironic ssh key creation early in preparation" 2014-12-09 17:21:41 +00:00
1fc6e18c4a Merge "add the kernel/ramdisk id to driver_info" 2014-12-11 16:16:21 +00:00
d09a1db5a4 Merge "add shebang lines to all lib files" 2014-12-10 20:32:15 +00:00
e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
b7d5bf6e9d add the kernel/ramdisk id to driver_info
Because bp https://blueprints.launchpad.net/ironic/+spec/add-node-instance-info
has been completed,
add the deploy_kernel_id and deploy_ramdisk_id to ironic node's driver_info
in stead of to flavor.

Change-Id: I90ffae49212e68749b8331edc278228419317453
2014-12-08 13:02:28 +09:00
0354640587 Move ironic ssh key creation early in preparation
SSH creds should be in place before nodes are enrolled.  If not,
ironic cannot sync power state causing nova to skip nodes in
its resource tracker.

Change-Id: I6b98ae57ce33783f69e2cf9ba357807d384b3012
Closes-bug: #1398128
2014-12-05 16:49:12 -08:00
6c74932bf7 Do not regenerate ironic ssh key if one exists
Gets rid of redundant globals and avoids regenerating an ssh key
for ironic if one exists.  Also allows key file to be user-specified,
letting ironic use pregenerated keys.

Change-Id: Iaa6f8918bf14dae2116269a0be5039fc5afaecfa
2014-12-04 15:38:23 -08:00
9bc3459927 Tighten up parsing of neutron tap device for ironic
The current parsing of the interfaces from the neutron network namespace
fails if there are other things that match 'tap' (ie, gretaps created
for other purposes)  This tightens up the parsing to only match devices
starting 'tap' instead of anything containing 'tap'

Change-Id: I9a31ec8ad253da0b3c5bd7f5eb105c49850f3060
2014-12-04 15:38:23 -08:00
c78e467109 Wait for hypervisor-stats to reflect ironic nodes
When enrolling nodes into Ironic, poll nova's hypervisor-stats until
the hypervisor count reflects the number of enrolled nodes.  This
eliminates a race where devstack completes and an instance is spawned
before the first post-enrollment periodic task ticks on the Nova side,
which has recently started popping up in the gate.

Change-Id: Ib3d8005e0094ee8af2d5fcb65aca6cd92736da90
Closes-bug: #1398128
2014-12-02 12:40:49 -08:00
ca7aa301b2 Merge "Move sgabios setup to hypervisor-ironic" 2014-11-26 15:41:54 +00:00
9eb8177eb7 Move sgabios setup to hypervisor-ironic
This moves setup of sgabios ROM to the ironic hypervisor library.
This is failing to backport to juno because of an error in the sideways ironic
grenade. install_ironic() is expected to setup only python things and happens
earlier than initial package installation.

Fixes-bug: #1396352
Change-Id: I75f0052045143571619e6712d57014228abf7a20
2014-11-25 22:22:36 +00:00
7f8a27da52 IPA Ramdisk should log to console in devstack
Setting these kernel command line parameters will have journald log
everything to the console, which means it'll end up in the appropriate
log in the ironic-bm-logs/ directory.

Change-Id: I0f4c79436c4856a5aa72f00f1ac8c2ed534b702e
2014-11-24 11:20:46 -08:00
fe96ed66f5 Add agent_ipmitool support
This patch enables to use the agent_ipmitool deploy driver to
deploy the ironic on real hardware, instead of virtual machine.

It also append the deploy driver name to the kernel/ramdisk
path, so that if developer switch the deploy driver after
./unstack.sh, devstack will use the correct kernel/ramdisk.

Change-Id: Iac0415f6895d037c876e137aa4f2bf2990eb47c5
2014-11-18 15:36:18 -07:00
6a622889be Merge "Do not hardcode ironic svc port, protocol" 2014-11-19 00:59:21 +00:00
da7b77e166 Merge "fixes cleaning up of ironic directory from /etc" 2014-11-18 20:30:40 +00:00
4b45fca7bb Do not hardcode ironic svc port, protocol
The Ironic API server's port and protocol are hardcoded in various
places.  This updates the ironic bits to use configured values instead
and fixes a bug around iptables rule creationl.

Change-Id: I1ace68affff3afdbc0058be4d32f8044a24e9338
Closes-bug: #1393498
2014-11-18 11:57:20 -08:00
dd69403ff4 Merge "Add Ironic hardware deployment support" 2014-11-18 17:09:27 +00:00
683ed9eeb2 fixes cleaning up of ironic directory from /etc
Closes-Bug: 1391083

Change-Id: Ic47161ab375716cc39ee1a7dd57034782717e323
2014-11-18 10:42:54 +05:30
ffd66ad77f Log early boot of Ironic VMs to serial with sgabios
This adds sgabios to the list of packages for Ironic and configures
the libvirt domain to redirect BIOS messages to serial via sgabios,
when console logging is enabled.  The sgabios package in Ubuntu
currently has an apparmor bug, so that is worked around here.

This allows visibility into early boot of Ironic nodes and should
help get to the bottom of a frequent failure we're seeing in the gate.

Change-Id: Ifd18851e2d23d198d36e67883a81afc6a92d2a58
Related-Bug: #1393099
2014-11-17 12:32:27 -08:00
ae9ee6bf97 Add Ironic hardware deployment support
Currently devstack create VMs and then deploy Ironic on these VMs.
Sometimes developer may want to deploy on real platform.

A separated file is required to provide the baremetal compute node
information, which includes four fields for each hardware platform,
the ipmi address, the mac address, the ipmi user name and the
password.

Change-Id: I422b43eae6edc95f15b8c40383d0ba7fbcd9b1ff
2014-11-14 04:04:35 -07:00
e08ab104e6 fix python-* lib from git installation
We're using all the magic variables based on python-fooclient, however
all the inline code was using fooclient for variables. So we had a
mismatch, which was kindly pointed out by some of the 3rd party ci
testers.

Change-Id: I27a56222c7e8e610fba8bf97672d2a42f5cf14ca
2014-11-13 17:17:38 -05:00
8f8e2d1fbf Merge "support installing clients at released versions" 2014-11-12 19:50:44 +00:00
5cb190697c support installing clients at released versions
expand the devstack support for libraries from released versions to
support python-* clients and tempest_lib.

Depends-On: I81b0d228e7769758c61e5b0323ecfce8c8886d39

Change-Id: I26fac0ccf8fd4818e24618d56bf04b32306f88f6
2014-11-04 10:18:58 +01:00
74b28bc43b Add iptables rule for Ironic VMs -> Swift
The agent ramdisk gets instance images from swift, set firewall
rules to allow this.

Also configure Ironic API port using the correct variable, and
use SWIFT_DEFAULT_BIND_PORT for Swift ports everywhere.

Change-Id: Ieec8cc64e504b04a21daa49e90e2d4925f4838ee
2014-10-30 16:10:03 -07:00
ab50c702a7 Use service tenant id for Ironic agent swift auth
Config of ironic conductor currently references a non-existent variable.
This corrects it by obtaining and using the correct tenant id.

Change-Id: I4340f75b2b22a8fd3fd8dd5cb30d7e91bce4f654
2014-10-22 13:35:25 -07:00
22ec45e63a Move generation of baremetal VM names to lib/ironic
The create-nodes script currently receives a total # of VMs to create
and creates them all, generating their names on the fly.  This moves
that name generation to lib/ironic and makes the script create only
single VMs as directed.  This centralizes the naming of things to
lib/ironic and will make it easier to reference these things elsewhere.

Change-Id: I98e61f7188e027e690303e32aff7cd2347f6d2c2
2014-10-20 13:42:39 -07:00
0595237e8a Function for auth_token middleware config
Each project was configuring the auth_token middleware using several
lines of inisets. Since all the projects should configure the
auth_token middleware in the same way create a function and call it.

Change-Id: I3b6727d5a3bdc0ca600d8faa23bc6db32bb32260
2014-09-21 11:18:01 -05:00
0a49fa517b Merge "Fix Ironic agent ramdisk URL" 2014-09-13 18:40:08 +00:00
4cb0d8c8bb Fix Ironic agent ramdisk URL
This URL was wrong in the first place, not sure how that happened.

Change-Id: I8a9a19c9776c06d062751becf8382b9a014e45eb
2014-09-11 16:45:58 -07:00
2f27a0ed3c Replace screen_it() with run_process() throughout
run_process will use screen if USE_SCREEN=True (the default),
otherwise it will simply start the requested service. Therefore
wherever screen_it used, run_process can be instead.

Where stop_screen was found it has been replaced with stop_process.

A tail_log function has been added which will tail a logfile in a
screen if USE_SCREEN is True.

lib/template has been updated to reflect the use of the new
functions.

When using sg the quoting in run_process gets very complicated.
To get around this run_process and the functions it calls accepts
an optional third argument. If set it is a group to be used with sg.

Change-Id: Ia3843818014f7c6c7526ef3aa9676bbddb8a85ca
2014-09-11 18:59:39 +01:00
6eaaa780bd Merge "Set flavor id for Ironic's baremetal flavor" 2014-09-10 13:31:40 +00:00
4bd4264960 Merge "Allow devstack to build ironic agent ramdisk" 2014-09-09 03:04:49 +00:00
792dc5f8cf Simplify ironic-python-agent download
The kernel and ramdisk for IPA are now uploaded separately, this
commit simplifies the download by downloading them separately.

Change-Id: I630b0a9c3d1179a6b97754f1474f62ae7da068a5
2014-09-04 16:57:46 -07:00
f00766b8bb Allow devstack to build ironic agent ramdisk
This provides a way to test Ironic-python-agent code that is
not yet merged.

Change-Id: I85084c383263173a33250592a95a17f46827b347
2014-09-04 16:31:02 -07:00
29c3d63b28 Set flavor id for Ironic's baremetal flavor
An existing trove bug prevents it from functioning when Nova flavors exist
with an id that is a UUID instead of an integer, causing Tempest failures.
This sets an integer ID when creating the baremetal flavor for Ironic's use.

Change-Id: Ic090f61a9a47421117dc86b640422f00f468112c
Related-bug: #1333852
2014-09-02 11:49:28 -07:00
15370b84e2 Merge "Share the fixed network for Ironic" 2014-08-23 07:39:37 +00:00
53cfcc1c2b Merge "Ironic: Setup/Configure iPXE" 2014-08-22 07:16:04 +00:00
5851e5f698 Ironic: Setup/Configure iPXE
Setup the enviroment and configure Ironic to use iPXE for deployments. If
IRONIC_IPXE_ENABLED enviroment variable is True, DevStack will now start
and configure an Apache HTTP server to serve the images, will copy the
undionly.kpxe boot file in place of the standard pxelinux.0 and will set
the right configuration to Ironic to deploy the images using iPXE+HTTP.

Implements: blueprint ipxe-boot
Change-Id: I0ea40cb8bbf9236c634f803c2bde1081634679ff
2014-08-20 17:32:32 +01:00
cbfb3ae1c8 Ironic and baremetal install diskimage-builder with pip
This change installs diskimage-builder with pip instead
of from git, and only if the executable ramdisk-image-create
isn't already installed.

This allows the ironic and baremetal to consume the latest
release of diskimage-builder by default, and gives the option of
defining version constraints for which version to install.

If the dib service is enabled (which it isn't by default) then
diskimage-builder will already be installed from git and will
not be re-installed for ironic and diskimage-builder.

Change-Id: Ic6613a11e2c4fb7a1261b81cdc2cf958515e60cd
2014-08-20 09:06:31 +12:00
cec9792f7f Share the fixed network for Ironic
When using Ironic, ensure the private Neutron network is shared across
all tenants.  This allows connectivity to the host's TFTP server from
nodes booted accross multiple tenants and more closely resembles the current
real world Ironic PXE+IPMI use cases.

Change-Id: I5d293493bafa37b1796f47aa738cfff2e3be9f59
2014-08-19 11:09:07 -07:00
a6a45467c4 Add ironic-python-agent support to devstack
This adds support for using ironic-python-agent with Ironic.

Change-Id: I8f1e93e09ddde447996ecbedceb091f51d60040e
2014-08-15 18:09:14 +00:00
722284f24b Fix image create functions for Ironic
This fixes an issue where --container-format was not passed to
'openstack image create'.

Change-Id: If1431c8dc8ff8e940f99e984939f5b2732bb0ee0
Closes-Bug: 1357495
2014-08-15 18:04:58 +00:00
a3ecab6618 Merge "Modify glance image-create commands to use openstackclient" 2014-08-15 00:50:41 +00:00
6d27148eb6 Cleanup lib/ironic
This moves around a bunch of functionality and attempts to isolate setup
steps into discrete functions (new or existing), making them easier to
consume from outside of Devstack (ie, Grenade).

Change-Id: I480167dcc008506ec2fe8c412db4114b74496e60
2014-08-06 16:48:35 -07:00
75ee80cfef Merge "Clean up local variable usage - Ironic" 2014-08-06 00:49:31 +00:00
8d3ac2df58 Modify glance image-create commands to use openstackclient
Change `glance image-create` commands to use `openstack image create`,
in an effort to unify the CLI.

Change-Id: I96cef118daf931b648c0483525ac7d2287fec2e0
2014-08-02 23:47:15 -04:00
f2572e7fcc Merge "Add support for ironicclient bash completion" 2014-07-31 00:14:33 +00:00