Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11634 (closed)

Opened 11 years ago

Closed 9 years ago

Bug: infrequent "dummy permissions" failure in OmeroPy

Reported by: jamoore Owned by: cblackburn
Priority: critical Milestone: 5.1.0
Component: General Version: 4.4.9
Keywords: n.a. Cc: python-team@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

See: http://hudson.openmicroscopy.org.uk/job/OmeroPy-integration-stable/lastCompletedBuild/testReport/test.integration.test_pixelsService/TestPixelsService/testCreateImage/

Periodically (4% of the time) a failure is caused apparently by createSession(...,{"omero.group": "-1"}). But that's not actually being passed. Perhaps a "-1" is being left in the context. Log file attached:

Stacktrace

self = <test.integration.test_pixelsService.TestPixelsService object at 0x98491d0>
method = <bound method TestPixelsService.testCreateImage of <test.integration.test_pixelsService.TestPixelsService object at 0x98491d0>>

    def setup_method(self, method):
    
        self.OmeroPy = self.omeropydir()
    
        self.__clients = Clients()
    
        p = Ice.createProperties(sys.argv)
        rootpass = p.getProperty("omero.rootpass")
    
        name = None
        pasw = None
        if rootpass:
            self.root = omero.client() # ok because adds self
            self.__clients.add(self.root)
            self.root.setAgent("OMERO.py.root_test")
            self.root.createSession("root", rootpass)
            newuser = self.new_user()
            name = newuser.omeName.val
            pasw = "1"
        else:
            self.root = None
    
        self.client = omero.client() # ok because adds self
        self.__clients.add(self.client)
        self.client.setAgent("OMERO.py.test")
>       self.sf = self.client.createSession(name, pasw)

test/integration/library.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <omero.clients.BaseClient object at 0x98ba750>
username = '5fbd387a-4c76-45f5-ab36-8abb13d1ae1d', password = '1'

    def createSession(self, username=None, password=None):
        """
            Performs the actual logic of logging in, which is done via the
            getRouter(). Disallows an extant ServiceFactoryPrx, and
            tries to re-create a null Ice.Communicator. A null or empty
            username will throw an exception, but an empty password is allowed.
            """
        import omero
    
        self.__lock.acquire()
        try:
    
            # Checking state
    
            if self.__sf:
                raise omero.ClientError("Session already active. Create a new omero.client or closeSession()")
    
            if not self.__ic:
                if not self.__previous:
                    raise omero.ClientError("No previous data to recreate communicator.")
                self._initData(self.__previous)
                self.__previous = None
    
            # Check the required properties
    
            if not username:
                username = self.getProperty("omero.user")
            elif isinstance(username,omero.RString):
                username = username.val
    
            if not username or len(username) == 0:
                raise omero.ClientError("No username specified")
    
            if not password:
                password = self.getProperty("omero.pass")
            elif isinstance(password,omero.RString):
                password = password.val
    
            if not password:
                raise omero.ClientError("No password specified")
    
            # Acquire router and get the proxy
            prx = None
            retries = 0
            while retries < 3:
                reason = None
                if retries > 0:
                    self.__logger.warning(\
                    "%s - createSession retry: %s"% (reason, retries) )
                try:
                    ctx = dict(self.getImplicitContext().getContext())
                    ctx[omero.constants.AGENT] = self.__agent
                    rtr = self.getRouter(self.__ic)
>                   prx = rtr.createSession(username, password, ctx)

target/omero/clients.py:485: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = OMERO.Glacier2/router -t:ssl -h localhost -p 24064
userId = '5fbd387a-4c76-45f5-ab36-8abb13d1ae1d', password = '1'
_ctx = {'omero.agent': 'OMERO.py.test', 'omero.client.uuid': '62f29812-1e6e-49e4-8ab9-7efc37e66839'}

    def createSession(self, userId, password, _ctx=None):
>       return _M_Glacier2.Router._op_createSession.invoke(self, ((userId, password), _ctx))
    
    '''Create a per-client session with the router. If a
    SessionManager has been installed, a proxy to a Session
    object is returned to the client. Otherwise, null is returned
    and only an internal session (i.e., not visible to the client)
    is created.
    
    If a session proxy is returned, it must be configured to route
    through the router that created it. This will happen automatically
    if the router is configured as the client's default router at the
    time the session proxy is created in the client process, otherwise
    the client must configure the session proxy explicitly.
    
    Returns:
        A proxy for the newly created session, or null if no
    SessionManager has been installed.
    
    Arguments:
        userId The user id for which to check the password.
    
        password The password for the given user id.
    
    Exceptions:
        PermissionDeniedException Raised if the password for
    the given user id is not correct, or if the user is not allowed
    access.
    
        CannotCreateSessionException Raised if the session
E       CannotCreateSessionException: exception ::Glacier2::CannotCreateSessionException
E       {
E           reason = No valid permissions available! DUMMY permissions are not intended for copying. Make sure that you have not passed omero.group=-1 for a save without context
E       }

/usr/lib64/python2.6/site-packages/Ice/Glacier2_Router_ice.py:261: CannotCreateSessionException

Attachments (1)

valid-perm-bug-nov-2013.log.bz2 (571.8 KB) - added by jamoore 11 years ago.
4 minutes of log from Blitz-0.log on c6100-2. Note the failure before the import on at "2013-11-01 12:04:37,476 "

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by jamoore

4 minutes of log from Blitz-0.log on c6100-2. Note the failure before the import on at "2013-11-01 12:04:37,476 "

comment:1 Changed 11 years ago by cblackburn

This test has failed just once in 50 runs on Hudson so it may even rarer than 4%

comment:2 Changed 10 years ago by jamoore

  • Milestone changed from 5.0.0-beta2 to 5.0.0-beta3

Don't plan to actively work on this until we've more reliably reproduced. Pushing for the moment. Info welcome.

comment:3 Changed 9 years ago by jamoore

  • Owner set to cblackburn

Next steps here?

comment:4 Changed 9 years ago by cblackburn

I've not seen this appear recently. With the changes to fixtures from Sebastien I wonder if it is still relevant? Maybe just a case of pushing/closing this ticket and monitoring?

comment:5 Changed 9 years ago by jamoore

  • Resolution set to fixed
  • Status changed from new to closed

Agreed. Closing.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.65617 sec.)

We're Hiring!