Skip to content

Commit 8678e04

Browse files
authored
Merge pull request #40 from stackhpc/stable/stein
stable/stein -> stackhpc/stein merge
2 parents b4efe4a + 3806c8f commit 8678e04

File tree

38 files changed

+269
-109
lines changed

38 files changed

+269
-109
lines changed

.yamllint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
extends: default
23
ignore: |
34
.tox/

.zuul.d/base.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
- job:
4141
name: kolla-base
4242
parent: base
43-
timeout: 10200
44-
post-timeout: 7200
43+
timeout: 10800
44+
post-timeout: 10800
4545
pre-run: tests/playbooks/pre.yml
4646
run: tests/playbooks/run.yml
4747
post-run: tests/playbooks/post.yml

.zuul.d/centos.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
- kolla-ansible-centos-binary
99
- kolla-ansible-centos-source-upgrade
1010
- tripleo-build-containers-centos-7:
11-
voting: true
11+
# FIXME(yoctozepto): set to voting when TripleO CI is fixed
12+
voting: false
1213
files:
1314
- ^.zuul.d/centos.yaml$
1415
- ^docker/.*$
@@ -24,15 +25,6 @@
2425
queue: kolla
2526
jobs:
2627
- kolla-build-centos-source
27-
- tripleo-build-containers-centos-7:
28-
voting: true
29-
files:
30-
- ^.zuul.d/centos.yaml$
31-
- ^docker/.*$
32-
- ^kolla/.*$
33-
- ^requirements.txt$
34-
- ^setup.cfg$
35-
- ^setup.py$
3628
periodic:
3729
jobs:
3830
- kolla-publish-centos-source

docker/aodh/aodh-api/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1212
{% set aodh_api_packages = ['aodh-api'] %}
1313
{% endif %}
1414
{{ macros.install_packages(aodh_api_packages | customizable("packages")) }}
15+
16+
{% if base_package_type == 'deb' %}
17+
RUN rm -rf /etc/apache2/sites-enabled/aodh-api.conf
18+
{% endif %}
1519
{% endif %}
1620

1721
COPY extend_start.sh /usr/local/bin/kolla_aodh_extend_start

docker/base/Dockerfile.j2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ RUN {{ macros.install_packages( ['tar', 'yum-utils', 'https://dl.fedoraproject.o
185185
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-nfs-ganesha28-1.0-2.el7.centos.noarch.rpm \
186186
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-ceph-nautilus-1.2-2.el7.centos.noarch.rpm \
187187
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-opstools-1-8.el7.noarch.rpm \
188-
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-qemu-ev-1.0-3.el7.centos.noarch.rpm \
188+
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-qemu-ev-1.0-4.el7.centos.noarch.rpm \
189189
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-virt-common-1-1.el7.centos.noarch.rpm \
190190
http://mirror.centos.org/centos-7/7/extras/x86_64/Packages/centos-release-storage-common-2-2.el7.centos.noarch.rpm \
191191
&& sed -i 's/\$releasever/7/g' /etc/yum.repos.d/CentOS-*.repo \
@@ -353,7 +353,9 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
353353
{% set remote_apt_keys = [
354354
'http://obs.linaro.org/ERP:/18.06/Debian_9/Release.key',
355355
'https://download.docker.com/linux/debian/gpg',
356-
'https://packages.grafana.com/gpg.key'
356+
'https://packages.grafana.com/gpg.key',
357+
'http://buster-stein.debian.net/debian/dists/pubkey.gpg',
358+
'https://packages.treasuredata.com/GPG-KEY-td-agent',
357359
] %}
358360
{% set base_apt_packages = base_apt_packages +
359361
['sudo',]

docker/base/nfs_ganesha.repo

Lines changed: 0 additions & 5 deletions
This file was deleted.

docker/base/sources.list.debian

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ deb [arch=amd64] https://artifacts.elastic.co/packages/5.x/apt stable main
1111

1212
# main docker repo
1313
deb https://download.docker.com/linux/debian buster stable
14+
15+
# Buster - Stein repos
16+
deb http://buster-stein.debian.net/debian buster-stein-backports main
17+
deb http://buster-stein.debian.net/debian buster-stein-backports-nochange main
18+
19+
# td-agent for fluentd
20+
deb http://packages.treasuredata.com/3/debian/stretch stretch contrib

docker/ceph/ceph-mon/extend_start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
2222

2323
# Generating initial keyrings and monmap
2424
ceph-authtool --create-keyring "${KEYRING_MON}" --gen-key -n mon. --cap mon 'allow *'
25-
ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *'
25+
ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
2626
ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --cap osd 'allow rwx' --cap mon 'allow rwx'
2727
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_ADMIN}"
2828
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_RGW}"

docker/ceph/ceph-osd/extend_start.sh

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,42 @@ if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then
77
chmod 755 /var/log/kolla/ceph
88
fi
99

10+
# Inform the os about partition table changes
11+
function partprobe_device {
12+
local device=$1
13+
udevadm settle --timeout=600
14+
flock -s ${device} partprobe ${device}
15+
udevadm settle --timeout=600
16+
}
17+
18+
# In some cases, the disk partition will not appear immediately, so check every
19+
# 1s, try up to 10 times. In general, this interval is enough.
20+
function wait_partition_appear {
21+
local dev_part=$1
22+
local part_name=$(echo ${dev_part} | awk -F '/' '{print $NF}')
23+
for(( i=1; i<11; i++ )); do
24+
flag=$(ls /dev | awk '/'"${part_name}"'/{print $0}' | wc -l)
25+
if [[ "${flag}" -eq 0 ]]; then
26+
echo "sleep 1 waits for the partition ${dev_part} to appear: ${i}"
27+
sleep 1
28+
else
29+
return 0
30+
fi
31+
done
32+
echo "The device /dev/${dev_part} does not appear within the limited time 10s."
33+
exit 1
34+
}
35+
36+
# Few storage device like loop or NVMe, wiil add "p" between disk & partition
37+
# name if disk layout is end with number. This function will fix to correct format.
38+
function part_name_checker {
39+
if [[ $1 =~ .*[0-9] ]]; then
40+
echo ${1}p${2}
41+
else
42+
echo ${1}${2}
43+
fi
44+
}
45+
1046
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
1147
# of the KOLLA_BOOTSTRAP variable being set, including empty.
1248
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
@@ -22,45 +58,26 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
2258
if [[ "${USE_EXTERNAL_JOURNAL}" == "False" ]]; then
2359
# Formatting disk for ceph
2460
if [[ "${OSD_STORETYPE}" == "bluestore" ]]; then
25-
if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
26-
sgdisk --zap-all -- "${OSD_BS_DEV}""p${OSD_BS_PARTNUM}"
27-
else
28-
sgdisk --zap-all -- "${OSD_BS_DEV}""${OSD_BS_PARTNUM}"
29-
fi
61+
sgdisk --zap-all -- "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)"
3062

3163
if [ -n "${OSD_BS_BLK_DEV}" ] && [ "${OSD_BS_DEV}" != "${OSD_BS_BLK_DEV}" ] && [ -n "${OSD_BS_BLK_PARTNUM}" ]; then
32-
if [[ "${OSD_BS_BLK_DEV}" =~ "/dev/loop" ]]; then
33-
sgdisk --zap-all -- "${OSD_BS_BLK_DEV}""p${OSD_BS_BLK_PARTNUM}"
34-
else
35-
sgdisk --zap-all -- "${OSD_BS_BLK_DEV}""${OSD_BS_BLK_PARTNUM}"
36-
fi
64+
sgdisk --zap-all -- "$(part_name_checker ${OSD_BS_BLK_DEV} ${OSD_BS_BLK_PARTNUM})"
3765
else
3866
sgdisk --zap-all -- "${OSD_BS_DEV}"
3967
sgdisk --new=1:0:+100M --mbrtogpt -- "${OSD_BS_DEV}"
4068
sgdisk --largest-new=2 --mbrtogpt -- "${OSD_BS_DEV}"
41-
partprobe || true
69+
partprobe_device "${OSD_BS_DEV}"
4270

43-
if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
44-
sgdisk --zap-all -- "${OSD_BS_DEV}"p2
45-
else
46-
sgdisk --zap-all -- "${OSD_BS_DEV}"2
47-
fi
71+
wait_partition_appear "$(part_name_checker $OSD_BS_DEV 2)"
72+
sgdisk --zap-all -- "$(part_name_checker $OSD_BS_DEV 2)"
4873
fi
4974

5075
if [ -n "${OSD_BS_WAL_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_WAL_DEV}" ] && [ -n "${OSD_BS_WAL_PARTNUM}" ]; then
51-
if [[ "${OSD_BS_WAL_DEV}" =~ "/dev/loop" ]]; then
52-
sgdisk --zap-all -- "${OSD_BS_WAL_DEV}""p${OSD_BS_WAL_PARTNUM}"
53-
else
54-
sgdisk --zap-all -- "${OSD_BS_WAL_DEV}""${OSD_BS_WAL_PARTNUM}"
55-
fi
76+
sgdisk --zap-all -- "$(part_name_checker $OSD_BS_WAL_DEV $OSD_BS_WAL_PARTNUM)"
5677
fi
5778

5879
if [ -n "${OSD_BS_DB_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_DB_DEV}" ] && [ -n "${OSD_BS_DB_PARTNUM}" ]; then
59-
if [[ "${OSD_BS_DB_DEV}" =~ "/dev/loop" ]]; then
60-
sgdisk --zap-all -- "${OSD_BS_DB_DEV}""p${OSD_BS_DB_PARTNUM}"
61-
else
62-
sgdisk --zap-all -- "${OSD_BS_DB_DEV}""${OSD_BS_DB_PARTNUM}"
63-
fi
80+
sgdisk --zap-all -- "$(part_name_checker $OSD_BS_DB_DEV $OSD_BS_DB_PARTNUM)"
6481
fi
6582
else
6683
sgdisk --zap-all -- "${OSD_DEV}"
@@ -78,13 +95,8 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
7895
OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}"
7996
mkdir -p "${OSD_DIR}"
8097

81-
if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
82-
mkfs.xfs -f "${OSD_BS_DEV}""p${OSD_BS_PARTNUM}"
83-
mount "${OSD_BS_DEV}""p${OSD_BS_PARTNUM}" "${OSD_DIR}"
84-
else
85-
mkfs.xfs -f "${OSD_BS_DEV}""${OSD_BS_PARTNUM}"
86-
mount "${OSD_BS_DEV}""${OSD_BS_PARTNUM}" "${OSD_DIR}"
87-
fi
98+
mkfs.xfs -f "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)"
99+
mount "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)" "${OSD_DIR}"
88100

89101
# This will through an error about no key existing. That is normal. It then
90102
# creates the key in the next step.
@@ -130,11 +142,8 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
130142

131143
ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring"
132144

133-
if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
134-
umount "${OSD_BS_DEV}""p${OSD_BS_PARTNUM}"
135-
else
136-
umount "${OSD_BS_DEV}""${OSD_BS_PARTNUM}"
137-
fi
145+
umount "$(part_name_checker $OSD_BS_DEV $OSD_BS_PARTNUM)"
146+
138147
else
139148
OSD_ID=$(ceph osd create)
140149
OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}"

docker/cyborg/cyborg-agent/Dockerfile.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
44
{% block cyborg_agent_header %}{% endblock %}
55
{% import "macros.j2" as macros with context %}
66

7+
{% set cyborg_agent_packages = [
8+
'pciutils',
9+
] %}
10+
711
{% if install_type == 'binary' %}
812

913
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
@@ -17,6 +21,8 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
1721

1822
{% endif %}
1923

24+
{{ macros.install_packages(cyborg_agent_packages | customizable("packages")) }}
25+
2026
RUN {{ macros.install_pip(cyborg_agent_pip_packages | customizable("pip_packages")) }}
2127

2228
{% if base_package_type == 'rpm' %}

0 commit comments

Comments
 (0)