12424 Commits

Author SHA1 Message Date
Devananda van der Veen
c8f5140056 Remove tests for old DB. 2013-05-13 00:59:15 -07:00
Devananda van der Veen
7c7d23b54c Add tests for ironic-dbsync. 2013-05-13 00:59:15 -07:00
Devananda van der Veen
3b4b5bb6cb Remove ironic_manage.
It will be replaced by ironic-dbsync.
2013-05-13 00:58:54 -07:00
Devananda van der Veen
b430c775be Implement GET /node/ifaces/<id> in API. 2013-05-13 00:58:49 -07:00
Devananda van der Veen
537def2b1a Update exception.py
- rename NovaException -> IronicException
- remove many unused exceptions
2013-05-13 00:58:48 -07:00
Devananda van der Veen
fed78f5dfd Update db models and API. 2013-05-13 00:58:41 -07:00
Devananda van der Veen
9e242f8d2d Implement skeleton for a new DB backend. 2013-05-13 00:58:31 -07:00
Devananda van der Veen
c4c6204acf Remove the old db implementation. 2013-05-13 00:57:57 -07:00
Devananda van der Veen
39a9f767ce Implement initial skeleton of a manager service. 2013-05-13 00:57:48 -07:00
Devananda van der Veen
8ac57c720c Implement initial draft of a Pecan-based API. 2013-05-13 00:57:31 -07:00
Devananda van der Veen
73f81e029f Fix IPMI tests. 2013-05-13 00:57:27 -07:00
Devananda van der Veen
e90a312996 Merge and trim utils and test_utils.
Merge baremetal/utils and nova utils
Merge baremetal/test_utils and nova/test_utils
Remove many unused methods from both files
Update test_pxe for merged utils.py
2013-05-13 00:57:15 -07:00
Devananda van der Veen
1e69517110 Move common things to ironic.common.
Move from ironic/ to ironic/common/
 config.py
 context.py
 exception.py
 paths.py
 policy.py
 safe_utils.py
 states.py
 utils.py
2013-05-13 00:57:07 -07:00
Devananda van der Veen
54da19c8d2 Fix failing db and deploy_helper tests
- minor cleanup of db/sqlalchemy/api
- fix some things in conf_fixtures
- fix tests in deploy_helper
- remote unused retry_on_deadlock method
- remove network and service from test.py
2013-05-07 16:52:53 -07:00
Devananda van der Veen
50a450c8a1 un-split the db backend 2013-05-07 16:47:58 -07:00
Devananda van der Veen
0480834614 Rename files and fix things. 2013-05-07 16:47:55 -07:00
Devananda van der Veen
05e9ce4c48 Import add'l files from Nova
Import lots of files from Nova at rev
f0da3464ab17552f24977d22365fa9573702f5a8
2013-05-07 16:47:49 -07:00
Devananda van der Veen
089e2ff25b update openstack-common.conf and import from oslo 2013-05-07 16:23:48 -07:00
Monty Taylor
87ffa55426 Added .testr.conf. 2013-05-02 17:32:04 -04:00
Monty Taylor
a520425dd9 Renamed nova to ironic. 2013-05-02 15:55:48 -04:00
Monty Taylor
7bad35dd1f Fixed hacking, pep8 and pyflakes errors. 2013-05-02 15:54:00 -04:00
Monty Taylor
84a7dc47e2 Added project infrastructure needs. 2013-05-02 14:55:43 -04:00
Devananda van der Veen
112a2f11f8 Fix baremetal get_available_nodes
Baremetal driver get_available_nodes was incorrectly returning only a
list of unprovisioned nodes, leading update_availabile_resources to
sometimes delete a baremetal node that had an instance provisioned
to it -- sometimes even while the provisioning was still in process.

Fix bug 1174952

Change-Id: I4f08a2f6539a5b6cd12245ac6b4dc308767ae0cd
2013-04-30 14:34:56 -07:00
Dirk Mueller
98c4e04ac6 Improve Python 3.x compatibility
A bit of mechanical translation to clean
out the deprecated except x,y: construct

Change-Id: I80883b6b0c014bdf4799e8b7b2c4a4a07d951a0b
2013-04-22 04:16:31 +02:00
Michael Still
0490eab24c Import and convert to oslo loopingcall.
Import the oslo looping call implementation (which is a copy of
nova's), delete nova's local copy, convert all users to the new
location.

It should be noted that the oslo implementation of
FixedIntervalLoopingCall measures time from the start of the
periodic task, not the end, so periodic tasks will run with a
constant frequency instead of the frequency changing depending on
how long the periodic task takes to run.

Change-Id: Ia62ce1988f5373c09146efa6b3b1d1dc094d50c4
2013-04-09 13:25:38 +10:00
Arata Notsu
4c82958f3d baremetal: VirtualPowerDriver uses mac addresses in bm_interfaces
After the change I6653829364b0a641442d45e766493180d6f2a880,
bm_nodes.prov_mac_address is no longer set. However VPD still
uses it. This patch changes VPD to use bm_interfaces.address
instead of bm_nodes.prov_mac_address.

Fixes bug 1168574.

Change-Id: I2bab869b282958ee9fd0e4776928e56351018324
2013-04-15 20:27:03 +09:00
Arata Notsu
f3a0117ecd baremetal: Change input for sfdisk
To prevent sfdisk stopping with "bad input", use a empty string
instead of "-" (and doing so requires using "," as a separator).

Fixes bug 1166112

Change-Id: I5e4cffaa326fbafd1583d55744f921a40b3ae76f
2013-04-09 21:43:52 +09:00
Arata Notsu
88e203a1fc baremetal: Change node api related to prov_mac_address
Now prov_mac_address is going to be dropped from bm_nodes table. This patch
adjust api to the change.

A user is expected to create a node without specifying prov_mac_address, then add
an interface having the address to the node. However, for compatibility, a user
still can specify prov_mac_address when create a node. In this case, an interface
having prov_mac_address is automatically added to the node.

In response body of create, index and show, "prov_mac_address" field no longer
exists since they are showed as a member of "interfaces" fileld.

DocImpact

Change-Id: I6653829364b0a641442d45e766493180d6f2a880
2013-04-03 19:31:09 +09:00
Stanislaw Pitucha
2f9a4ec598 Remove "undefined name" pyflake errors
A number of places tried to use undefined names. This included one
powervm test which turned out to not check anything at all (used
fake implementation of tested method) and needed to be moved.

Make sure that this class of errors causes run_pep8 failure in the
future.

Change-Id: I82ccb63bbc6f6d2b20ecb7f06b2fc22f8f034a33
2013-04-10 18:59:23 +00:00
Stanislaw Pitucha
ff06b94958 Remove unnecessary LOG initialisation
Remove a lot of getLogger lines and imports of logging in modules
which never use that functionality.

Change-Id: Icdaee2c540980412b000d02ebf1ec568dcf5b38a
2013-04-10 13:26:12 +00:00
Arata Notsu
8e05dbfb33 Define LOG globally in baremetal_deploy_helper
Since LOG = getLogger() has been moved from the global scope
to the function scope (main), the rest of the module could
not find LOG. This patch makes LOG global again.

Fixes bug 1165262

Change-Id: I2607802dcbed64135f75011a02ebce95519e4ea1
2013-04-06 09:57:33 +09:00
Davanum Srinivas
832fca9615 Only call getLogger after configuring logging.
Logging needs to be setup properly before we try to log
something. Fix a test case that loads the code but does
not execute the code that results in the LOG being setup
properly.

Fixes LP# 1161031

Change-Id: I9d5bc6b87cfb25243f00e17b532d4485dc4454e4
2013-04-04 17:33:20 -04:00
Arata Notsu
f5d9ded9c4 baremetal: Integrate provisioning and non-provisioning interfaces
Originally, baremetal pxe/tilera driver managed two types of network
interfaces in two tables; provisioning interfaces in bm_nodes table
and non-provisioning (normal) interfaces in bm_interfaces table.
But, now actually both types are handled in the same way and there is
no difference between them except for which table they are in.

This patch moves the provisioning interfaces to bm_interfaces. However
it does not drop prov_mac_address in bm_nodes since VirtualPowerManager
still uses it to identify a target in a list of VMs returned by the
VM's host.

Change-Id: I5ce940e7127aa3b29ba7802612938dc5dbc3152f
2013-04-04 19:08:49 +09:00
Monty Taylor
c2e75cad16 Move console scripts to entrypoints.
As part of the move of plugins to entrypoints, take advantage of the
entrypoints based console scripts, which will make our command line scripts
available for unittesting.

Part of blueprint entrypoints-plugins

Co-authored-by: Michael Still <mikal@stillhq.com>

Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
2012-08-15 15:02:51 -04:00
Arata Notsu
2c2741a44e baremetal: Drop unused columns in bm_nodes
Drop these two columns:
* bm_nodes.prov_vlan_id
* bm_nodes.registration_status

And update related code, tests and api_samples.

Change-Id: Iadefc83a00ad9ae5a3bb39f357080299875bdf09
2013-02-27 03:30:36 +09:00
Arata Notsu
aa48766bb0 Remove print statements
Change-Id: I40a805bee3f10d5989188971423cbb6c07f740c8
2013-04-02 10:45:45 +09:00
Arata Notsu
99d7b91862 Delete tests.baremetal.util.new_bm_deployment()
The function is not used anymore. It creates an instance of
BareMetalDeployment, which was removed in c20110d1.

Change-Id: I40b634f8cf0d4369f09cb61aca6f95a059e85d6d
2013-04-01 20:20:03 +09:00
Mikyung Kang
a27b7f99fe Adds Tilera back-end for baremetal
blueprint add-tilera-to-baremetal.

The baremetal driver is a hypervisor driver for Openstack Nova
Compute. Within the Openstack framework, it has the same role
as the drivers for other hypervisors (libvirt, xen, etc). With
this patch set of tilera-backend, provisioning and management
of non-PXE tilera physical hardware is accomplished using
common cloud APIs and tools.

Change-Id: I356c06a07ace463779e3b84836d5000331e24814
Co-authored-by: Mikyung Kang <mkkang@isi.edu>
Co-authored-by: David Kang <dkang@isi.edu>
Co-authored-by: Ken Igarashi <igarashik@nttdocomo.co.jp>
Co-authored-by: Arata Notsu <notsu@virtualtech.jp>
Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>
2013-03-26 17:58:04 -04:00
Devananda van der Veen
123826e516 Change type of ssh_port option from Str to Int
The type of CONF option virtual_power_ssh_port was incorrectly defaulted
to Str. This can cause Paramiko to raise when casting to %d.

Fixes bug 1157824.

Change-Id: I30ddd1ff0da45f8392085249f1bd2a539b201a7e
2013-03-20 09:19:44 -07:00
Chris Krelle
7bfbc19021 Virtual Power Driver list running vms quoting error
This patch corrects a issue with VPD when configured for virsh the
list running vms function attempts to execute $2 instead of the actual
command.

Fixes Bug 1154280

Change-Id: I6d06cc58fb0f2935c4341761908b914106bda916
Authored-by: Chris Krelle <nobodycam@gmail.com>
2013-03-12 12:41:12 -07:00
Rick Harris
ed3251715c xenapi: Fix reboot with hung volumes
If a volume becomes inoperable (e.g. the ISCSI connection is severed)
and the user goes to reboot, the instance may enter a permanently halted
state.

The root cause is that a VBD that points to 'bad' volume prevents VM
operations ('reboot', 'start') from completing under XenServer.

The work around is to detect which volumes are bad, detach in the
virt-layer, retry the operation (or in the case of reboot, just 'start'
the halted instance), and then notify the compute manager via a
callback so it can detach the volume in Cinder.

Fixes bug 1148614

Change-Id: Id4e8e84bb5748cfa267c2a418f9405fd86829e8f
2013-03-06 05:28:41 +00:00
Boris Pavlovic
fb457c820e Make bm model's deleted column match database
In Models by default type of deleted column is Integer, but bm tabels
use Boolean type for deleted columns.This produce bug in postgresql
(type mismatch).

At this moment we are not able to do any db migrations, so there is
only one way to fix this bug. Change type of deleted columns in Models
from Integer to Boolean.

In Havana we will be able to change deleted columns types to type of id
for bm tables and use soft_delete and UC as in rest of nova.

Fixes bug 1140294

Change-Id: Id56c4bbff7048ed5c746dc995380be9ba0a12c39
2013-03-08 02:12:22 +04:00
Chris Krelle
c05474c43b Correct substring matching of baremetal VPD node names
This path corrects a issue where is_power_on function can incorrectly match a
node if its name is a substring of another node.

I have also added a test for this.

fixes bug 1152676
Change-Id: Ic3b0b952d53dcd4464098f98879a84684efe22b2
Authored-by: Chris Krelle <nobodycam@gmail.com>
2013-03-08 09:22:19 -08:00
Devananda van der Veen
5dd679aad2 Read baremetal images from extra_specs namespace.
Baremetal PXE driver should read deploy_kernel_id & deploy_ramdisk_id
from the 'baremetal:' namespace within instance_type['extra_specs']
so that it doesn't conflict with ComputeCapabilitiesFilter any more.

Fixes bug 1129485.

Change-Id: I84b3acb2ed83dc2b1ff8f1a21ca1d95f7d25751a
2013-03-04 11:03:40 -08:00
Devananda van der Veen
049312e2c0 Compute manager should remove dead resources
While most hypervisors return a single - and constant - value from
driver.get_available_nodes, baremetal does not. When a node is deleted
from the baremetal database, it is no longer returned from
driver.get_available_nodes. However, Nova's compute_node record is not
directly updated.

This patch allows Compute Manager to detect missing nodes within
update_available_resources. It then invokes resource_tracker to update
the dead node and remove it from compute.

This in turn allows the ServiceGroup API to properly update the
servicegroup when a baremetal node is no longer in service.

Fixes bug 1138184

Change-Id: Icfff3f8e3099668806633a6a58a152b32ec8b49b
2013-03-01 14:05:35 -08:00
Chris Krelle
1a25d3d5ac Add ssh port and key based auth to VPD.
This patch adds the ablity to set ssh port, and use key based
authentication for VPD.

This patch adds config options:
    virtual_power_ssh_port: port to ssh to on virtual power host
    virtual_power_host_key: private key file for ssh auth

Note: Key file must be able to be read by user nova is running as.

      This patch switches the default virtual_power_type from 'vbox'
      to 'virsh' to match the most common usage.

Fix Bug 1136010

Change-Id: Id89878d63d26602bb3eacc2a2ce7902d9bd33d61
Authored-by: Chris Krelle <nobodycam@gmail.com>
2013-02-28 08:11:54 -08:00
Dan Smith
a42d83d2be Add instance_type_get() to virt api
...and remove the use of instance['extra_specs'] from the libvirt and
baremetal virt drivers. Also remove the hack in instance_update()
which places them there in the first place.

Fixes bug 1133572

Change-Id: I39e9fabb28b48dc52ec47f58d76b0bf2c6ee0204
2013-02-27 14:50:50 -05:00
Rick Harris
3246f3051d Don't blindly skip first migration.
The existing code would, no matter-what, skip the first migration when
running through the migrations tests. This makes the code
slightly counterintuitive (why skip the first one?), and is not very
flexible.

The reworked logic lets a migration raise a `NotImplementedError` to
signal that it doesn't support a `downgrade`. This lets the
walk-versions code treat the first-migration just like any other.

Change-Id: I19fd8ebc6075392cf9e573b8b4166291584b4a83
2013-02-28 00:24:22 +00:00
Rick Harris
cfae6726ab BM Migration 004: Actually drop column
SQLAlchemy-migrate appears to support passing in a Column or a
column-name string into `drop_column`. In practice though, only the
column-name form actually works.

Change-Id: I1bcc28511d652df44f7168fb84c8be7dacd60cfd
2013-02-27 23:04:40 +00:00
Kurt Taylor
7e3b9f0c26 Update OpenStack LLC to Foundation
Update all references of "LLC" to "Foundation".

Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
2013-02-22 09:13:07 -05:00