'as NAME:URL, NAME!PRIORITY:URL or @FILENAME, for details see below.'),
default=None,
)
+ parser.add_argument(
+ '--no-canonical-tags',
+ action='store_true', default=False,
+ help='configure remote teuthology to not fetch tags from http://github.com/ceph/ceph.git in buildpackages task',
+ )
return parser
def get_parser():
'--simultaneous-jobs'):
del original_argv[0:2]
elif original_argv[0] in ('--teardown',
- '--upload'):
+ '--upload',
+ '--no-canonical-tags'):
del original_argv[0]
elif os.path.isabs(original_argv[0]):
remote_path = self._upload_yaml_file(original_argv[0])
self.args.ceph_workbench_branch)
ceph_workbench += (" --ceph-workbench-git-url " +
self.args.ceph_workbench_git_url)
+ canonical_tags = "--no-canonical-tags" if self.args.no_canonical_tags else ""
log.debug("OPENRC = " + openrc + " " +
"TEUTHOLOGY_USERNAME = " + self.username + " " +
"CLONE_OPENSTACK = " + clone + " " +
"UPLOAD = " + upload + " " +
"CEPH_WORKBENCH = " + ceph_workbench + " " +
- "NWORKERS = " + str(self.args.simultaneous_jobs))
+ "NWORKERS = " + str(self.args.simultaneous_jobs) +
+ "CANONICAL_TAGS = " +
+ ("(empty string)" if canonical_tags == "" else canonical_tags))
content = (template.
replace('OPENRC', openrc).
replace('TEUTHOLOGY_USERNAME', self.username).
replace('CLONE_OPENSTACK', clone).
replace('UPLOAD', upload).
replace('CEPH_WORKBENCH', ceph_workbench).
- replace('NWORKERS', str(self.args.simultaneous_jobs)))
+ replace('NWORKERS', str(self.args.simultaneous_jobs)).
+ replace('CANONICAL_TAGS', canonical_tags))
open(path, 'w').write(content)
log.debug("get_user_data: " + content + " written to " + path)
return path
runcmd:
- su - -c '(set -x ; CLONE_OPENSTACK && cd teuthology && ./bootstrap install)' TEUTHOLOGY_USERNAME >> /tmp/init.out 2>&1
- echo 'export OPENRC' | tee /home/TEUTHOLOGY_USERNAME/openrc.sh
- - su - -c '(set -x ; source openrc.sh ; cd teuthology ; source virtualenv/bin/activate ; openstack keypair delete teuthology || true ; teuthology/openstack/setup-openstack.sh --nworkers NWORKERS UPLOAD CEPH_WORKBENCH --setup-all)' TEUTHOLOGY_USERNAME >> /tmp/init.out 2>&1
+ - su - -c '(set -x ; source openrc.sh ; cd teuthology ; source virtualenv/bin/activate ; openstack keypair delete teuthology || true ; teuthology/openstack/setup-openstack.sh --nworkers NWORKERS UPLOAD CEPH_WORKBENCH CANONICAL_TAGS --setup-all)' TEUTHOLOGY_USERNAME >> /tmp/init.out 2>&1
- /etc/init.d/teuthology restart
final_message: "teuthology is up and running after $UPTIME seconds"
local ip="$5"
local flavor_select="$6"
local archive_upload="$7"
+ local canonical_tags="$8"
if test "$flavor_select" ; then
flavor_select="flavor-select-regexp: $flavor_select"
lab_domain: $labdomain
max_job_time: 32400 # 9 hours
teuthology_path: .
+canonical_tags: $canonical_tags
openstack:
clone: git clone http://github.com/ceph/teuthology
user-data: teuthology/openstack/openstack-{os_type}-{os_version}-user-data.txt
local do_populate_paddles=false
local do_setup_pulpito=false
local do_clobber=false
+ local canonical_tags=true
export LC_ALL=C
--clobber)
do_clobber=true
;;
+ --no-canonical-tags)
+ canonical_tags=false
+ ;;
*)
echo $1 is not a known option
return 1
: ${nameserver:=$ip}
if $do_create_config ; then
- create_config "$network" "$subnets" "$nameserver" "$labdomain" "$ip" "$flavor_select" "$archive_upload" || return 1
+ create_config "$network" "$subnets" "$nameserver" "$labdomain" "$ip" "$flavor_select" "$archive_upload" "$canonical_tags" || return 1
setup_ansible "$subnets" $labdomain || return 1
setup_ssh_config || return 1
setup_authorized_keys || return 1
" BUILD_FLAVOR=" + build_flavor +
" HTTP_FLAVOR=" + http_flavor +
" HTTP_ARCH=" + default_arch +
+ " BUILDPACKAGES_CANONICAL_TAGS=" +
+ ("true" if teuth_config.canonical_tags else "false") +
" " + target +
" ")
- log.info("buildpackages: " + cmd)
+ log.info("Executing the following make command to build {} packages. " \
+ "Note that some values in the command, like CEPH_GIT_URL " \
+ "and BUILDPACKAGES_CANONICAL_TAGS, may differ from similar " \
+ "command-line parameter values. This is because " \
+ "the values used by this task are taken from the teuthology " \
+ "configuration file. If in doubt, tear down your teuthology " \
+ "instance and start again from scratch.".format(pkg_type))
+ log.info("buildpackages make command: " + cmd)
misc.sh(cmd)
teuth_config.gitbuilder_host = openstack.get_ip('packages-repository', '')
log.info('Finished buildpackages')
for delay in 1 2 4 8 8 8 8 8 8 8 8 8 16 16 16 16 16 32 32 32 64 128 256 512 ; do if ssh -o 'ConnectTimeout=3' $$ip bash -c '"grep -q READYTORUN /var/log/cloud-init*.log"' ; then break ; else sleep $$delay ; fi ; done ; \
scp make-${CEPH_PKG_TYPE}.sh common.sh ubuntu@$$ip: ; \
packages_repository=$(call get_ip,${<F}) ; \
- timeout $(TIMEOUT_BUILD) ssh -tt -A ubuntu@$$ip bash ./make-${CEPH_PKG_TYPE}.sh $$packages_repository ${CEPH_DIST} ${CEPH_GIT_URL} ${CEPH_SHA1} ${CEPH_FLAVOR} ${CEPH_ARCH}
+ timeout $(TIMEOUT_BUILD) ssh -tt -A ubuntu@$$ip bash ./make-${CEPH_PKG_TYPE}.sh $$packages_repository ${CEPH_DIST} ${CEPH_GIT_URL} ${CEPH_SHA1} ${CEPH_FLAVOR} ${CEPH_ARCH} ${BUILDPACKAGES_CANONICAL_TAGS}
mkdir -p ${D}/${@D} ; touch ${D}/$@
clobber:
test -d ceph || git clone ${git_ceph_url} ceph
cd ceph
if test -d src ; then # so we don't try to fetch when using a fixture
- git fetch --tags http://github.com/ceph/ceph
+ if test "x$BUILDPACKAGES_CANONICAL_TAGS" != "xfalse" ; then
+ echo "Fetching canonical tags from http://github.com/ceph/ceph (to disable, " \
+ "set BUILDPACKAGES_CANONICAL_TAGS=false in the environment)"
+ git fetch --tags http://github.com/ceph/ceph
+ fi
fi
git fetch --tags ${git_ceph_url}
git checkout ${sha1}
sha1=$4
flavor=$5
arch=$6
+canonical_tags=$7
sudo apt-get update
sudo apt-get install -y git
+export BUILDPACKAGES_CANONICAL_TAGS=$canonical_tags
source $(dirname $0)/common.sh
init_ceph $git_ceph_url $sha1
sha1=$4
flavor=$5
arch=$6
+canonical_tags=$7
suse=false
[[ $codename =~ suse ]] && suse=true
sudo yum install -y git
fi
+export BUILDPACKAGES_CANONICAL_TAGS=$canonical_tags
source $(dirname $0)/common.sh
init_ceph $git_ceph_url $sha1