File tree Expand file tree Collapse file tree
collect-config-setup/fragments Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22set -eux
33
4+ # this file should be included in write_files section for the node
5+ source /usr/local/share/openshift-on-openstack/common_functions.sh
6+
47# on Atomic host os-collect-config runs inside a container which is
58# fetched&started in another step
69[ -e /run/ostree-booted ] && exit 0
@@ -99,5 +102,13 @@ ln -s /usr/share/openstack-heat-templates/software-config/heat-container-agent/s
99102ln -s /usr/share/openstack-heat-templates/software-config/elements/heat-config/bin/heat-config-notify /usr/bin/heat-config-notify
100103
101104# run once to write out /etc/os-collect-config.conf
102- os-collect-config --one-time --debug
105+ # use notify_failure from common_functions.sh to
106+ # make sure cloud-init reports failure
107+ os-collect-config --one-time --debug ||
108+ notify_failure " failed to run os-collect-config"
109+
110+ # check that a valid metadata_url was set
111+ curl " $( grep metadata_url /etc/os-collect-config.conf | sed ' s/metadata_url = //' ) " ||
112+ notify_failure " failed to connect to os-collect-config metadata_url"
113+
103114cat /etc/os-collect-config.conf
You can’t perform that action at this time.
0 commit comments