Problem synchronizing certificates with peers

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

 



Hi,

I am experiencing a problem a problem with the certmaster-sync script, which aborts with an error. The problem seems to be the function syncable(), which issues a func call and then checks the job status for three seconds:

53	    job_id = fc.certmastermod.peering_enabled()
54	    while return_code != jobthing.JOB_ID_FINISHED and ticks < 3:
55	        sleep(1)
56	        (return_code, results) = fc.job_status(job_id)
57	        ticks += 1
58	
59	    hosts = []
60	    for host, result in results.iteritems():

In my case, the job is not finished after three seconds and there is an int value in the results variable, which subsequently causes a problem in line 60 (there is no iteritems attribute for the int results).

After a quick browsing of the func code, I found that job_status may return an (int, int) tuple (function __access_status() in jobthing.py, which can get called by job_status()):

134	    if write:
135	        storage[str(jobid)] = (status, results)
136	        rc = jobid
137	    elif get_all:
138	        rc=__get_open_ids(storage)
139	    elif not purge:
140	        if storage.has_key(str(jobid)):
141	            # tuple of (status, results)
142	
143	            rc = storage[str(jobid)]
144	        else:
145	            rc = (JOB_ID_LOST_IN_SPACE, 0)

The question is now, should job_status always return a dict as the result (second element of the tuple), or should the syncable() function be prepared to handle getting an int as result?

cheers,
Andreas

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list


[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux