Skip to content

Commit aab631c

Browse files
authored
Merge branch 'stackhpc/yoga' into feat/yoga-elrepo-9
2 parents 5ec3de0 + 88227d1 commit aab631c

File tree

5 files changed

+38
-18
lines changed

5 files changed

+38
-18
lines changed

etc/kayobe/ansible/scripts/nvmemon.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,18 @@ format_output() {
4444
nvme_version="$(nvme version | awk '$1 == "nvme" {print $3}')"
4545
echo "nvmecli{version=\"${nvme_version}\"} 1" | format_output
4646

47-
# Get devices
48-
device_list="$(nvme list -o json | jq -r '.Devices | .[].DevicePath')"
47+
# Get devices (DevicePath and PhysicalSize)
48+
device_info="$(nvme list -o json | jq -c '.Devices[] | {DevicePath: .DevicePath, PhysicalSize: .PhysicalSize}')"
4949

5050
# Loop through the NVMe devices
51-
for device in ${device_list}; do
51+
echo "$device_info" | while read -r device_data; do
52+
device=$(echo "$device_data" | jq -r '.DevicePath')
5253
json_check="$(nvme smart-log -o json "${device}")"
5354
disk="${device##*/}"
5455

56+
physical_size=$(echo "$device_data" | jq -r '.PhysicalSize')
57+
echo "physical_size_bytes{device=\"${disk}\"} ${physical_size}"
58+
5559
# The temperature value in JSON is in Kelvin, we want Celsius
5660
value_temperature="$(echo "$json_check" | jq '.temperature - 273')"
5761
echo "temperature_celsius{device=\"${disk}\"} ${value_temperature}"

etc/kayobe/environments/ci-builder/kolla.yml

-14
This file was deleted.

etc/kayobe/kolla.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ kolla_openstack_release: "{% raw %}{{ kayobe_image_tags['openstack'][kolla_base_
100100

101101
# Docker tag applied to built container images. Default is
102102
# {{ kolla_openstack_release }}.
103-
#kolla_tag:
103+
kolla_tag: "{{ openstack_release }}-{{ ansible_facts.date_time.iso8601_basic_short }}"
104104

105105
# Dict mapping names of sources to their definitions for
106106
# kolla_install_type=source. See kolla.common.config for details.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes an issue with local image builds where kolla_tag had not been set.
5+
The error had the signature:
6+
7+
.. code-block:
8+
9+
Traceback (most recent call last):
10+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/kolla/image/build.py", line 565, in builder
11+
buildargs=buildargs):
12+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/docker/api/build.py", line 269, in build
13+
timeout=timeout,
14+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/docker/utils/decorators.py", line 46, in inner
15+
return f(self, *args, **kwargs)
16+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/docker/api/client.py", line 233, in _post
17+
return self.post(url, **self._set_request_timeout(kwargs))
18+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/requests/sessions.py", line 577, in post
19+
return self.request('POST', url, data=data, json=json, **kwargs)
20+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/requests/sessions.py", line 529, in request
21+
resp = self.send(prep, **send_kwargs)
22+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/requests/sessions.py", line 645, in send
23+
r = adapter.send(request, **kwargs)
24+
File "/opt/kayobe/venvs/kolla/lib/python3.6/site-packages/requests/adapters.py", line 501, in send
25+
raise ConnectionError(err, request=request)
26+
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
features:
3+
- |
4+
Nvmemon now reports physical size of the disk.

0 commit comments

Comments
 (0)