[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] Custom SM Plugin Error


  • To: <xen-api@xxxxxxxxxxxxx>
  • From: Germano Percossi <germano.percossi@xxxxxxxxxx>
  • Date: Mon, 22 Feb 2016 10:22:56 +0000
  • Delivery-date: Mon, 22 Feb 2016 10:23:13 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

Hi Patrick,

Is your code available somewhere so I can have a look?

Germano

On 02/19/2016 08:24 PM, Patrick Wombacher wrote:
I can verify that it does contain "#!/usr/bin/env python" as the first line. I 
started this project by heavily modifying DummySR.py, so it came over with that, and I 
see it in the top of my file. I was not using any special version of python, since I 
wanted to be able to just drop this into XenServer with any other major changes.

-Patrick

-----Original Message-----
From: Bob Ball [mailto:bob.ball@xxxxxxxxxx]
Sent: Friday, February 19, 2016 10:54 AM
To: Patrick Wombacher; xen-api@xxxxxxxxxxxxx
Subject: RE: [Xen-API] Custom SM Plugin Error

Hi Patrick,

As a quick thought, check that the executable at the top of your SR exists.  User 
space was upgraded quite significantly from 6.5 -> 6.6, including the version 
of Python.

Normally you should use "#!/usr/bin/env python" (which is what most of the SRs 
we provide use, including EXTSR) but if you referred to a specific python version it 
would have worked for several XenServer versions up until 6.6 at which point it's 
possible that it's referring to a file that doesn't exist which could return the error 
that it's not executable.

Bob

-----Original Message-----
From: xen-api-bounces@xxxxxxxxxxxxx [mailto:xen-api-bounces@xxxxxxxxxxxxx] On 
Behalf Of Patrick Wombacher
Sent: 19 February 2016 16:40
To: xen-api@xxxxxxxxxxxxx
Subject: Re: [Xen-API] Custom SM Plugin Error

Looks like I had myself set to digest only. Sorry about any formatting errors, 
or if this doesn't get attached to the same thread.

I went back and double checked my SR name, and I mistyped the name in my 
original email. I did actually name it CEPHSR.py, and created a CEPHSR symlink 
as was required in 6.5. In fact, I just did a test where I copied the contents 
of EXTSR.py in a file named CEPHCEPHSR.py (with symlink, chmod a+x, added to 
whitelist) and it seems to be working now. I did change 2 things in this clone 
of ext. The first was to change the DRIVER_INFO['name'] to be 'CephSR' so that 
I could tell the difference if I needed to poke at it, and the other was in 
EXTSR.handles() so that it returned 'cephceph' instead of 'ext'. I'm getting a 
bit closer. I suppose I'll just have to slowly recreate my plugin one function 
at a time?

-Patrick

----------------------------------------------------------------------

Date: Thu, 18 Feb 2016 17:02:48 +0000
From: Germano Percossi <germano.percossi@xxxxxxxxxx>
To: <xen-api@xxxxxxxxxxxxx>
Subject: Re: [Xen-API] Custom SM Plugin Error
Message-ID: <56C5F938.8010300@xxxxxxxxxx>
Content-Type: text/plain; charset="windows-1252"; format=flowed

Hi Patrick, have you always used this name for your SR?
Not sure what has changed in xapi for 6.6 (apart from the whitelist mechanism) but in 
6.5 to have a recognized SR you need to have something named <anything>SR.

I would expect something like a symlink named CEPHSR linked to your CEPHSR.py.

Germano

On 02/18/2016 04:48 PM, Patrick Wombacher wrote:
I have been developing a custom SR using Ceph as a backend for a while
now. I had some decent success with XenServer 6.5, and I could load a
couple VMs using the rbd kernel module. I have been trying to get it
to work on 6.6 in hopes that I can move from kernel space into user space.
I have run into a few issues, and currently cannot even get XenServer
to recognize the new SR type, let alone attempt to use it. I found
that there is now a whitelist of plugins, and have edited line 154 of
/etc/xapi.conf to include my new SR type in the whitelist. However,
when I restart xapi my SR type is not listed among available SR types.
I checked /var/log/xensource.log and I see a strange error:

Feb 18 10:34:20 xenbeta xapi: [error|xenbeta|0 |Registering SMAPIv1
plugins D:030605a866ff|sm_exec] Rejecting SM plugin: CEPH because of
exception: Storage_interface.Backend_error(_) (executable)

Normally this would seem pretty clear, except that I?ve already used
?chmod a+x /opt/xensource/sm/CEPH.py? on my plugin. I know my plugin
is executable. What could be causing this error? And is there
documentation for creating adding new plugins in Dundee?

-Patrick

----------------------------------------------------------------------
-- This email message is for the sole use of the intended recipient(s)
and may contain confidential information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply email and
destroy all copies of the original message.
----------------------------------------------------------------------
--


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.