940 Commits

Author SHA1 Message Date
Lucas Alvares Gomes
4b802c47b5 Add sync() command to the standby module
This patch is adding a new command called sync to the standby module of
IPA. The new command runs synchronously and it's responsible for
flushing file system buffers to the disks.

The initial intention for this command is to use it as part of the fix
for the bug #1512492 where some hardware/firmwares do have problems to
come back online after a soft ACPI power off, therefore we need to call
sync() to make sure all file system buffers have been synced and then
issue a hard power off (e.g via the BMC).

Partial-Bug: #1512492
Change-Id: I5cd1d1b821426e995dc584452494b93ab23917e0
2016-03-18 15:20:48 +00:00
Jenkins
dcd1c8f19b Merge "Document hardware inventory sent to lookup and inspection" 2016-03-15 17:04:25 +00:00
Jenkins
c9f7c951dc Merge "Stop trying to log stdout when fetching logs during inspection" 2016-03-15 17:01:44 +00:00
Jenkins
21afeb4017 Merge "Fixes programmatic error in _install_grub()" 2016-03-12 01:13:22 +00:00
Nisha Agarwal
bb605784dd Fixes programmatic error in _install_grub()
The patch defines the variables before they are used in the
code.

Closes-bug: 1555547
Change-Id: I27c5e926cf4001211c4edd794a09b26559c63f71
2016-03-11 21:09:37 +00:00
Lucas Alvares Gomes
f09dce79af Fix programmatic error in heartbeat()
This patch is fixing a programmatic error in the heartbeat() method of
the APIClient() class. When 409 (Conflict) was returned from the the
Ironic API the code wasn't parsing the content of the response
correctly.

Change-Id: I01fbb8d866b2f94fe128d0bc40b69d05b5add1a3
Closes-Bug: #1556199
2016-03-11 16:58:28 +00:00
Dmitry Tantsur
58f86d0353 Stop trying to log stdout when fetching logs during inspection
Logging the whole journalctl output is not the best idea. Fortunately,
it does not work right now and fails with a traceback :)

This change adds a new log_stdout argument to utils.execute() and uses it in
the "logs" inspection collector.

Also do not log the logs while logging the collected data.

Change-Id: Ibc726ac2c4f5eb06c73ac4765bb400077b84a6cc
2016-03-08 16:31:18 +01:00
Lucas Alvares Gomes
944dc4e248 CoreOS: Disable unused services
This patch is masking the services that are started when the Ironic
Python Agent ramdisk boots up but are not needed. Consequently, this may
save us some seconds at startup time.

The list of services disabled are: update-engine, update-engine-stub,
resize-btrfs, locksmithd, fleet and etcd.

Change-Id: Ib91ec2d0c69b1724170d38dea5d38248145c5d9f
2016-03-07 16:02:05 +00:00
Zhenguo Niu
d25d94b316 Change to use WARNING level for heartbeat conflict errors
It's normal that ironic returns 409 Conflict from time to time, so
it's a bit confusing that we report this with Exception level and
traceback.

Change-Id: I1627c61facc3fadd0f5d9d324150e7d2833c7fbc
Closes-Bug: #1533113
2016-03-06 17:13:02 +08:00
Jenkins
9b9b982fdd Merge "Wait for udev to settle before listing the block devices" 2016-03-03 23:26:28 +00:00
Jenkins
3efbf9a828 Merge "Update DIB description for IPA docs" 2016-03-03 17:13:29 +00:00
Jenkins
19e0e21543 Merge "Add DIB ironic-agent element to readme for IPA" 2016-03-03 17:13:18 +00:00
Lucas Alvares Gomes
055998c812 Wait for udev to settle before listing the block devices
This patch is making the list_all_block_devices() method to wait for
udev to settle it's event queue prior to listing the devices.

Sometimes the ironic-python-agent service may start before all devices
were detected and end up erroring out because it couldn't find a
suitable disk for deployment.

Closes-Bug: #1551300
Change-Id: I1ae2062a711115a1ea14b79ae9ace7ddd2fff9d5
2016-03-02 10:54:51 +00:00
Jenkins
1971ad7023 Merge "Reduced restriction of parsing for dmidecode output" 2016-03-01 17:39:10 +00:00
Jenkins
2a71a94208 Merge "Replace all the 'self.log' calls with global LOG" 2016-02-29 16:05:09 +00:00
OpenStack Proposal Bot
b5f9d31fab Updated from global requirements
Change-Id: I4f7cefe335696a7200167f43fc3a05f5d5f86f52
2016-02-26 21:41:52 +00:00
Kurt Taylor
f961169302 Update DIB description for IPA docs
Updating information in the IPA documentation for diskimage-builder usage.

Change-Id: Id81797c5f56b55cbee2bc6e3a3950cbff0af8150
2016-02-26 11:47:26 -06:00
Dmitry Tantsur
1437e15a1b Allow enabling debug level via kernel cmdline
Adds a new kernel option "ipa-debug" which can be set to "1" or "true" to
enable debug logging.

Change-Id: Iafe9a9b8b718280920005726e0f7e69e3f0a320c
2016-02-26 12:34:20 +01:00
Kurt Taylor
8bf5651f82 Add DIB ironic-agent element to readme for IPA
Adding Diskimage Builder ironic-agent element link to README.rst

Change-Id: Ie4bb500edd265ece0b3c31179d309a7c270d2004
2016-02-24 15:32:10 -06:00
Zhenguo Niu
7fe40bb559 Replace all the 'self.log' calls with global LOG
Change-Id: Iae917e1139c8c95a1bad5466df8a607656b9de5c
2016-02-24 09:51:01 +08:00
Jenkins
2e1b6cd0ed Merge "Updated from global requirements" 2016-02-23 16:23:25 +00:00
twm2016
d66fa523bf Reduced restriction of parsing for dmidecode output
Changed implementation to strip tokens up until the first 'Size: '
string. This will allow for less parsing errors in the first
six lines of the following output:
"dmidecode --type 17 | grep Size" returns:
        Maximum Memory Module Size: 4096 MB
        Maximum Total Memory Size: 8192 MB
        Size: 2048 MB
        Size: 2048 MB

Added a condition in the exception handling to address the
issue of the bug on other outputs like:
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Size: No Module Installed
        Size: 1024 MB

Common strings like "No Module Installed" and "Not Installed" are
normal. These two strings are hard coded in the before mentioned
comparison and when found are logged as warnings instead of errors.

Change-Id: If3475afcebfc7af7e9256b99924919557c4d909c
Closes-Bug: #1521202
2016-02-22 22:46:28 +00:00
Zhenguo Niu
c716293cbf Catch OSError as well to return a better error message
When neither tgt nor linux-io are available, we only get error
message like 'No such file or directory', this situation should
be detected and return a better error instead.

Change-Id: I334717a1a8a728aa6da6024ff9fc6d817399a41f
Closes-Bug: #1540958
2016-02-22 15:10:57 +08:00
OpenStack Proposal Bot
b8e8927f64 Updated from global requirements
Change-Id: I80f5f50b3aa0c968f859e172b0a52484783ed4aa
2016-02-20 21:55:45 +00:00
Dmitry Tantsur
c9674da220 Document hardware inventory sent to lookup and inspection
Also add a missing docstring to HardwareManager.list_hardware_info.

Change-Id: Iee3584320f0591398e7761513ff588efeb62886d
2016-02-18 13:32:43 +01:00
Jenkins
3bcda73ca0 Merge "Clear GPT and MBR data structures on disk before imaging" 2016-02-18 08:53:03 +00:00
Jenkins
0f162fba2f Merge "Update unit tests to use six.moves.builtins.open" 2016-02-18 03:58:08 +00:00
Jenkins
44f23b5674 Merge "Add support for proxy servers during image build" 2016-02-18 03:57:57 +00:00
Jenkins
01685839ba Merge "TinyIPA: Prevent install of pre-release dependencies" 2016-02-17 14:20:39 +00:00
Moshe Levi
52fc4f891f Update unit tests to use six.moves.builtins.open
Change-Id: I724a42d22d4c9011feb8aa09726e5186686f3729
2016-02-17 14:08:52 +02:00
Jenkins
559b25f56e Merge "TinyIPA: Explicitly use /bin/bash instead of /bin/sh" 2016-02-17 11:20:07 +00:00
Jenkins
6a1341d2c3 Merge "Replace backoff looping call with oslo_service provided version" 2016-02-16 20:38:37 +00:00
Jenkins
b5008dcb31 Merge "Add 'system_vendor' information to data" 2016-02-16 18:41:09 +00:00
Lucas Alvares Gomes
f9344a792c TinyIPA: Prevent install of pre-release dependencies
We want to install the dev version of IPA but we don't want pre-release
versions of IPA's dependencies, this patch ensures that only released
deps are installed.

Change-Id: I6187fbbd0bdd80503861d3760248f3f23c1c6388
2016-02-16 17:24:17 +00:00
Lucas Alvares Gomes
589145b1db TinyIPA: Explicitly use /bin/bash instead of /bin/sh
We need to explicitly use /bin/bash for the {build, finalise}-tinyipa.sh
scripts because the script relies on a bash extension to get the current
working directory.

Depends-On: I4690514803dd91d4bda0d38df4fd792f31a51421
Change-Id: Ic1ed66c8fa8936a822e112199844a869106751dc
2016-02-16 17:24:06 +00:00
Yuiko Takada
3823a53040 Add 'system_vendor' information to data
This patch set add hardware vendor information to data.
By using this data, we can get hints to detect driver.

Change-Id: I39385fd5d616edfad719c255f22642f215bfb532
2016-02-15 10:19:17 +09:00
OpenStack Proposal Bot
855e301336 Updated from global requirements
Change-Id: I898ef8de841bb1602ff19d3b397a0893a3dc03b5
2016-02-11 07:39:54 +00:00
Jenkins
1b918b885e Merge "Fix vfd mount for capitalized device name" 2016-02-09 21:40:26 +00:00
Shivanand Tendulker
8f5ed3e2f1 Clear GPT and MBR data structures on disk before imaging
This patch clears all GPT and MBR data structures on the disk.
GPT maintains its data structures at start and at end of the
disk.

Change-Id: I8d0b367755b568cb44f02f62b873659b4bea0f14
Closes-Bug: #1543339
2016-02-09 09:13:07 -08:00
Naohiro Tamura
73f81f2982 Fix vfd mount for capitalized device name
This patch enables virtual media deploy even if the expected virtual
floppy device name "/dev/disk/by-label/ir-vfd-dev" is capitalized to
"/dev/disk/by-label/IR-VFD-DEV".
This change is necessary because some bare metal hardware such as
FUJITSU RX1330 series create the capitalized virtual floppy device
name.

Change-Id: I436b3f9524a83814e082f8dd421df3e53b33f792
Closes-Bug: #1541167
2016-02-08 16:33:14 +09:00
Jenkins
e76390b915 Merge "Add tinyipa to IPA imagebuild directory" 2016-02-06 00:27:06 +00:00
John L. Villalovos
1ffaaf6abf Add support for proxy servers during image build
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
2016-02-04 14:27:49 -08:00
Jenkins
ec849d8e22 Merge "Leave git installed in docker builder" 2016-02-04 21:53:41 +00:00
Joshua Harlow
df701c979c Replace backoff looping call with oslo_service provided version
The code that comprises the backoff looping call moved to
oslo.service in 0.10.0 and IPA can use that version so remove
the local backoff code and just prefer the oslo.service maintained
and supported version instead.

Change-Id: Ifec3490f9e5c68859deff4a951dcdf59caa7ca3a
2016-02-04 12:22:21 -08:00
Jim Rollenhagen
7c85ed8041 Leave git installed in docker builder
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
2016-02-03 11:43:54 -08:00
Jenkins
3ce3b16803 Merge "Extend root device hints to support device name" 2016-02-03 01:58:04 +00:00
Lucas Alvares Gomes
6752ce8032 Extend root device hints to support device name
This patch is extending the root device hints to also look at the device
name. This patch also refactors the tests for root device hints making
it easier to test a different hint per test.

Change-Id: I48d6456c75bbe6ddf16ac6561e5461ca51eb9c37
Partial-Bug: #1526732
2016-02-02 10:32:39 +00:00
Sam Betts
632c7e6d31 Add tinyipa to IPA imagebuild directory
TinyCoreLinux is a small 10mb base linux distribution which can easily
be built into a ramdisk for PXE and ISO booting. This patch adds scripts
and other required files to build a TinyCore based ramdisk which runs
the Ironic Python Agent.

Change-Id: I79fbec75de19b3d6feb19f87a3a0f662eae42bf3
2016-01-29 12:07:19 +00:00
OpenStack Proposal Bot
33b482aa4d Updated from global requirements
Change-Id: Ic6931280d999c91a26e582b5a61fc58bf677c1b1
2016-01-28 13:20:06 +00:00
Jenkins
1e30946835 Merge "Allow hardware managers to override clean step priority" 2016-01-28 05:36:12 +00:00