summaryrefslogtreecommitdiff
path: root/ironic_python_agent
Commit message (Collapse)AuthorAgeFilesLines
* Mock _wait_for_interface in test_run_with_sleep2.0.1Javier Pena2017-10-181-1/+4
| | | | | | | | | | | | | | | When running unit tests in an environment without network access, for example in a packaging env, test_run_with_sleep fails with a timeout trying to list the network interfaces [1]. Mocking the _wait_for_interface call, as it is done currently on master and stable/pike, fixes the issue. The original commit is fdcb0922a5c4a4ecbb8cb1b307c6c750990699ff; this patch only grabs the one mock from the original change. [1] - See https://trunk.rdoproject.org/centos7-ocata/8a/70/8a70c4d575c3b5bef2debde8512ed3200ccc8d4c_aa5406af/rpmbuild.log Change-Id: I5010ea78b4794afb72f86762b7e6fc31c1540436
* Remove hard-coded path to grub binariesVasyl Saienko2017-09-262-20/+22
| | | | | | | | | Use PATH variable to find grub binaries. Closes-Bug: 1717255 Change-Id: Ic6a2bafdc87e33c4e1c4534fa355f995c824b945 (cherry picked from commit db5272cfea9fa894675690d54b7d042cb3d01df3)
* Merge "Configure and use SSL-related requests options"Jenkins2017-02-079-2/+90
|\
| * Configure and use SSL-related requests optionsPavlo Shchelokovskyy2017-01-139-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds standard SSL options to IPA config and makes use of them when making HTTP requests. For now, a single set of certificates is used when needed. In the future configuration can be expanded to allow per-service certificates. Besides, the 'insecure' option (defaults to False) can be overridden through kernel command line parameter 'ipa-insecure'. This will allow running IPA in CI-like environments with self-signed SSL certificates. Change-Id: I259d9b3caa9ba1dc3d7382f375b8e086a5348d80 Closes-Bug: #1642515
* | Remove switch_port_descr and switch_chassis_descrRamamani Yeleswarapu2017-02-021-6/+1
| | | | | | | | | | | | | | Removes two reserved fields ``switch_port_descr`` and ``switch_chassis_descr`` that were deprecated in the Newton cycle. Change-Id: Icd2251af63a69d60d1e72eddf651a168fdae94fa
* | Merge "Remove compatibility with old bash-based introspection ramdisk"Jenkins2017-01-302-155/+5
|\ \
| * | Remove compatibility with old bash-based introspection ramdiskDmitry Tantsur2017-01-092-155/+5
| | | | | | | | | | | | | | | | | | | | | Inspector is using inventory directly, so we can remove the bits sending processed network and scheduling properties. Change-Id: I6c58bc3c5ea78fd2dbda82b38515f332ce2e8d4a
* | | Add a comment about the catch-all exception for psutilJohn L. Villalovos2017-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | If there is a problem with psutil failing we have a catch-all exception. Explain reasoning for the catch-all exception. Change-Id: Id2e22e4ff93d96c795f474e72a684dfe3db87a58
* | | Remove support for older psutil versionsJay Faulkner2017-01-262-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Global requirements was recently updated to force psutil=>3.0.1. This patch removes support for older versions of psutil as well as changing to opportunistically attempt to work if a version >5 is released but doesn't change the interface we use. Change-Id: I1f7fab33fd275fb8b5cd7704dc13375402756d06 Related-bug: #1659137
* | | Support psutil 5.0.1Mario Villaplana2017-01-242-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An upper-constraints update to psutil caused IPA to start using psutil 5.0.1. We had a hard-coded assumption that psutil would be major version 1 or 2. This allows us to use the updated psutil and attempts to simply fail gracefully if an unrecognized psutil version is used. Change-Id: Ibe072440159561b34a29b478d955876e5fb7f103 Closes-Bug: 1659137
* | | Merge "Mock out get_wildcard_address"Jenkins2017-01-241-5/+13
|\ \ \
| * | | Mock out get_wildcard_addressDerek Higgins2017-01-201-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where unit tests are running in a env where IPv6 isn't enabled it was returning the IPv4 wildcard address. Change-Id: I0ebadafca70d9cddf761f2ef54726e0123af10f5
* | | | Merge "Reboot and Poweroff fails with coreos IPA image"Jenkins2017-01-202-4/+41
|\ \ \ \ | |/ / / |/| | |
| * | | Reboot and Poweroff fails with coreos IPA imageAnnie Lezil2017-01-202-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CoreOS IPA images do not support poweroff/reboot due to running in a chroot. For this case, we fall back to forcing poweroff or reboot via sysrq commands Change-Id: I75d68b6308beba299d043e43a5fa1671b6ef3ada Closes-Bug: #1628367
* | | | Merge "Limit memory usage when running qemu-img convert"Jenkins2017-01-201-0/+3
|\ \ \ \
| * | | | Limit memory usage when running qemu-img convertLucas Alvares Gomes2017-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is limiting the memory address space to 1 GiB when invoking qemu-img convert. The qemu-img command can be exploited so we better play on the safe side (See: bug #1449062). Change-Id: I2088f74b32d1392310c569cfaa7fd368cb737421 Closes-Bug: #1657808
* | | | | Merge "Add IPv6 unit test for _get_route_source"Jenkins2017-01-191-1/+9
|\ \ \ \ \
| * | | | | Add IPv6 unit test for _get_route_sourceDerek Higgins2017-01-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up from previous patch Change-Id: Ic0286c4eac57f3ae06b237b700d9dbe95ea8b2c0
* | | | | | Merge "iscsi: Listen for connections on both IPv4 and IPv6 ports"Jenkins2017-01-192-3/+29
|\ \ \ \ \ \ | |/ / / / /
| * | | | | iscsi: Listen for connections on both IPv4 and IPv6 portsDerek Higgins2017-01-192-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow connections if deploying over a IPv6 network. Change-Id: Ib5b97e960fcb30b9a37c5971e88d5251905f8113 Closes-Bug: #1650540
* | | | | | Merge "Agent: Listen for connections on both IPv4 and IPv6 ports"Jenkins2017-01-195-3/+21
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | |
| * | | | Agent: Listen for connections on both IPv4 and IPv6 portsDerek Higgins2017-01-195-3/+21
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Allow connections if deploying over a IPv6 network. Change-Id: Ied2f6be4aa4d1a70524df1df3506e596f6926e5b Closes-Bug: #1650539
* | | | Merge "Use sh instead of bash when installing grub"Jenkins2017-01-182-11/+11
|\ \ \ \
| * | | | Use sh instead of bash when installing grubPavlo Shchelokovskyy2017-01-172-11/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is no guarantee that 'bash' is present in a user's image, while 'sh' as system shell must be there. As we do not use any bash-specific syntax (just starting commands in a subshell) when installing the bootloader from chroot-ed user image, let's be more supportive and use 'sh' instead of 'bash' for that. Change-Id: I1fb82068b9c55da35166d8d2ecf9f0ba41356adb Closes-Bug: #1657096
* | | | Removes unnecessary utf-8 encodingCao Xuan Hoang2017-01-164-8/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files added utf-8 encoding but never used. So we can removes them at all. ironic_python_agent/extensions/image.py ironic_python_agent/extensions/iscsi.py ironic_python_agent/tests/unit/extensions/test_image.py ironic_python_agent/tests/unit/extensions/test_iscsi.py Change-Id: Ifc98faf025ee81f885ea58d9203037c6357ea7f2
* | | Advertise the correct address when using IPv6Derek Higgins2017-01-116-2/+79
| |/ |/| | | | | | | | | | | | | | | Parse the output of "ip route get $IP" taking IPv6 into consideration. Also wrap the IP address in square brackets if it is IPv6. Change-Id: Ifc44e5aa3c5b814b6ceba04461bb68fe1d75c22b Closes-Bug: #1650533
* | Merge "Use oslo_serialization.base64 to follow OpenStack Python3"Jenkins2017-01-022-4/+4
|\ \
| * | Use oslo_serialization.base64 to follow OpenStack Python3Luong Anh Tuan2016-12-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces python standard base64 library call to oslo_serialization.base64 to follow OpenStack Python3 porting standard [1]. Use base64 encoding takes 8-bit binary byte data and encodes it. On Python3, A string is a sequence of Unicode characters thus base64 has no idea what to do with Unicode data, it's not 8-bit[2]. We use oslo_serialization.base64 for both python2 and python3. [1] https://wiki.openstack.org/wiki/Python3 [2] http://stackoverflow.com/questions/8908287/base64-encoding-in-python-3 Change-Id: I1dafe878a71f37d223eaf58ea8e2e8c6b4422a14
* | | Fail IPA startup if no protocol prefix in ironic api addressJoanna Taryma2016-12-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add regex validation of api_url specified in configuration file. Oslo config will raise exception if no supported protocol prefix is included in Ironic api address in configuration file. Supported protocols are http and https. Closes-Bug: #1630785 Change-Id: I437b4ea0a2995921ddede03bc670087fdbbc8b83
* | | Merge "Add a new Hardware Manager for CNA network card"Jenkins2016-12-195-8/+331
|\ \ \ | |_|/ |/| |
| * | Add a new Hardware Manager for CNA network cardSzymon Borkowski2016-12-125-8/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new hardware manager, which will disable the embedded LLDP agent on Intel CNA network cards in order to allow the gathering of LLDP data during the inspection process. Change-Id: I572756ac6a7bf67a7f446738ba9d145e1c1bdc48 Closes-Bug: #1623659
* | | Merge "Use oslo-config-generator for sample config"Jenkins2016-12-161-24/+65
|\ \ \ | |_|/ |/| |
| * | Use oslo-config-generator for sample configPavlo Shchelokovskyy2016-12-091-24/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old generate_sample.sh is broken already as it refers to non-existing openstack/common path. Let's use oslo-config-generator as many other OpenStack projects do. Also, where applicable, option descriptions are updated with the corresponding kernel parameters to set those options durig pxe boot. Change-Id: Id4a0df30ea573d52f3b359f357fe8f4a29751939
* | | Merge "Moving Reboot bashscript to python"Jenkins2016-12-153-58/+47
|\ \ \ | |_|/ |/| |
| * | Moving Reboot bashscript to pythonBharath kumar2016-12-153-58/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently a reboot bash script file is used to call reboot and poweroff operation. Deleting this file and moving the code to python file using utils.execute() Partial-Bug: #1557542 Change-Id: Iad9cd9d15417e9a954d108d2759e6303452fca27 Author: Bharath kumar <shettybharath4@gmail.com> Co-Authored-By: Annie Lezil <annie.lezil@gmail.com>
* | | Merge "Add HCTL to BlockDevices"Jenkins2016-12-082-14/+60
|\ \ \
| * | | Add HCTL to BlockDevicesLucas Alvares Gomes2016-12-072-14/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is adding a "hctl" attribute to the BlockDevices. HCTL stands for: Host, Channel, Target and Lun, which is basically the SCSI address. The idea behind this patch is to allow root device hints to find the disk for deployment based on the SCSI address. Partial-Bug: #1648036 Change-Id: If8897c68609e0df0378ee919b803ca5e497def02
* | | | Update mock variable name in unit testsJohn L. Villalovos2016-12-071-57/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In test_agent.py change variable names from 'mocked_' to 'mock_' to follow convention we use in openstack/ironic. Change the mock variable names 'wsgi_server_cls' and 'mocked_server_maker' in some of the unit tests to 'mock_make_server'. It is the convention to have 'mock' in the variable names for mock objects. Not changing the other unit test files at this time. Change-Id: I844071c928f92778e8ce0bfbdb8fb89fc26ee43b
* | | | Merge "Skip API related work if no api url configured"Jenkins2016-12-073-29/+136
|\ \ \ \ | |/ / / |/| | |
| * | | Skip API related work if no api url configuredYufei2016-12-073-29/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if IPA is booted without an ironic api url, it will default to localhost and fail to connect. Instead, we now explicitly fail and print a log message if no api callback url is provided. Change-Id: I0271be94ba7febc6abd5bf3343f6fa179bc1a6a4 Closes-Bug: #1643966
* | | | Fix docsting in Mellanox _detect_hardwareMoshe Levi2016-12-061-1/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | This is followup patch from the review of this I4e7f7649a1bdeaa3ee99b2748037b0f37fea486c commit. Change-Id: I3151daec4ff4ed9c7159a9f3f7f25367586cf3ae
* | | Merge "Fix two typos, "messsage" and "containg""Jenkins2016-11-242-2/+2
|\ \ \
| * | | Fix two typos, "messsage" and "containg"Nam Nguyen Hoai2016-11-222-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | This patch set updated two wrong words: + In error.py file, it should be changed from "messsage" to "message" + In utils.py file, it should be changed from "containg" to "contaning" Change-Id: I5ad121ec58ccc6e5f3cc499eca50d16e691f217e
* | | Add a new Hardware Manager for Mellanox NICsMoshe Levi2016-11-226-2/+249
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add Mellanox Manager to support Mellanox InfiniBand NICs. It adds client_id to the NetworkInterface for the InfiniBand network interface. The Mellanox Manager provides it own implementation of get_interface_info. The mlnx get_interface_info generate InfiniBand MAC and client-id from the InfiniBand network interface address. Closes-Bug: #1532534 Change-Id: I4e7f7649a1bdeaa3ee99b2748037b0f37fea486c
* | Merge "Dispatched out network interface info to all hardware managers"Jenkins2016-11-204-31/+60
|\ \ | |/ |/|
| * Dispatched out network interface info to all hardware managersMoshe Levi2016-11-174-31/+60
| | | | | | | | | | | | | | | | | | | | This patch dispatches out the network_interface_info to allow vendor hardware managers to plug the spacific implementation. It also move neworking releated methods form hardware to netutils Related-Bug: #1532534 Change-Id: Idcd25c4753c009b5ba70bea97ee4eb83391a77a9
* | Python 3 Compatible JSONLuong Anh Tuan2016-11-164-10/+10
|/ | | | | | | | | | | In order to be really python3 compatible, the json lib was replaced with oslo.serialization(1.10 or newer) module jsontuils since it's the recommended migration to python3 guide. https://wiki.openstack.org/wiki/Python3#Serialization:_base64.2C_JSON.2C_etc. Change-Id: I2d8b62e642aba4ccd1b70be7e9b3784a95a6743d Closes-Bug: #1629068
* Merge "Remove old lookup/heartbeat from IPA"Jenkins2016-11-137-198/+16
|\
| * Remove old lookup/heartbeat from IPAPavlo Shchelokovskyy2016-11-097-198/+16
| | | | | | | | | | | | | | | | | | | | | | Lookup/Heartbeat via vendor passthru was deprecated in Newton. This patch removes the corresponding functionality from IPA, and also removes handling of 'ipa-driver-name' kernel parameter, as it was only used in code related to old passthru. Change-Id: I2c7989063ab3e4c0bae33f05d6d2ed857a2d9944 Closes-Bug: #1640533
* | Merge "Add bash scripts style checking for IPA"Jenkins2016-11-101-5/+5
|\ \