+ echo '====== automated-ec2-builds [/tmp/automated-ec2-builds] ======' ====== automated-ec2-builds [/tmp/automated-ec2-builds] ====== + cd /tmp/automated-ec2-builds + bzr info Standalone tree (format: 2a) Location: branch root: . Related branches: parent branch: http://bazaar.launchpad.net/~ubuntu-on-ec2/vmbuilder/automated-ec2-builds/ + bzr version-info revision-id: francis.ginther@canonical.com-20170512100220-g0y0klq16e947kv3 date: 2017-05-12 05:02:20 -0500 build-date: 2017-07-27 21:36:03 +0000 revno: 731 branch-nick: automated-ec2-builds + bzr log -p -r-1 ------------------------------------------------------------ revno: 731 [merge] fixes bug: https://launchpad.net/bugs/1690229 committer: Francis Ginther branch nick: automated-ec2-builds timestamp: Fri 2017-05-12 05:02:20 -0500 message: Switch trusty arm64 images to the generic-lts-xenial kernel to support GICv3 hardware (lp:1690229). [a=fginther] [r=rcj,daniel-thewatkins] diff: === modified file 'conf/trusty-arm64-server.conf' --- conf/trusty-arm64-server.conf 2014-03-13 20:14:04 +0000 +++ conf/trusty-arm64-server.conf 2017-05-11 20:54:42 +0000 @@ -28,5 +28,5 @@ "--hdd-new-fstab" "--root-mount-by=LABEL" "--binary-images=binary-hdd-raw" "--bootloader=none" "--hdd-size=%s" "--binary-filesystem=ext4" "--bootstrap-qemu-static=%q" "--bootstrap-qemu-arch=%A" "--architecture=%A" - "--cache=false" "--source=false" "--linux-flavours=generic" ) + "--cache=false" "--source=false" "--linux-flavours=generic-lts-xenial" ) purge_roottgz_pkgs=( "linux-*" ) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions. + echo '' + echo '====== ec2-publishing-scripts [/tmp/ec2-publishing-scripts] ======' ====== ec2-publishing-scripts [/tmp/ec2-publishing-scripts] ====== + cd /tmp/ec2-publishing-scripts + bzr info Standalone tree (format: unnamed) Location: branch root: . Related branches: parent branch: http://bazaar.launchpad.net/~ubuntu-on-ec2/ubuntu-on-ec2/ec2-publishing-scripts/ + bzr version-info revision-id: phil.roche@canonical.com-20170710100431-513ostjc5a5b8b0q date: 2017-07-10 11:04:31 +0100 build-date: 2017-07-27 21:36:03 +0000 revno: 651 branch-nick: ec2-publishing-scripts + bzr log -p -r-1 ------------------------------------------------------------ revno: 651 [merge] committer: Phil Roche branch nick: ec2-publishing-scripts timestamp: Mon 2017-07-10 11:04:31 +0100 message: Merge lp:~philroche/ubuntu-on-ec2/ec2-publishing-scripts-ena-clean into lp:~ubuntu-on-ec2/ubuntu-on-ec2/ec2-publishing-scripts [a=philroche] [r=daniel-thewatkins,fginther,rcj] Modify Trusty old world publication to make it possible to set the ENA attribute using CIM Using CIM only for HVM image publication. MP: https://code.launchpad.net/~philroche/ubuntu-on-ec2/ec2-publishing-scripts-ena-clean/+merge/324937 diff: === modified file 'ec2-image2ebs' --- ec2-image2ebs 2016-08-18 17:49:42 +0000 +++ ec2-image2ebs 2017-07-04 16:51:57 +0000 @@ -294,6 +294,7 @@ amd64|x86_64) ec2_arch=x86_64;; *) fail "arch ${arch} not supported (i386 or x86_64)";; esac +[ "${arch}" = "amd64" ] && arch=x86_64 && debarch=amd64 || debarch=${arch} TEMP_D=$(mktemp -d ${TMPDIR:-/tmp}/${0##*/}.XXXXXX) || fail "failed to make tmp dir" @@ -624,11 +625,54 @@ [[ "${etype}" =~ hvm ]] && args[${#args[@]}]="--virtualization-type=hvm" -debug 1 "registering: register ${args[*]}" -retry 15 30 xc2 ximages register "${args[@]}" > "${register_info}" && +# If the storage type contains the string hvm then this is of virtualization type hvm +# As such we will use cloud-image-manager to register the image and set AMI +# attributes during registration that can not be set using the old way +# to register images. +if [[ "${etype}" =~ hvm ]] +then + # Map ebs volume type to the terms used by cloud-image-manager + ebs_storage_type='ebs' + if [[ "${etype}" =~ ssd ]]; then + ebs_storage_type='ebs-ssd' + fi + if [[ "${etype}" =~ io1 ]]; then + ebs_storage_type='ebs-io1' + fi + + query_data_directory="${SUITE}/$SERIAL/${RELEASE_TYPE}/ec2-query-data/${debarch}/hvm/ebs/${ebs_storage_type}" + mkdir -p "${query_data_directory}" + + debug 1 "Running cloud-image-manager register_image_from_snapshot ..." + ${VENV_BIN}/cloud-image-manager \ + --debug-log debug.log \ + --log-to-console \ + aws \ + --profile alan \ + register_image_from_snapshot \ + "${SUITE}" \ + "${SERIAL}" \ + "${RELEASE_TYPE}" \ + --arch=${debarch} \ + --virt="hvm" \ + --snapshot_id=${SNAPSHOT_ID} \ + --ebs_storage_type=${ebs_storage_type} \ + --region ${region} \ + --query-data-directory=${query_data_directory} \ + --public \ + --no-debug + + # read the img_id from the generated query data + read junk junk junk junk junk junk junk new_ami junk < ${query_data_directory}/${RELEASE_TYPE}.txt + + echo "${new_ami}" > "${register_info}" +else + debug 1 "registering: register ${args[*]}" + retry 15 30 xc2 ximages register "${args[@]}" > "${register_info}" && new_ami=$(awk '-F\t' 'END{print $2}' < "${register_info}") && [ -n "${new_ami}" ] && SNAPSHOT_ID="" || fail "failed to register: xc2 register ${args[*]}" +fi debug 1 "published ${register_name} as ${new_ami}" echo "${new_ami}" === modified file 'publish-build' --- publish-build 2016-05-19 09:58:10 +0000 +++ publish-build 2017-06-14 10:44:18 +0000 @@ -347,6 +347,11 @@ [ -e "${img_f}" ] || fail "unable to find ${img_f}" + export SERIAL=${serial} + export LOCAL_IMG_HVM_FILE=${img_hvm} + export SUITE=${suite} + export RELEASE_TYPE=${flabel} + # Publish HVM instance store AMI's pubname="ubuntu-${suite}-${flabel}-${arch}-${bd_name}-${serial}" output="${TMPD}/publish-hvm-image-${arch}.txt" === modified file 'publish-build-ebs' --- publish-build-ebs 2016-02-23 21:11:35 +0000 +++ publish-build-ebs 2017-07-04 16:39:31 +0000 @@ -616,6 +616,7 @@ "${iid}" "${arch}" "${url}" "${pubname}" > "${TMPD}/$region.cur.img" & wait $! || fail "failed ec2-image2ebs ${iid} ${arch} ${etype} ${url} ${pubname}" + read img_id junk < "${TMPD}/$region.cur.img" write_buildinfo "${top_tmpd}/$region.output" \ "${region}" "${img_id}" "${arch}" "${etype}" "${pubname}" || === modified file 'publish-hvm-image' --- publish-hvm-image 2016-02-23 21:11:35 +0000 +++ publish-hvm-image 2017-06-27 18:14:05 +0000 @@ -399,13 +399,6 @@ ln -sf "${image}" "${RENAME_D}/${rename}" || fail "symlink failed: working-dir/rename/${rename} -> ${image_full}" - bundle_cmd="bundle-image" - bundle_args=( "--image" "${rename_full}" ) - - run "${wdir}" "bundle.once" "bundling hvm-image ${image}" \ - xc2 "${bundle_cmd}" --destination "${wdir}" --arch "${arch}" \ - "${bundle_args[@]}" || - fail "failed to bundle hvm image" fi manifest="${rename##*/}.manifest.xml" @@ -428,55 +421,55 @@ bucketpath="${bucket}${path_prefix:+/${path_prefix%/}}" ( # start a subshell so we can run each region parallel - if [ -z "$mf_bucket" ]; then - debug 2 xc2 upload-bundle --bucket "${bucketpath}" \ - --manifest "${wdir}/${manifest}" --retry - retry 20 1m \ - run "${wdir}" "upload.${region}" \ - "upload ${bucket}/${manifest_path} to ($region)" \ - xc2 upload-bundle --bucket "${bucketpath}" \ - --manifest "${wdir}/${manifest}" --retry || { - error "failed to upload bundle to ${bucket}/${manifest_path}"; - exit 1; - } - else - debug 2 xc2 migrate-image --bucket "${mf_bucket}" \ - --manifest "${manifest_path}" \ - --destination-bucket "${bucket}" \ - --region "${region}" || - retry 20 1m \ - run "${wdir}" "migrate.${region}" \ - "migrating HVM image ${manifest_path} (${mf_bucket}=>${region})" \ - xc2 migrate-image --bucket "${mf_bucket}" \ - --manifest "${manifest_path}" \ - --destination-bucket "${bucket}" \ - --region "${region}" || - { error "failed to migrate to ${region}"; exit 1; } - fi junk="" img_id="" sriov_args=""; [ "${sriov:-0}" -eq 1 ] && sriov_args="--sriov=simple"; - run "${wdir}" "register.${region}" "register ${bucket}/${manifest_path}" \ - xc2 register --region "${region}" \ - --architecture "${arch}" --virtualization-type=hvm \ - "${bucket}/${manifest_path}" \ - "${register_name[@]}" "${sriov_args}" && \ - read junk img_id < "${wdir}/register.${region}.stdout" && - [[ "${img_id}" =~ "ami-" ]] || { - debug 1 $(<"${wdir}/register.${region}.stdout"); - errorp "failed to register ${bucket}/${manifest_path}.%s\n" \ - "${junk:+ output:${junk} ${img_id}}"; - exit 1; - } + + query_data_directory="${SUITE}/$SERIAL/${RELEASE_TYPE}/ec2-query-data/amd64/hvm/instance-store/" + mkdir -p "${query_data_directory}" + + # As we are registering an image of virtualization type hvm + # we will use cloud-image-manager to register the image and set AMI + # attributes during registration that can not be set using the old way + # to register images. + echo "Running cloud-image-manager register_image ..." + ${VENV_BIN}/cloud-image-manager \ + --debug-log debug.log \ + --log-to-console \ + aws \ + --profile alan \ + register_image \ + "${SUITE}" \ + "${SERIAL}" \ + "${RELEASE_TYPE}" \ + --arch=${debarch} \ + --storage_family="instance-store" \ + --virt="hvm" \ + --local_file=${rename_full} \ + --restrict_to_region ${region} \ + --query-data-directory=${query_data_directory} \ + --public + + echo "cloud-image-manager register_image query data output ..." + ls -al ${query_data_directory} + cat ${query_data_directory}/${RELEASE_TYPE}.txt + + # read the img_id from the generated query data + read junk junk junk junk junk junk junk img_id junk < ${query_data_directory}${RELEASE_TYPE}.txt + + echo "${img_id}" > "${wdir}/register.${region}.stdout" + debug 1 "registered at ${region}: ${bucket}/${manifest_path} as ${img_id}" ) & + set -x + PUBLISHES[$i]=$! done for i in "${to_publish[@]}"; do region=${regions[$i]} wait "${PUBLISHES[$i]}" || fail "failed to publish to ${regions[$i]}" - read junk img_id < "$wdir/register.$region.stdout" + read img_id < "$wdir/register.$region.stdout" registered_ids[$i]=$img_id done fi @@ -493,17 +486,4 @@ fi done -# now add acls for everything -for((i=0;i<${#registered_ids[@]};i++)); do - img_id=${registered_ids[$i]} - region=${reg_regions[$i]} - for user in ${add_acl}; do - run "${wdir}" "add_user.${region}.${user}" \ - "add ${user} to ${manifest} in ${region}" \ - xc2 modify-image-attribute --region "${region}" \ - --launch-permission --add "${user}" "${img_id}" || - fail "failed to add launch permission for ${user} to ${img_id}" - done -done - exit 0 ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions. + echo '' + echo '====== live-build [/tmp/live-build] ======' ====== live-build [/tmp/live-build] ====== + cd /tmp/live-build + bzr info Standalone tree (format: 1.9-rich-root) Location: branch root: . Related branches: parent branch: http://bazaar.launchpad.net/~ubuntu-on-ec2/live-build/cloud-images/ + bzr version-info revision-id: ben.howard@canonical.com-20150612123735-zf4q8vxmjb7vaq7w date: 2015-06-12 06:37:35 -0600 build-date: 2017-07-27 21:36:04 +0000 revno: 1884 branch-nick: live-build + bzr log -p -r-1 ------------------------------------------------------------ revno: 1884 committer: Ben Howard branch nick: live-build timestamp: Fri 2015-06-12 06:37:35 -0600 message: Drop kernel from ubuntu-cloud-t-hwe package list; use live build cli to configure diff: === modified file 'package-lists/ubuntu-cloud-t-hwe' --- package-lists/ubuntu-cloud-t-hwe 2015-06-11 22:55:21 +0000 +++ package-lists/ubuntu-cloud-t-hwe 2015-06-12 12:37:35 +0000 @@ -6,4 +6,4 @@ standard^ cloud-image^ # Packages -linux-image-virtual-lts-vivid landscape-client ubuntu-minimal +landscape-client ubuntu-minimal + echo '' + echo '====== vmbuilder-0.11 [/tmp/vmbuilder-0.11] ======' ====== vmbuilder-0.11 [/tmp/vmbuilder-0.11] ====== + cd /tmp/vmbuilder-0.11 + bzr info Standalone tree (format: 2a) Location: branch root: . Related branches: parent branch: http://bazaar.launchpad.net/~ubuntu-on-ec2/vmbuilder/0.11a/ + bzr version-info revision-id: ben.howard@canonical.com-20120605221454-crv9cc4612f907lh date: 2012-06-05 16:14:54 -0600 build-date: 2017-07-27 21:36:04 +0000 revno: 398 branch-nick: vmbuilder-0.11 + bzr log -p -r-1 ------------------------------------------------------------ revno: 398 committer: Ben Howard branch nick: vmbuilder timestamp: Tue 2012-06-05 16:14:54 -0600 message: Fix for allow vmbuilder to run on 12.04 LTS. diff: === modified file 'VMBuilder/plugins/ubuntu/dapper.py' --- VMBuilder/plugins/ubuntu/dapper.py 2011-05-18 20:49:25 +0000 +++ VMBuilder/plugins/ubuntu/dapper.py 2012-06-05 22:14:54 +0000 @@ -157,18 +157,15 @@ self.vm.addpkg += ['openssh-server'] def mount_dev_proc(self): - run_cmd('mount', '--bind', '/dev', '%s/dev' % self.destdir) - self.vm.add_clean_cmd('umount', '%s/dev' % self.destdir, ignore_fail=True) - - run_cmd('mount', '--bind', '/dev/pts', '%s/dev/pts' % self.destdir) + run_cmd('mkdir', '-p', '%s/dev/pts' % self.destdir) + run_cmd('mount', '-t', 'devpts', 'devpts-live', '%s/dev/pts' % self.destdir) self.vm.add_clean_cmd('umount', '%s/dev/pts' % self.destdir, ignore_fail=True) - self.run_in_target('mount', '-t', 'proc', 'proc', '/proc') + run_cmd('mount', '-t', 'proc', 'proc-live', '%s/proc' % self.destdir) self.vm.add_clean_cmd('umount', '%s/proc' % self.destdir, ignore_fail=True) def unmount_dev_proc(self): run_cmd('umount', '%s/dev/pts' % self.destdir) - run_cmd('umount', '%s/dev' % self.destdir) run_cmd('sh', '-c', 'grep -q "$1" /proc/mounts || exit 0; umount "$1"', 'umount_binfmt', "%s/proc/sys/fs/binfmt_misc" % self.destdir) run_cmd('umount', '%s/proc' % self.destdir) + echo ''