summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/SSHbase.py
Commit message (Collapse)AuthorAgeFilesLines
* SSHbase: Fix PY3K tracebacks for known_hosts fileSol Jerome2011-05-101-1/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Add missing import sys.Raul Cuza2011-05-061-0/+1
|
* Plugins: Add full PY3K compatibilitySol Jerome2011-04-261-1/+2
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugins: PY3K + PEP8 fixesSol Jerome2011-04-061-16/+16
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* SSHbase: Fix hang when file not present on clientSol Jerome2011-01-311-3/+7
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Updated files to match PEP 257 Fabian Affolter2010-06-091-13/+14
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5904 ce84e21b-d406-0410-9b95-82705330c041
* SSHbase: Use shutil as per Lee's suggestion in Ticket #866Sol Jerome2010-03-251-2/+3
| | | | | | | | | | | | | | | | | | | | | From the ticket: --- From what I can tell, there is an os.system call (line #214 of Bcfg2/Server/Plugins/SSHbase.py) that is supposed to fire off ssh-keygen to generate the keys in a temporary directory. It seems that this call isn't generating the keys correctly. Adding in some debug os.listdir(tempdir) calls before and after the os.system call, shows that there are no files before and after the os.system call. Running the command manually generates valid key pairs. --- So, while this commit won't fix the os.system call, it should at least prevent the plugin from generating empty ssh keys. Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5794 ce84e21b-d406-0410-9b95-82705330c041
* SSHbase: Generate known_hosts file in consistent order (Patch from Lee Loucks)Sol Jerome2010-03-251-31/+32
| | | | | | | | | | | | | | | | From Ticket #869: Because the order of a python set is dependent on the order of the hash of entries of that set, the get_skn method generates a entries in the ssh_known_hosts with the names ordered according to their has instead of a consistent (from the user point of view) order. Some entries are IP, hostname and other entries are hostname, IP. This patch corrects that. Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5793 ce84e21b-d406-0410-9b95-82705330c041
* Automatically add additional host aliases to ssh_known_hosts.root2010-03-131-1/+34
|
* POSIX: Remove support for old-style posix entriesSol Jerome2009-11-191-21/+27
| | | | | | | | | | | This commit forces the user to specify <Path> entries on the server side while still maintaining compatibility with old clients via the POSIXCompat plugin. Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5582 ce84e21b-d406-0410-9b95-82705330c041
* Pylint/PEP 8 Code cleanupsSol Jerome2009-10-071-8/+9
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5477 ce84e21b-d406-0410-9b95-82705330c041
* SSHbase: defer ssh_known_hosts file building until metadata is workingNarayan Desai2009-07-271-1/+4
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5387 ce84e21b-d406-0410-9b95-82705330c041
* SSHbase: fix skn caching (Fixes startup behavior (-40s on my repo))Narayan Desai2009-07-161-2/+2
| | | | | | | | Our cache check actually triggered skn build early, causing extremely poor startup performance in general. (and extremely bad performance on repositories with large quantities of keys) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5332 ce84e21b-d406-0410-9b95-82705330c041
* SSHbase: add an error message for non-resolving clientsNarayan Desai2009-07-141-0/+4
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5326 ce84e21b-d406-0410-9b95-82705330c041
* Rework SSHbase alias/address supportNarayan Desai2009-07-111-32/+28
| | | | | | | | | | | | | | | | | | | Rework metadata so that each instance has addresses and aliases instance attributes containing manually specified addresses and alias names. Unify pub key resolution loop to process this data once per client. Change: only clients with active metadata will be included in ssh_known_hosts data now. Other keys can be stored in *.static, in final known_hosts file format. Also, a more exhaustive search for ip addresses is now performed. DNS resolution for the client hostname, as well as all aliases is performed. Manually specified addresses are added included as well. This should also fix some tracebacks reported by Cory and Teknix, as well as improve performance. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5319 ce84e21b-d406-0410-9b95-82705330c041
* SSHBase: Make SSHBase aware of aliasesSol Jerome2009-06-231-1/+16
| | | | | | | | | | | SSHBase is now aware of aliases listed in the clients.xml file. ClientMetadata now includes `addresses` which are a mapping from an alias to an (ip, name) tuple. The ip addresses can be specified either in clients.xml as an address attribute to the Alias or in DNS. Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5295 ce84e21b-d406-0410-9b95-82705330c041
* os.popen is deprecated in 2.6 (http://docs.python.org/library/os.html#os.popen)Sol Jerome2009-02-201-2/+6
| | | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5088 ce84e21b-d406-0410-9b95-82705330c041
* Infrastructure and initial implementation of the Packages pluginNarayan Desai2009-01-211-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5029 ce84e21b-d406-0410-9b95-82705330c041
* Split pull functionality into PullSource/PullTarget and rebase Cfg and ↵Narayan Desai2009-01-111-1/+1
| | | | | | SSHbase on PullTarget git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5011 ce84e21b-d406-0410-9b95-82705330c041
* Finish up PullSource plugin workNarayan Desai2009-01-101-1/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5010 ce84e21b-d406-0410-9b95-82705330c041
* This patch is stage 1 of the plugin capabilities reworkNarayan Desai2009-01-051-8/+17
| | | | | | | | - define new plugin base classes - switch Plugin.__name__ => Plugin.name git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5004 ce84e21b-d406-0410-9b95-82705330c041
* Update dictionary accesses to work with Python 3.0Sol Jerome2008-12-221-3/+3
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4999 ce84e21b-d406-0410-9b95-82705330c041
* Fix pull modeNarayan Desai2008-08-191-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4880 ce84e21b-d406-0410-9b95-82705330c041
* SSHbase: improve tempfile handling (patch from f.pauget) (Resolves Ticket #588)Narayan Desai2008-08-051-2/+4
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4854 ce84e21b-d406-0410-9b95-82705330c041
* Change to typed plugin systemNarayan Desai2008-06-091-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4680 ce84e21b-d406-0410-9b95-82705330c041
* Fix SSHbase key managment in arbitrary locationsNarayan Desai2008-03-271-3/+8
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4458 ce84e21b-d406-0410-9b95-82705330c041
* Rework bcfg2-admin pullNarayan Desai2008-03-241-20/+11
| | | | | | | | | - forward port Cfg and SSHbase support - reimplement admin mode - add verbose flag, and implement initial interactive mode, also force mode git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4446 ce84e21b-d406-0410-9b95-82705330c041
* Implement support for .static files of external public keysNarayan Desai2008-01-221-1/+9
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4281 ce84e21b-d406-0410-9b95-82705330c041
* SSHbase: Re-add workaround to handle skn caching in event handlerNarayan Desai2007-12-311-0/+3
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4154 ce84e21b-d406-0410-9b95-82705330c041
* sshbase: replace ssh_known_hosts cache mechanism with a python propertyNarayan Desai2007-12-281-31/+27
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4124 ce84e21b-d406-0410-9b95-82705330c041
* Fix race when no keys exist and known_hosts is first in the bundle [bugfix]Narayan Desai2007-12-041-0/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4046 ce84e21b-d406-0410-9b95-82705330c041
* bcfg2-admin pull fixesNarayan Desai2007-11-121-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3947 ce84e21b-d406-0410-9b95-82705330c041
* Second stage of the root->0 backout (from GP)Narayan Desai2007-11-021-2/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3906 ce84e21b-d406-0410-9b95-82705330c041
* Implement bcfg2-admin pull support for info files/metadata changes (Resolves ↵Narayan Desai2007-10-301-1/+1
| | | | | | Ticket #480) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3886 ce84e21b-d406-0410-9b95-82705330c041
* finish sshbase class changeNarayan Desai2007-08-081-2/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3617 ce84e21b-d406-0410-9b95-82705330c041
* Fix binary config file stats uploadNarayan Desai2007-08-011-2/+8
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3589 ce84e21b-d406-0410-9b95-82705330c041
* Client side of improved support for binary files in statisticsNarayan Desai2007-08-011-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3587 ce84e21b-d406-0410-9b95-82705330c041
* Implementing selective forking server, which runs read-only requests in ↵Narayan Desai2007-07-251-26/+31
| | | | | | child processes. Should dramatically improve scalability git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3561 ce84e21b-d406-0410-9b95-82705330c041
* Power about to die can't find adapter may work or not...Daniel Joseph Barnhart Clark2007-07-021-2/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3409 ce84e21b-d406-0410-9b95-82705330c041
* Add bcfg2-admin pull support to SSHbaseNarayan Desai2007-04-051-1/+17
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3014 ce84e21b-d406-0410-9b95-82705330c041
* Add dynamic key prefix supportNarayan Desai2006-12-111-0/+12
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2584 ce84e21b-d406-0410-9b95-82705330c041
* Rick's deterministic ordering patchNarayan Desai2006-08-171-3/+7
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2071 ce84e21b-d406-0410-9b95-82705330c041
* Fix tempfile cleanupNarayan Desai2006-06-181-2/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1887 ce84e21b-d406-0410-9b95-82705330c041
* Patch for Jos to fix initialization errorsNarayan Desai2006-06-101-1/+6
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1874 ce84e21b-d406-0410-9b95-82705330c041
* * Remove tmp files created during ssh key generation (resolves ticket #46)Narayan Desai2006-04-251-13/+14
| | | | | | | | * Pylint cleanups * Simplify the host resolver git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1851 ce84e21b-d406-0410-9b95-82705330c041
* Fix sshbase tbNarayan Desai2006-02-161-1/+2
| | | | | | | Set stdin to /dev/null for debian toolset git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1742 ce84e21b-d406-0410-9b95-82705330c041
* Introduce the new logging infrastructure and convert the server (and ↵Narayan Desai2006-01-251-19/+16
| | | | | | bcfg2-info) over to using it git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1717 ce84e21b-d406-0410-9b95-82705330c041
* set keyword attributes on most filesNarayan Desai2005-12-131-2/+2
| | | | | | | | | added Ed's client and server cleanups Modified the debian and redhat toolsets to produce nicer output ** Broke performance reports git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1623 ce84e21b-d406-0410-9b95-82705330c041
* Re-add daemonize support to the serverNarayan Desai2005-12-061-0/+7
| | | | | | | | | Fix some pylint errors Add better error handling for function calls Add mesh-mode support for sshbase git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1612 ce84e21b-d406-0410-9b95-82705330c041
* work around stupid lxml bugNarayan Desai2005-11-281-5/+8
| | | | | | | (Logical change 1.367) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1543 ce84e21b-d406-0410-9b95-82705330c041