Changeset 206


Ignore:
Timestamp:
12/18/12 12:53:42 (8 years ago)
Author:
bas
Message:

added a new option to skip hostname lookup failures

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Changelog

    r203 r206  
     14.2.0
     2  * Added a new option for commandline and pxeconfig.conf:
     3    - commandline:
     4        -H, --skip-hostname-lookup-error When hostname lookup fails, skip it (default: False)
     5
     6    - pxeconfig.conf
     7        skip_hostname_lookup_error: 1
     8
     9    This is mostly used for cluster when you just want to install all the nodes, but not all
     10    racks/blade-chassis are equally filled with nodes.
     11    Author: Bas van der Vlies
     12
    1134.1.0:
    214  * Added two new configuration options for pxeconfig.conf file: closes #17
  • trunk/debian/changelog

    r203 r206  
     1pxeconfig (4.2.0-1) stable; urgency=low
     2
     3  * See Changelog
     4
     5 -- Bas van der Vlies <basv@sara.nl>  Tue, 18 Dec 2012 12:45:18 +0100
     6
    17pxeconfig (4.1.0-1) stable; urgency=low
    28
  • trunk/pxeconfig.spec

    r203 r206  
    44
    55Name: pxeconfig
    6 Version: 4.1.0
     6Version: 4.2.0
    77Release: 1%{?dist}
    88License: See LICENSE
  • trunk/setup.py

    r171 r206  
    1313
    1414setup ( name = 'pxeconfig',
    15         version = '3.1.0',
    16         description = 'SARA pxeconfig utilities',
    17         author = 'Bas van der Vlies',
    18         author_email = 'pxeconfig@sara.nl',
    19         url = 'https://subtrac.sara.nl/oss/pxeconfig',
     15    version = '4.2.0',
     16    description = 'SARA pxeconfig utilities',
     17    author = 'Bas van der Vlies',
     18    author_email = 'pxeconfig@sara.nl',
     19    url = 'https://oss.trac.sara.nl/oss/pxeconfig',
    2020
    2121
    22         extra_path = 'pxeconfig',
    23                 package_dir = { '' : 'src' },
    24                 py_modules = [ 'pxeconfig', 'pxeconfigd', 'pxe_global', 'AdvancedParser' ],
     22    extra_path = 'pxeconfig',
     23    package_dir = { '' : 'src' },
     24    py_modules = [ 'pxeconfig', 'pxeconfigd', 'pxe_global', 'AdvancedParser' ],
    2525)
  • trunk/src/pxeconfig.py

    r203 r206  
    7474START        = 'start'
    7575END          = 'end'
    76 VERSION      = '3.1.0'
     76VERSION      = '4.2.0'
    7777
    7878def select_pxe_configfile():
     
    233233        SCRIPT_HOOK_ADD = False,
    234234        SCRIPT_HOOK_REMOVE = False,
     235        SKIP_HOSTNAME_ERRORS = False,
    235236    )
    236237
     
    263264        dest   = 'VERBOSE',
    264265        help   = 'Make the program more verbose (default: False)'
     266    )
     267
     268    p.add_option('-H', '--skip-hostname-lookup-error',
     269        action = 'store_true',
     270        dest   = 'SKIP_HOSTNAME_LOOKUP_ERROR',
     271        help   = 'When hostname lookup fails, skip it (default: False)'
    265272    )
    266273
     
    309316
    310317
     318    if not options.SKIP_HOSTNAME_LOOKUP_ERROR:
     319        try:
     320            options.SKIP_HOSTNAME_LOOKUP_ERROR = defaults['skip_hostname_lookup_error']
     321        except KeyError, detail:
     322            pass
     323
    311324    ## This will be obsoleted by client_script_hook_add
    312325    #
     
    343356            mac_2_hex(host, options)
    344357        else:
    345             host_2_hex(host, options)
     358            try:
     359                host_2_hex(host, options)
     360            except PxeConfig, detail:
     361
     362                if options.SKIP_HOSTNAME_LOOKUP_ERROR:
     363                    print 'Skipping Hostname lookup failed for: %s' %(host)
     364                    continue
     365                else:
     366                    print detail
     367                    sys.exit(1)
    346368
    347369def main():
  • trunk/src/pxeconfigd.py

    r196 r206  
    2626        config file which tells how the node must boot. This daemon
    2727        enables a client to remove his/here pxe config file. With the
    28         next boot it will use the default one.
    29 
    30         command line option:
    31           -V/--version
    32             Prints the version number and exits
     28        next boot it will use the default one.
     29
     30        command line option:
     31          -V/--version
     32            Prints the version number and exits
    3333         
    3434        Note:
    35           This server can ONLY be started from inetd.
     35          This server can ONLY be started from inetd/xinetd.
    3636"""
    3737import time
     
    5959
    6060PXE_CONF_DIR = '/tftpboot/pxelinux.cfg'
    61 VERSION = '3.1.0'
     61VERSION = '4.2.0'
    6262
    6363# Give the current time
Note: See TracChangeset for help on using the changeset viewer.