6 Commits

Author SHA1 Message Date
Li Zhu
eaf07202a9 Improve remote install robustness
Adding retries to handle the following types of failure:
1. Create communication session failed - Failed to create session.
2. Unable to establish Redfish client connections to BMC at <ip address>
(Server not reachable, return code: 503).
3. Fail to set System Power State to On/Off.

Test Plan:
PASS: Retries work properly when session creation fails.
PASS: Retries work properly when Unable to establish Redfish client
      connection to BMC.
PASS: Retries work properly when returning 500 error in the "Power Off
      Host" stage.
PASS: rvmc script executed successfully without above errors.

Story: 2010144
Task: 46761

Signed-off-by: Li Zhu <li.zhu@windriver.com>
Change-Id: I6bb2e0822a51770b181181b49a86fb51d6dca18b
2022-11-08 15:52:54 +00:00
Hugo Brito
3f181357cc debian: port rvmc docker image to Debian
This commit enables the creation of rvmc docker image by both
distros: CentOS and Debian.

Test Plan:
PASS - Install DC subcloud using Debian image
1. Build rvmc image using stx-debian.
2. Push the new rvmc image to a DC lab registry.
3. Modify the dccommon subcloud_install pointing to the new rvmc image.
4. Install a new subcloud using the new rvmc image.
PASS - Install DC subcloud using CentOS image (same steps as Debian)

Story: 2009831
Task: 45969

Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
Change-Id: I11a9f331cfd1a03d7b5a99223203b240fb31d88b
2022-08-12 16:30:01 +00:00
Eric MacDonald
d46c9c55a9 Redfish Virtual Media Controller enhancements
Adding support for additional server that responds to a number of
redfish requests with the 204 (OK but with no response content).

This update fixes http 204 status handling to expect no response
content.

This update also adds support for servers that download image at
insertion time and have short connection timeout periods that cannot
be changed.

1. Image Insertion: add image download monitoring phase to image
   insertion.
   - to accommodate for servers that load the image during insertion

2. Image Eject: Modify to retry eject and poll for ejection complete.
   - to handle case where the eject is called while a server is aready
     downloading an image.

3. Power Control: Change host power control operation from a 10 second
   inline wait to a 10 x 1sec power state change verification loop
   - avoid server issue that leads to redfish client connection timeout
     due to inactivity. Also extended the power control timeout to
     handled servers that aer slow.

This update also adds the following work around to existing redfish
python library issue.

1. BMC Ping: Verify bmc is pingable before redfish client connect.
   - to avoid redfish client python library hang issue when bmc ip
     is unreachable.

This update also implements the following debug and robustness
improvements:

1. Switch from single to multi line progress to provide better progress
   detail.
2. Add redfish client request execution duration time to the http
   status logs.
3. Add ipv6 bool to control object to so only a single lookup is
   required.
4. Pair action stage logs with action verified log.
5. Fixed 2 logs that didn't have proper parameter format layout.
6. Various logging changes to assist in future issue debug.
7. Verify container continues to work with existing servers.

Change-Id: I9c90ac03ece220b12708594adea582b9f640cdf3
Closes-Bug: 1889086
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2020-08-17 21:14:50 +00:00
Eric MacDonald
4609dacc5f Fix rvmc container build
The current rvmc container build has a conflict over the
python3-pip install.

The CentOS repo has a prior version of python3-pip that
requires python3 3.6 but the CENGN repo requires 3.7 due
to the Titanium base image.

The issue is resolved by updating this dockerfile with an
older verison of python3-pip.

Also, Since python3-pip provides pip3 the explicit pip3
install is no longer required.

Change-Id: Ic0cf0d070eaa8f437a043ac52dfa7ecf0e42f957
Story: 2006980
Task: 37775
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2020-01-20 17:50:27 +00:00
Saul Wold
a9a2ca64bc rvmc: remove un-used build data
The  error below reported in the build logs because rvmc is not
setup to be built as an RPM package.

ERROR: build_dir (425): Neither srpm_path nor .spec file not found
in '/localdisk/designer/swold/stx/cgcs-root/stx/metal/tools/rvmc/centos'

Closes-Bug: 1859893

Change-Id: I9b2788bb227afbdf49e2faa5f05628331719233e
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2020-01-16 08:39:54 -08:00
Eric MacDonald
8959d8258d Utility to install a server via Redfish
This update introduces the implementation for a docker container named
'rvmc', standing for Redfish Virtual Media Controller, which executes a
python file that imports the open source redfish-python-library used to
establish a secure Redfish communication session with a Redfish
supported Board Management Controller to insert a URL based ISO image
into its Virtual Media CD/DVD device so that on that server's next
reboot will boot and install that image.

This container supports single and multi target configuration files with
IPV4 and IPV6 BMC addressing.

Change-Id: I4d555046800c8d193686b9ef3a2b1e61c13d4ff8
Depends-On: https://review.opendev.org/#/c/700434/
Depends-On: https://review.opendev.org/#/c/700080/
Story: 2006980
Task: 37775
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2019-12-31 15:34:54 +00:00