SysFera / vishnu

Modular and high-level middleware for tasks, files and information management in heterogeneous and distributed HPC environments
http://sysfera.github.com/vishnu.html
Other
4 stars 12 forks source link

regression python : 'module' object has no attribute 'delete_ListSessions' (Bugzilla #437) #297

Closed bdepardo closed 11 years ago

bdepardo commented 11 years ago

critical bug in component TMS Reported in version 2.0.0 beta1 on platform Other

bdepardo commented 11 years ago

On 2012-10-08 10:58:09 +0200, 'Samuel Kortas (samuel.kortas@edf.fr) wrote: Created attachment 141 script de test

depuis la 2.0.0 beta, le module vishnu python ne se charge plus correctement

python ~/INSTALL/TEST/connect.py Traceback (most recent call last): File "/home/C70353/INSTALL/TEST/connect.py", line 13, in import VISHNU File "/home/C70353/local20/vishnu/2.0/lib/swig_output/VISHNU.py", line 200, in class ListSessions(EObject): File "/home/C70353/local20/vishnu/2.0/lib/swig_output/VISHNU.py", line 212, in ListSessions swig_destroy = _VISHNU.delete_ListSessions AttributeError: 'module' object has no attribute 'delete_ListSessions'

SK

bdepardo commented 11 years ago

On 2012-10-08 11:32:54 +0200, 'Kevin Coulomb (kevin.coulomb@sysfera.com) wrote: Salut Samuel,

Sur claui2q1 j'ai exécuté ton script sans problème après avoir fait vv 2.0. Ton erreur ressemble à une mauvaise configuration de la machine du client en question (problème de compilation ? ancienne lib python utilisée ?). Tu peux m'en dire plus sur la machine cliente ou tu as ce problème et sur comment tu as compilé ?

Kevin

bdepardo commented 11 years ago

On 2012-10-08 13:35:46 +0200, 'Samuel Kortas (samuel.kortas@edf.fr) wrote: Salut Kevin

Bien vu! j'avais des problème de compilation du client et j'ai enlevé la compilation de swig

tout est rentré dans l'ordre! je clos le bug

encore merci

SK

bdepardo commented 11 years ago

Attachment 141:


###########################################################################
# initialisations
###########################################################################

import time
a = time.gmtime()
timestamp = int(time.mktime(a))

# initializing Vishnu
import sys, traceback, os

import VISHNU
VISHNU_CONFIG_FILE = os.getenv("VISHNU_CONFIG_FILE")

VISHNU.vishnuInitialize(VISHNU_CONFIG_FILE)

import string

###########################################################################
# global variable
###########################################################################

# vishnu connection parameter
vishnu_user     = ""
vishnu_password = ""

###########################################################################
###########################################################################
# 
###########################################################################

def except_print():

    exc_type, exc_value, exc_traceback = sys.exc_info()

    print "!!!!!!!!!!!!!!!!!!!!!!!!!"
    print exc_type
    print exc_value

    print "!!!!!!!!!!!!!!!!!!!!!!!!!"
    traceback.print_exception(exc_type, exc_value, exc_traceback,
                              file=sys.stderr)

def displayLocalAccounts(LA):
   for a in LA:
      print "------------------------------"
      print "userId  :", a.getUserId()
      print "machine :", a.getMachineId()
      print "account :", a.getAcLogin()
      print "ssh key :", a.getSshKeyPath()
      print "Home    :", a.getHomeDirectory()

###########################################################################
# main course
###########################################################################

try :

    session_id = VISHNU.Session()

    VISHNU.connect(vishnu_user,vishnu_password,session_id)

    print "vishnu_connect OK!"

    session = session_id.getSessionKey()

    print "tentative de fermeture de  connection  "

    VISHNU.close(session)

    VISHNU.vishnuFinalize()

except VISHNU.UserException, e:
    print e.what()
    sys.exit(1)
except VISHNU.SystemException, e:
    print e.what()
    sys.exit(1)
except VISHNU.UMSVishnuException, e:
    print e.what()
    sys.exit(1)
except VISHNU.FMSVishnuException, e:
    print e.what()
    except_print()
    sys.exit(1)
except VISHNU.TMSVishnuException, e:
    print e.what()
    except_print()
    sys.exit(1)
except VISHNU.IMSVishnuException, e:
    print e.what()
    except_print()
    sys.exit(1)
except:
    except_print()
    sys.exit(1)

print "Job ended OK!!!!!!!"