Remove tripleo.sh --bootstrap-subnodes add ceph loop device
As part of sprint 16 we want to remove tripleo.sh usage from ci in particular the invocation of bootstrap-subnodes [1]. This was initially proposed as stand-alone role in [2] but discussion has led us to keeping only creation of the ceph loop device, added here as ansible tasks in a tripleo-ci/ceph.yaml. This is included in the pre-run for the tripleo-ci-base job (zuul-v3) but not for legacy jobs. That needs to wait for [3] and related testing/other changes. This removes any calls to tripleo.sh --bootstrap-subnodes from the templated .j2 version of toci_gate_test and common_functions and adds the new tripleo-ci/ceph.yaml in pre-run of tripleo-ci-base Non templated scripts can be changed in a followup after [3]. [1] https://trello.com/c/GvjcnJB2/850-translate-tripleosh-bootstrap-subnodes-into-a-series-of-tasks [2] https://review.openstack.org/581026 [3] https://review.rdoproject.org/r/#/c/15000 Depends-On: Ib95b02767488aaddfe95633d03cb118dd492a700 Change-Id: I1616a41914ca7142bd7d936ff906c54249012bbb
This commit is contained in:
parent
28fdf96b82
commit
1da8046833
|
@ -0,0 +1,24 @@
|
|||
- hosts: subnodes
|
||||
name: Bootstrap subnodes - setup ceph-ansible /dev/loop3 /var/lib/ceph-osd.img
|
||||
vars:
|
||||
ceph_loop_device: /dev/loop3
|
||||
ceph_loop_device_file: /var/lib/ceph-osd.img
|
||||
tasks:
|
||||
- name: stat ceph_loop_device see if it already exists
|
||||
stat:
|
||||
path: "{{ ceph_loop_device }}"
|
||||
register: dev_loop3_res
|
||||
- name: log to syslog if ceph_loop_device exists
|
||||
syslogger:
|
||||
msg: "boostrap-subnodes - warning {{ ceph_loop_device }} already exists"
|
||||
when: dev_loop3_res.stat.exists
|
||||
- name: Make sure we have losetup installed/latest
|
||||
package:
|
||||
name: util-linux
|
||||
state: latest
|
||||
- name: Use dd and losetup to create the loop device
|
||||
become: true
|
||||
shell: |
|
||||
dd if=/dev/zero of={{ ceph_loop_device_file }} bs=1 count=0 seek=7G
|
||||
losetup {{ ceph_loop_device }} {{ ceph_loop_device_file }}
|
||||
lsblk
|
|
@ -175,33 +175,3 @@ function sanitize_ip_address {
|
|||
echo $ip
|
||||
fi
|
||||
}
|
||||
|
||||
function echo_vars_to_deploy_env_oooq {
|
||||
CALLER=$(caller)
|
||||
echo "# Written via echo_vars_to_deploy_env from $CALLER" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
for VAR in NODEPOOL_CENTOS_MIRROR http_proxy MY_IP no_proxy NODECOUNT SSH_OPTIONS STABLE_RELEASE TRIPLEO_ROOT TOCI_JOBTYPE JOB_NAME SUBNODES_SSH_KEY FEATURE_BRANCH BOOTSTRAP_SUBNODES_MINIMAL; do
|
||||
if [ -n "${!VAR:+x}" ]; then
|
||||
echo "export $VAR=\"${!VAR}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
fi
|
||||
done
|
||||
# TODO(gcerami) uncomment this code if 3nodes jobs are implemented before the bootstrap role
|
||||
# in quickstart. If the bootstrap role is implemented first, this function can be completely
|
||||
# removed
|
||||
#for role in $OVERCLOUD_ROLES; do
|
||||
# eval hosts=\${${role}_hosts}
|
||||
# echo "export ${role}_hosts=\"${hosts}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
#done
|
||||
}
|
||||
|
||||
function subnodes_scp_deploy_env {
|
||||
for ip in $(cat /etc/nodepool/sub_nodes_private); do
|
||||
sanitized_address=$(sanitize_ip_address $ip)
|
||||
ssh $SSH_OPTIONS -tt -i /etc/nodepool/id_rsa $ip \
|
||||
sudo mkdir -p $TRIPLEO_ROOT/tripleo-ci
|
||||
scp $SSH_OPTIONS -i /etc/nodepool/id_rsa \
|
||||
$TRIPLEO_ROOT/tripleo-ci/deploy.env ${sanitized_address}:
|
||||
ssh $SSH_OPTIONS -tt -i /etc/nodepool/id_rsa $ip \
|
||||
sudo cp deploy.env $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -240,26 +240,6 @@ else
|
|||
undercloud_haproxy_admin_ip=$undercloud_net_range"3"
|
||||
export no_proxy=$undercloud_services_ip,$undercloud_haproxy_public_ip,$undercloud_haproxy_admin_ip,$MY_IP,$MY_IP_eth1
|
||||
|
||||
|
||||
|
||||
# multinode bootstrap script
|
||||
export DO_BOOTSTRAP_SUBNODES=${DO_BOOTSTRAP_SUBNODES:-1}
|
||||
export BOOTSTRAP_SUBNODES_MINIMAL=1
|
||||
overcloud_release=${UPGRADE_RELEASE:-$STABLE_RELEASE}
|
||||
if [ "${overcloud_release}" = "newton" ]; then
|
||||
BOOTSTRAP_SUBNODES_MINIMAL=0
|
||||
fi
|
||||
|
||||
echo_vars_to_deploy_env_oooq
|
||||
subnodes_scp_deploy_env
|
||||
if [ "$DO_BOOTSTRAP_SUBNODES" = "1" ]; then
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh \
|
||||
--bootstrap-subnodes \
|
||||
2>&1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S |"), $0; fflush(); }' | sudo tee /var/log/bootstrap-subnodes.log \
|
||||
|| (tail -n 50 /var/log/bootstrap-subnodes.log && false)
|
||||
fi
|
||||
|
||||
|
||||
# finally, run quickstart
|
||||
./toci_quickstart.sh
|
||||
fi
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
- playbooks/nodepool-provider/pre.yaml
|
||||
- playbooks/multinode-networking/pre.yaml
|
||||
- playbooks/openstack-zuul-jobs/legacy/pre.yaml
|
||||
- playbooks/tripleo-ci/ceph.yaml
|
||||
run: playbooks/tripleo-ci/run-v3.yaml
|
||||
post-run: playbooks/tripleo-ci/post.yaml
|
||||
irrelevant-files:
|
||||
|
|
Loading…
Reference in New Issue