Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 937796 Details for
Bug 1108455
[RFE] Task for direct URL image based provisioning of guest recipes
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
a diff file for run-test.sh between orginal virt-install task and new cloud-init task
diff.txt (text/plain), 8.38 KB, created by
matt jia
on 2014-09-16 05:55:31 UTC
(
hide
)
Description:
a diff file for run-test.sh between orginal virt-install task and new cloud-init task
Filename:
MIME Type:
Creator:
matt jia
Created:
2014-09-16 05:55:31 UTC
Size:
8.38 KB
patch
obsolete
>--- beaker-core-tasks/virt/install/runtest.sh 2014-09-12 11:51:30.414402321 +1000 >+++ beaker-cloud-init/cloud-init/install/runtest.sh 2014-09-12 16:31:09.749770096 +1000 >@@ -179,67 +179,24 @@ > return 0 > } > >-function fallocate_files () >+function resize_files () > { >- local cmdline="$*" >- local file_size="" >- local file_path="" >+ local file_path="$1" >+ local file_size=10 #hardcode 10G for now > >- if command -v fallocate > /dev/null; then >- echo "Have fallocate" >+ if command -v qemu-img > /dev/null; then >+ echo "Have qemu-img" > else >- echo "Doesn't have fallocate" >+ echo "Doesn't have qemu-img" > return > fi > >- # --lvm format doesn't need fallocate >- echo $cmdline | grep -- "--lvm" > /dev/null >- if [ $? -eq 0 ]; then >- return >- fi >- >- # --part format doesn't need fallocate >- echo $cmdline | grep -- "--part" > /dev/null >- if [ $? -eq 0 ]; then >- return >- fi >- >- # --disk format >- echo $cmdline | grep -- "--disk" > /dev/null >- if [ $? -eq 0 ]; then >- echo $cmdline | grep -o -- "--disk[= ]\S\+" > disks >- while read line; do >- file_path=`echo $line | grep -o "path=[^, ]\+" | sed 's/path=//'` >- file_size=`echo $line | grep -o "size=[^, ]\+" | sed 's/size=//'` >- if [ -n "$file_size" -a -n "$file_path" ]; then >- echo "fallocate -l${file_size}G $file_path" >- fallocate -l${file_size}G $file_path >- if [ $? -ne 0 ]; then >- echo "fallocate failed, removing file: $file_path" >- rm -f $file_path >- fi >- fi >- done < disks >- # -s/--file-size and -f and --file format >- else >- file_size=`echo $cmdline | grep -o -- "-s [0-9]\+" | awk '{print $2}'` >- if [ -z "$file_size" ]; then >- file_size=`echo $cmdline | grep -o -- "--file-size[= ][0-9]\+" | sed 's/--file-size[= ]//'` >- fi >- >- if [ -n "$file_size" ]; then >- file_path=`echo $cmdline | grep -o -- "-f \S\+" | awk '{print $2}'` >- if [ -z "$file_path" ]; then >- file_path=`echo $cmdline | grep -o -- "--file[= ]\S\+" | sed 's/--file[= ]//'` >- fi >- fi >- if [ -n "$file_size" -a -n "$file_path" ]; then >- echo "fallocate -l${file_size}G $file_path" >- fallocate -l${file_size}G $file_path >- if [ $? -ne 0 ]; then >- echo "fallocate failed, removing file: $file_path" >- rm -f $file_path >- fi >+ if [ -n "$file_path" ]; then >+ echo "qemu-img resize $file_path +${file_size}G" >+ qemu-img resize $file_path +${file_size}G >+ if [ $? -ne 0 ]; then >+ echo "resize failed, removing file: $file_path" >+ rm -f $file_path > fi > fi > } >@@ -921,7 +878,7 @@ > fi > i=0 > fail=0 >- >+setupconsolelogs > ./get_guest_info.py > ./tmp.guests > echo "Guests info:" | tee -a $OUTPUTFILE > cat ./tmp.guests | tee -a $OUTPUTFILE >@@ -991,10 +948,37 @@ > exit 1 > fi > >+ # get cloud image and default image formate is raw >+ image_format='raw' >+ if [[ ${CLOUD_IMAGE} =~ qcow2$ ]] ; then >+ image_format='qcow2' >+ fi >+ >+ if ! wget -q ${CLOUD_IMAGE} -O $(pwd)/guests/${guest_name}/${guest_name}.${image_format} ; then >+ echo "Can't reach ${CLOUD_IMAGE} , exiting" >+ report_result ${TEST}_cloud_image_unreachable FAIL 100 >+ exit 1 >+ fi >+ >+ echo "Resizing VM files: `date`" | tee -a $OUTPUTFILE >+ resize_files $(pwd)/guests/${guest_name}/${guest_name}.${image_format} >> $OUTPUTFILE 2>&1 >+ echo "Resizing VM files done: `date`" | tee -a $OUTPUTFILE >+ > if [ -n "$*" ]; then > guest_args=$* > fi > >+ # generate user-data, meta-data and iso >+ ./get_user_data.py -k ${guest_name}.ks > $(pwd)/guests/${guest_name}/user-data >+ echo "Cloud user data:" | tee -a $OUTPUTFILE >+ cat $(pwd)/guests/${guest_name}/user-data | tee -a $OUTPUTFILE >+ echo "instance-id: ${guest_name}" > $(pwd)/guests/${guest_name}/meta-data >+ if ! genisoimage -quiet -output $(pwd)/guests/${guest_name}/${guest_name}-cidata.iso -volid cidata -joliet -rock $(pwd)/guests/${guest_name}/user-data $(pwd)/guests/${guest_name}/meta-data ; then >+ echo "Can't generate iso image for ${guest_name} , exiting" >+ report_result ${TEST}_genisoimage_issue FAIL 100 >+ exit 1 >+ fi >+ > # decide where to put the guest's image based on availability > home_basedir=0 > var_lib_df=$(df /var/lib) >@@ -1008,36 +992,40 @@ > > #bridge=$(ip route list | awk '/^default / { print $NF }' | sed 's/^[^0-9]*//') > #CMDLINE="-b xenbr${bridge} -n ${guestname} -f ${IMAGE} $args" >- CMDLINE="--name ${guest_name} --mac ${guest_mac} --location ${guest_loc} $guest_args --debug" >- if [[ ${kvm_num} > 0 ]]; then >- if grep -q console=ttyS1 ./${guest_name}.ks; then >- CMDLINE="${CMDLINE} --extra-args \"ks=$guest_ks serial\"" >- else >- CMDLINE="${CMDLINE} --extra-args \"ks=$guest_ks serial console=tty0 console=ttyS0,115200\"" >- fi >- else >+ #A command is used for starting cloud-images with virt-install >+ #virt-install --import --name $NAME --ram 512 --vcpus 2 --disk $NAME.raw --disk $NAME-cidata.iso,device=cdrom --network bridge=virbr0 >+ CMDLINE="--import --name ${guest_name} --mac ${guest_mac} $guest_args --debug" >+ CMDLINE="${CMDLINE} --disk $(pwd)/guests/${guest_name}/${guest_name}.${image_format},format=${image_format} --disk $(pwd)/guests/${guest_name}/${guest_name}-cidata.iso,device=cdrom" >+ # --extra-args is only used in the installer >+ #if [[ ${kvm_num} > 0 ]]; then >+ # if grep -q console=ttyS1 ./${guest_name}.ks; then >+ # CMDLINE="${CMDLINE} --extra-args \"ks=$guest_ks serial\"" >+ # else >+ # CMDLINE="${CMDLINE} --extra-args \"ks=$guest_ks serial console=tty0 console=ttyS0,115200\"" >+ # fi >+ #else > ## the first 2 conditions are for fedora releases since they too can support xen guests. >- if grep -q -i fedora /etc/fedora-release; then >- if grep -q console=ttyS1 ./${guest_name}.ks; then >- CMDLINE="${CMDLINE} --extra-args \"ks=$guest_ks serial\" --serial file,path=$(pwd)/guests/${guest_name}/logs/${guest_name}_console.log --serial pty --console pty " >- CMDLINE="${CMDLINE} --nographics" >- else >- CMDLINE="$CMDLINE --serial file,path=$(pwd)/guests/${guest_name}/logs/${guest_name}_console.log --extra-args \"ks=$guest_ks serial console=tty0 console=ttyS0,115200\"" >- CMDLINE="${CMDLINE} --nographics" >- fi >- else >- CMDLINE="${CMDLINE} --extra-args ks=$guest_ks" >- fi >- >- fi >- if [[ ${promptreq} == 1 ]]; then >- CMDLINE="${CMDLINE} --prompt" >- # newer libvirt also doesn't ask for vnc or nographics, it defaults >- # to whatever is available >- if echo ${CMDLINE} | egrep -q " --paravirt|^--paravirt| -p |^-p|-p$"; then >- CMDLINE="${CMDLINE} --nographics" >- fi >- fi >+ # if grep -q -i fedora /etc/fedora-release; then >+ # if grep -q console=ttyS1 ./${guest_name}.ks; then >+ # CMDLINE="${CMDLINE} --extra-args \"ks=$guest_ks serial\" --serial file,path=$(pwd)/guests/${guest_name}/logs/${guest_name}_console.log --serial pty --console pty " >+ # CMDLINE="${CMDLINE} --nographics" >+ # else >+ # CMDLINE="$CMDLINE --serial file,path=$(pwd)/guests/${guest_name}/logs/${guest_name}_console.log --extra-args \"ks=$guest_ks serial console=tty0 console=ttyS0,115200\"" >+ # CMDLINE="${CMDLINE} --nographics" >+ # fi >+ # else >+ # CMDLINE="${CMDLINE} --extra-args ks=$guest_ks" >+ # fi >+ >+ #fi >+ #if [[ ${promptreq} == 1 ]]; then >+ # CMDLINE="${CMDLINE} --prompt" >+ # # newer libvirt also doesn't ask for vnc or nographics, it defaults >+ # # to whatever is available >+ # if echo ${CMDLINE} | egrep -q " --paravirt|^--paravirt| -p |^-p|-p$"; then >+ # CMDLINE="${CMDLINE} --nographics" >+ # fi >+ #fi > > # kvm guest should have --accelerate and --os-variant=virtio26 by default. > # --kvm switch shouldn't be passed on to virtinstall.exp >@@ -1126,10 +1114,6 @@ > fi > # end the workaround for BZ 729608 > >- echo "Fallocating VM files: `date`" | tee -a $OUTPUTFILE >- fallocate_files ${CMDLINE} >> $OUTPUTFILE 2>&1 >- echo "Fallocating VM files done: `date`" | tee -a $OUTPUTFILE >- > # Tell Beaker the guest recipe has started. > ./start_recipe.py $guest_recipeid >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1108455
: 937796 |
937797