virtualization script sends wrong parameters to qemu-system-x86_64 (space before hostfwd)

Bug #1250568 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Critical
Daniel Manrique

Bug Description

Narinder was testing a server at HP and the KVM test is failing with a strange ioctl message in the results:

Here is the log:
Executing KVM Test
DEBUG:root:Starting KVM Test
DEBUG:root:Creating cloud user-data
DEBUG:root:Creating cloud meta-data
I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 331
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
183 extents written (0 MB)
DEBUG:root:Attempting boot for:/home/ubuntu/precise-server-cloudimg-i386-disk1.img
DEBUG:root:Attaching Cloud config disk
DEBUG:root:Using params:qemu-system-x86_64 -machine accel=kvm:tcg -m 256 -net nic -net user,net=10.0.0.0/8,host=10.0.0.1, hostfwd=tcp::2222-:22-drive file=/home/ubuntu/precise-server-cloudimg-i386-disk1.img,if=virtio -drive file=seed.iso,if=virtio -display none -nographic
reset: standard error: Inappropriate ioctl for device

KVM instance failed to boot

Related branches

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hey, the ioctl message can be safely ignored. It's just qemu-system-x86_64 trying to send a reset/clear ioctl to the terminal, without realizing there's no terminal (we're piping stdout to a file to get the log). It's not the cause for the failure.

Actually, look at the command:

DEBUG:root:Using params:qemu-system-x86_64 -machine accel=kvm:tcg -m 256 -net nic -net user,net=10.0.0.0/8,host=10.0.0.1, hostfwd=tcp::2222-:22-drive file=/home/ubuntu/precise-server-cloudimg-i386-disk1.img,if=virtio -drive file=seed.iso,if=virtio -display none -nographic

See the space right before "hostfwd", that's what's causing the failure. This bug was introduced in checkbox rev 2402 but fixed in rev 2413 about 6 weeks ago.

How is Narinder installing checkbox? could we ask him to update to a newer version and try again?

I'd say this bug is Fix Released but let's wait until we know more from Narinder, setting to Incomplete in the meanwhile.

Changed in checkbox:
status: New → Incomplete
Revision history for this message
Narinder Gupta (narindergupta) wrote :

I am installing the checkbox from public PPA. If you can point me the fix then i can try it locally and verify.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Narinder,

I just checked and the bug is still present in trunk. I'll fix it.

IN the meanwhile, you can edit /usr/share/checkbox/scripts/virtualization and edit line 125 to remove the space before hostfwd.

before:
                -net user,net={1},host={2}, hostfwd={3}

After:
                -net user,net={1},host={2},hostfwd={3}

summary: - KVM test fails on a server with a weird ioctl message
+ virtualization script sends wrong parameters to qemu-system-x86_64
+ (space before hostfwd)
Changed in checkbox:
status: Incomplete → In Progress
assignee: nobody → Daniel Manrique (roadmr)
importance: Undecided → Critical
Daniel Manrique (roadmr)
Changed in checkbox:
milestone: none → 2013-nov-22
Revision history for this message
Narinder Gupta (narindergupta) wrote : Re: [Bug 1250568] Re: KVM test fails on a server with a weird ioctl message
Download full text (3.6 KiB)

still failed here are the details:

<comment>Executing KVM Test
DEBUG:root:Starting KVM Test
DEBUG:root:Creating cloud user-data
DEBUG:root:Creating cloud meta-data
I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 331
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
183 extents written (0 MB)
DEBUG:root:Attempting boot
for:/home/ubuntu/precise-server-cloudimg-i386-disk1.img
DEBUG:root:Attaching Cloud config disk
DEBUG:root:Using params:qemu-system-x86_64 -machine accel=kvm:tcg -m 256
-net nic -net user,net=10.0.0.0/8,host=10.0.0.1,hostfwd=tcp::2222-:22-drivefile=/home/ubuntu/precise-server-cloudimg-i386-disk1.img,if=virtio
-drive
file=seed.iso,if=virtio -display none -nographic
reset: standard error: Inappropriate ioctl for device

KVM instance failed to boot

Thanks and Regards,
Narinder Gupta (PMP) <email address hidden>
Canonical, Ltd. narindergupta [irc.freenode.net]
+1.281.736.5150 narindergupta2007[skype]

Ubuntu- Linux for human beings | www.ubuntu.com | www.canonical.com

On Tue, Nov 12, 2013 at 12:59 PM, Daniel Manrique <
<email address hidden>> wrote:

> Hi Narinder,
>
> I just checked and the bug is still present in trunk. I'll fix it.
>
> IN the meanwhile, you can edit
> /usr/share/checkbox/scripts/virtualization and edit line 125 to remove
> the space before hostfwd.
>
> before:
> -net user,net={1},host={2}, hostfwd={3}
>
> After:
> -net user,net={1},host={2},hostfwd={3}
>
>
>
>
> ** Summary changed:
>
> - KVM test fails on a server with a weird ioctl message
> + virtualization script sends wrong parameters to qemu-system-x86_64
> (space before hostfwd)
>
> ** Changed in: checkbox
> Status: Incomplete => In Progress
>
> ** Changed in: checkbox
> Assignee: (unassigned) => Daniel Manrique (roadmr)
>
> ** Changed in: checkbox
> Importance: Undecided => Critical
>
> ** Branch linked: lp:~roadmr/checkbox/1250568-hostfwd-space
>
> ** Changed in: checkbox
> Milestone: None => 2013-nov-22
>
> --
> You received this bug notification because you are subscribed to
> checkbox.
> https://bugs.launchpad.net/bugs/1250568
>
> Title:
> virtualization script sends wrong parameters to qemu-system-x86_64
> (space before hostfwd)
>
> Status in Checkbox System Testing:
> In Progress
>
> Bug description:
> Narinder was testing a server at HP and the KVM test is failing with a
> strange ioctl message in the results:
>
> Here is the log:
> Executing KVM Test
> DEBUG:root:Starting KVM Test
> DEBUG:root:Creating cloud user-data
> DEBUG:root:Creating cloud meta-data
> I: -input-charset not specified, using utf-8 (detected in locale
> settings)
> Total translation table size: 0
> Total rockridge attributes bytes: 331
> Total directory bytes: 0
> Path table size(bytes): 10
> Max brk space used 0
> 183 extents written (0 MB)
> DEBUG:root:Attempting boot
> for:/home/ubuntu/precise-server-cloudimg-i386-disk1.img
> DEBUG:root:Attaching Cloud config disk
> DEBUG:root:Using params:qe...

Read more...

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Narinder,

Have another look at the command (on the one you posted), a space is needed before "-drivefile". Could you modify the script again, and add a space at the end of line 125? (trying to see if that will help). It will be "trailing whitespace" so it will look a bit ugly but it should work.

Revision history for this message
Narinder Gupta (narindergupta) wrote : Re: [Bug 1250568] Re: virtualization script sends wrong parameters to qemu-system-x86_64 (space before hostfwd)
Download full text (3.3 KiB)

this time got passed.

<question name="virtualization/kvm_check_vm">
<answer type="multiple_choice">pass</answer>
<answer_choices>
<value type="str">fail</value>
<value type="str">pass</value>
<value type="str">uninitiated</value>
<value type="str">unresolved</value>
<value type="str">unsupported</value>
<value type="str">untested</value>
</answer_choices>
<comment>Executing KVM Test
DEBUG:root:Starting KVM Test
DEBUG:root:Creating cloud user-data
DEBUG:root:Creating cloud meta-data
I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 331
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
183 extents written (0 MB)
DEBUG:root:Attempting boot
for:/home/ubuntu/precise-server-cloudimg-i386-disk1.img
DEBUG:root:Attaching Cloud config disk
DEBUG:root:Using params:qemu-system-x86_64 -machine accel=kvm:tcg -m 256
-net nic -net user,net=10.0.0.0/8,host=10.0.0.1,hostfwd=tcp::2222-:22-drive
file=/home/ubuntu/precise-server-cloudimg-i386-disk1.img,if=virtio
-drive file=seed.iso,if=virtio -display none -nographic
reset: standard error: Inappropriate ioctl for device

Booted successfully
</comment>

Thanks and Regards,
Narinder Gupta (PMP) <email address hidden>
Canonical, Ltd. narindergupta [irc.freenode.net]
+1.281.736.5150 narindergupta2007[skype]

Ubuntu- Linux for human beings | www.ubuntu.com | www.canonical.com

On Tue, Nov 12, 2013 at 2:33 PM, Daniel Manrique <
<email address hidden>> wrote:

> Hi Narinder,
>
> Have another look at the command (on the one you posted), a space is
> needed before "-drivefile". Could you modify the script again, and add a
> space at the end of line 125? (trying to see if that will help). It will
> be "trailing whitespace" so it will look a bit ugly but it should work.
>
> --
> You received this bug notification because you are subscribed to
> checkbox.
> https://bugs.launchpad.net/bugs/1250568
>
> Title:
> virtualization script sends wrong parameters to qemu-system-x86_64
> (space before hostfwd)
>
> Status in Checkbox System Testing:
> In Progress
>
> Bug description:
> Narinder was testing a server at HP and the KVM test is failing with a
> strange ioctl message in the results:
>
> Here is the log:
> Executing KVM Test
> DEBUG:root:Starting KVM Test
> DEBUG:root:Creating cloud user-data
> DEBUG:root:Creating cloud meta-data
> I: -input-charset not specified, using utf-8 (detected in locale
> settings)
> Total translation table size: 0
> Total rockridge attributes bytes: 331
> Total directory bytes: 0
> Path table size(bytes): 10
> Max brk space used 0
> 183 extents written (0 MB)
> DEBUG:root:Attempting boot
> for:/home/ubuntu/precise-server-cloudimg-i386-disk1.img
> DEBUG:root:Attaching Cloud config disk
> DEBUG:root:Using params:qemu-system-x86_64 -machine accel=kvm:tcg -m 256
> -net nic -net user,net=10.0.0.0/8,host=10.0.0.1,
> hostfwd=tcp::2222-:22-drive
> file=/home/ubuntu/precise-server-cloudimg-i386-disk1.img,if=virtio -drive
> file=seed.iso,if=virtio -display none -nographic
> r...

Read more...

Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks Narinder!

A merge request with the fixes you helped verify is now proposed. I expect it will be released on November 22nd once it gets through the checkbox verification and release process.

Jeff Lane  (bladernr)
Changed in checkbox:
status: In Progress → Fix Committed
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.