func/minion

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

 



 func/minion/modules/overlord.py |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5df194f47bbbb3be3f987593a2dc134a0cb9c3cf
Author: S.Ã?aÄ?lar Onur <caglar@xxxxxxxxxxxxxxxx>
Date:   Wed Aug 4 14:27:27 2010 -0400

    certmaster returns None for minion only setups with commit f6ee54c2457bec39c869d9526d47e977e87c702c.
    So use that return value to determine minion only setups to solve following exception;
    
    2010-07-19 18:21:24,406 - ERROR - Exception occured: <type 'exceptions.IOError'>
    Traceback (most recent call last):
     File "/usr/lib/python2.5/site-packages/func/minion/server.py", line 196, in __call__
       rc = self.__method(*args)
     File "/usr/lib/python2.5/site-packages/func/minion/modules/func_module.py", line 43, in wrapper
       return fn(*args)
     File "/usr/lib/python2.5/site-packages/func/minion/modules/overlord.py", line 36, in map_minions
       cm = certmaster.CertMaster()
     File "/usr/lib/python2.5/site-packages/certmaster/certmaster.py", line 79, in __init__
       self.cacert = certs.retrieve_cert_from_file(self.ca_cert_file)
     File "/usr/lib/python2.5/site-packages/certmaster/certs.py", line 86, in retrieve_cert_from_file
       fo = open(certfile, 'r')
    IOError: [Errno 2] No such file or directory: '/etc/pki/certmaster/ca/certmaster.crt'

diff --git a/func/minion/modules/overlord.py b/func/minion/modules/overlord.py
index 2eac394..2681ebe 100644
--- a/func/minion/modules/overlord.py
+++ b/func/minion/modules/overlord.py
@@ -34,6 +34,8 @@ class OverlordModule(func_module.FuncModule):
                     current_minions.append(minion) #add it to the list
         else:
             cm = certmaster.CertMaster()
+            if cm == None: # this is minion only setup
+                return maphash
             current_minions = cm.get_signed_certs()
         for current_minion in current_minions:
             if current_minion in func_utils.get_hostname_by_route():


_______________________________________________
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