Re: [PATCH] Add glob support to delegation

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

 



Hi, 

And this version incorporates Seth's "make sure we catch unresolveable hostname errors and behave accordingly" patch so that non-fqdn hostnames can be used with delegation as well, I tested following combinations;

* func "*" call command run "true"
{'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', '']}

* func "*" call --delegate command run "true"
{'planetlab-01.CS.Princeton.EDU': [0, '', ''],
'planetlab-02.cs.princeton.edu': [0, '', ''],
'planetlab-03.CS.Princeton.EDU': [0, '', ''],
'planetlab-04.CS.Princeton.EDU': [0, '', ''],
'planetlab-05.CS.Princeton.EDU': [0, '', ''],
'planetlab-06.CS.Princeton.EDU': [0, '', ''],
'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', ''], 'planetlab-03.CS.Princeton.EDU': [0, '', ''], 'planetlab-01.CS.Princeton.EDU': [0, '', ''], 'planetlab-02.cs.princeton.edu': [0, '', ''], 'planetlab-05.CS.Princeton.EDU': [0, '', ''], 'planetlab-06.CS.Princeton.EDU': [0, '', ''], 'planetlab-04.CS.Princeton.EDU': [0, '', '']}

* func "planetlab-02.cs.princeton.edu" call command run "true"
ERROR: Can't find any minions matching "planetlab-02.cs.princeton.edu". 

* func "planetlab-02.cs.princeton.edu" call --delegate command run "true"
{'planetlab-02.cs.princeton.edu': [0, '', '']}
{'planetlab-02.cs.princeton.edu': [0, '', '']}

* func "planetlab-02.cs.princeton.edu;www.planet-lab.org" call command run "true"
{'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', '']}

* func "planetlab-02.cs.princeton.edu;www.planet-lab.org" call --delegate command run "true"
{'planetlab-02.cs.princeton.edu': [0, '', ''],
'www.planet-lab.org': [0, '', '']}
{'planetlab-02.cs.princeton.edu': [0, '', ''], 'www.planet-lab.org': [0, '', '']}

* func "www.planet-lab.org" call command run "true"
{'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', '']}

* func "www.planet-lab.org" call --delegate command run "true"
{'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', '']}

* func "www" call command run "true"
{'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', '']}

* func "www" call --delegate command run "true"
{'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', '']}

* func "planetlab-02" call command run "true"
ERROR: Can't find any minions matching "planetlab-02". 

* func "planetlab-02" call --delegate command run "true"
{'planetlab-02.cs.princeton.edu': [0, '', '']}
{'planetlab-02.cs.princeton.edu': [0, '', '']}

* func "planetlab-02;www" call command run "true"
{'www.planet-lab.org': [0, '', '']}
{'www.planet-lab.org': [0, '', '']}

* func "planetlab-02;www" call --delegate command run "true"
{'planetlab-02.cs.princeton.edu': [0, '', ''],
'www.planet-lab.org': [0, '', '']}
{'planetlab-02.cs.princeton.edu': [0, '', ''], 'www.planet-lab.org': [0, '', '']}

On Aug 6, 2010, at 11:08 PM, S.Çağlar Onur wrote:

> Hi,
> 
> Please see the attached version instead, this version invokes the sub-overlord only if it is really required;
> 
> 
> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # func "planetlab-02.cs.princeton.edu" call --delegate command run "true"
> {'planetlab-02.cs.princeton.edu': [0, '', '']}
> {'planetlab-02.cs.princeton.edu': [0, '', '']}
> 
> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # func "*" call --delegate command run "true"
> {'planetlab-01.CS.Princeton.EDU': [0, '', ''],
> 'planetlab-02.cs.princeton.edu': [0, '', ''],
> 'planetlab-03.CS.Princeton.EDU': [0, '', ''],
> 'planetlab-04.CS.Princeton.EDU': [0, '', ''],
> 'planetlab-05.CS.Princeton.EDU': [0, '', ''],
> 'planetlab-06.CS.Princeton.EDU': [0, '', ''],
> 'www.planet-lab.org': [0, '', '']}
> {'www.planet-lab.org': [0, '', ''], 'planetlab-03.CS.Princeton.EDU': [0, '', ''], 'planetlab-01.CS.Princeton.EDU': [0, '', ''], 'planetlab-02.cs.princeton.edu': [0, '', ''], 'planetlab-05.CS.Princeton.EDU': [0, '', ''], 'planetlab-06.CS.Princeton.EDU': [0, '', ''], 'planetlab-04.CS.Princeton.EDU': [0, '', '']}
> 
> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # func "*" call command run "true"
> {'www.planet-lab.org': [0, '', '']}
> {'www.planet-lab.org': [0, '', '']}
> 
> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # func "www.planet-lab.org" call command run "true"
> {'www.planet-lab.org': [0, '', '']}
> {'www.planet-lab.org': [0, '', '']}
> 
> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # func "www.planet-lab.org" call --delegate command run "true"
> {'www.planet-lab.org': [0, '', '']}
> {'www.planet-lab.org': [0, '', '']}
> 
> On Aug 6, 2010, at 5:03 PM, S.Çağlar Onur wrote:
> 
>> Hi,
>> 
>> Following patch adds globbing support to delegation mode which otherwise fails because overlord tries to connect to minion itself,
>> 
>> [boot.planet-lab.org-rc18] ~ # func "planetlab-02.cs.princeton.edu" call ...
>> {'planetlab-02.cs.princeton.edu': ['REMOTE_ERROR',
>>                                  'OpenSSL.SSL.Error',
>>                                  "[('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')]",
>>                                  '  File "/usr/lib/python2.5/site-packages/func/overlord/client.py", line 834, in process_server\n    retval = getattr(conn, meth)(*args[:])\n   File "/usr/lib/python2.5/xmlrpclib.py", line 1150, in __call__\n    return self.__send(self.__name, args)\n   File "/usr/lib/python2.5/xmlrpclib.py", line 1440, in __request\n    verbose=self.__verbose\n   File "/usr/lib/python2.5/xmlrpclib.py", line 1186, in request\n    self.send_content(h, request_body)\n   File "/usr/lib/python2.5/xmlrpclib.py", line 1300, in send_content\n    connection.endheaders()\n   File "/usr/lib/python2.5/httplib.py", line 856, in endheaders\n    self._send_output()\n   File "/usr/lib/python2.5/httplib.py", line 728, in _send_output\n    self.send(msg)\n   File "/usr/lib/python2.5/httplib.py", line 707, in send\n    self.sock.sendall(str)\n   File "/usr/lib/python2.5/site-packages/certmaster/SSLConnection.py", line 109, in sendall\n    sent = con.send(data, flags)\n']}
>> 
>> 
>> 
>> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # cat /var/lib/func/map 
>> ---
>> www.planet-lab.org:
>>   planetlab-01.CS.Princeton.EDU: {}
>>   planetlab-02.cs.princeton.edu: {}
>>   planetlab-03.CS.Princeton.EDU: {}
>>   planetlab-04.CS.Princeton.EDU: {}
>>   planetlab-05.CS.Princeton.EDU: {}
>>   planetlab-06.CS.Princeton.EDU: {}
>> […]
>> 
>> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # certmaster-ca --list-signed
>> www.planet-lab.org
>> 
>> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # func "*02*" call --delegate command run "true"
>> {'planetlab-02.cs.princeton.edu': [0, '', ''], 'www.planet-lab.org': [0, '', '']}
>> 
>> [boot.planet-lab.org-rc18] /usr/lib/python2.5/site-packages/func # func "planetlab-02.cs.princeton.edu" call --delegate command run "true"
>> {'planetlab-02.cs.princeton.edu': [0, '', ''], 'www.planet-lab.org': [0, '', '']}


Attachment: func.patch
Description: Binary data

--
S.Çağlar Onur <caglar@xxxxxxxxxxxxxxxx>

_______________________________________________
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