Project

General

Profile

Bug #1524

xen xl dependency on perl not satisfied in default installation

Added by Gian-Paolo Musumeci over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
12/16/2012
Due date:
% Done:

100%

Estimated time:
Affected versions:
Security IDs:

Description

Creating a new virtual machine on a clean installation from the 2.5.0 Xen image results in the following when `xl create` runs:
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge online [22041] exited with error status 127
libxl: error: libxl_create.c:1096:domcreate_attach_pci: unable to add nic devices
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge offline [22093] exited with error status 127

Looking in /var/log/xen/xen-hotplug.log:
/etc/xen/scripts/locking.sh: line 60: perl: command not found
/etc/xen/scripts/locking.sh: line 60: perl: command not found

`apk add perl` fixes this problem, but this dependency should be satisfied at installation time.

Associated revisions

Revision 0b857e9d (diff)
Added by Natanael Copa about 6 years ago

main/xen: add perl as dep

Currently it will not start domU at all unless perl is there.

There are only few lines of perl that probably easily could be ported to
C or Lua or something, but until that happens we need perl :-(

fixes #1524

Revision 1cc40fad (diff)
Added by Natanael Copa almost 6 years ago

main/xen: add perl as dep

Currently it will not start domU at all unless perl is there.

There are only few lines of perl that probably easily could be ported to
C or Lua or something, but until that happens we need perl :-(

fixes #1524
(cherry picked from commit 0b857e9db3ddab86ea859bf9570982d7c1b6a38e)

History

#1 Updated by William Pitcock over 6 years ago

I would prefer to rewrite that script to not depend on perl.

#2 Updated by Natanael Copa about 6 years ago

I got bitten by this too.

the only thing that needs perl is this:

    while true; do
        eval "exec $_lockfd>>$_lockfile" 
        flock -x $_lockfd || return $?
        # We can't just stat /dev/stdin or /proc/self/fd/$_lockfd or
        # use bash's test -ef because those all go through what is
        # actually a synthetic symlink in /proc and we aren't
        # guaranteed that our stat(2) won't lose the race with an
        # rm(1) between reading the synthetic link and traversing the
        # file system to find the inum.  Perl is very fast so use that.
        rightfile=$( perl -e '
            open STDIN, "<&'$_lockfd'" or die $!;
            my $fd_inum = (stat STDIN)[1]; die $! unless defined $fd_inum;
            my $file_inum = (stat $ARGV[0])[1];
            print "y\n" if $fd_inum eq $file_inum;
                             ' "$_lockfile" )
        if [ x$rightfile = xy ]; then break; fi
    done

That snippet cost us 46MB...

I'd like to rewrite that so we get rid of perl dep.

#3 Updated by Natanael Copa about 6 years ago

  • Assignee set to William Pitcock
  • Target version set to Alpine 2.6.1

I'd like to fix this. Assigning it to the maintainer.

#4 Updated by Natanael Copa about 6 years ago

  • Target version changed from Alpine 2.6.1 to Alpine 2.6.0

Lets add perl for now.

#5 Updated by Natanael Copa about 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#6 Updated by Natanael Copa about 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF