Commits on May 12, 2016

  1. (PE-15433) Import enteprise-dist support script

    This commit imports the existing bash support script from
    puppetlabs/enterprise-dist@d9a5457. Files imported:
    
      - puppet-enterprise-support
      - installer/utilities
    Sharpie committed May 12, 2016
    Configuration menu
    Copy the full SHA
    cd89a84 View commit details
    Browse the repository at this point in the history
  2. (PE-15433) Implement puppet enterprise support command

    This patch adds a initial implementation for the `puppet enterprise support`
    face. When invoked, the subcommand locates the support script and execs it.
    Sharpie committed May 12, 2016
    Configuration menu
    Copy the full SHA
    9001326 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2016

  1. Merge pull request #1 from Sharpie/pe-15433-import-support-script

    (PE-15433) Move support script to pe_support_script module
    Sharpie committed May 13, 2016
    Configuration menu
    Copy the full SHA
    14e4eac View commit details
    Browse the repository at this point in the history
  2. (PE-15434) Add host configs for monolithic masters

    This patch adds beaker host configurations for each monolithic master platform
    supported by PE 2016.2:
    
      - centos6-64mdca
      - centos7-64mdca
      - sles11-64mdca
      - sles12-64mdca
      - ubuntu1204-64mdca
      - ubuntu1404-64mdca
      - ubuntu1604-64mdca
    
    These configurations were created by beaker-hostgenerator 0.6.0.
    Sharpie committed May 13, 2016
    Configuration menu
    Copy the full SHA
    25e77fa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    609c250 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    05cf19c View commit details
    Browse the repository at this point in the history
  5. (PE-15434) Mock MEEP support in test pre-suite

    This patch adds a step to the module installation part of the Beaker pre-suite
    which mocks up the directory structure created by the MEEP installer. Once the
    beaker-pe library supports the MEEP installer, this test step can be reverted.
    Sharpie committed May 13, 2016
    Configuration menu
    Copy the full SHA
    84c0e20 View commit details
    Browse the repository at this point in the history
  6. (PE-15434) Run Support Script in pre-suite

    This patch adds a step to the pre-suite that executes
    `puppet enterprise support` and unpacks the resulting tarball for inspection by
    later tests.
    
    This also serves as a basic smoke test for the support script.
    Sharpie committed May 13, 2016
    Configuration menu
    Copy the full SHA
    cd677c7 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2016

  1. Merge pull request #2 from Sharpie/pe-15434-start-test-suite

    (PE-15434) Start Beaker acceptance suite for Support Script
    Sharpie committed May 17, 2016
    Configuration menu
    Copy the full SHA
    c6442f6 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2016

  1. (PE-15435) Add constants for PE filesystem locations

    This patch adds the following constants as read-only global variables:
    
      - PUPPET_BIN_DIR
      - SERVER_BIN_DIR
      - SERVER_DATA_DIR
    
    Previously, these constants were defined in the utilities file. The locations
    for PE 2016.2.x are used, which are backwards-compatible to 2015.2.x, but not
    compatible with 3.x.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    f4586fc View commit details
    Browse the repository at this point in the history
  2. (PE-15435) Copy display functions from utilities

    This patch copies the following output generation functions from the utilities
    library:
    
      - display
      - display_newline
    
    Use of complicated display functions, such as display_wrapped_text, have been
    removed along with decorative functions such as display_major_separator.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    547171a View commit details
    Browse the repository at this point in the history
  3. (PE-15435) Implement fail function

    This patch adds a fail function along with a variant of display_error copied
    from the utilities library.
    
    An instance of display_failure is replaced with fail.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    f2ba42f View commit details
    Browse the repository at this point in the history
  4. (PE-15435) Replace wherefore with cmd

    The support script had a handful of locations where the wherefore function from
    the utilities library was used to test for command existance. This patch
    replaces the wherefore function with a standard cmd function which is a simple
    wrapper around the shell builtin hash that can be used to test for existance
    without the need to suppress output.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    3ff6113 View commit details
    Browse the repository at this point in the history
  5. (PE-15435) Remove installer exception handler

    The exception handler executes some rollback and cleanup logic for the
    installer, finalizes some logfiles, and then displays an error message. The
    support script doesn't use any of the state that is cleaned up or rolled back
    and doesn't write to the installer logfile, so the only benefit we get out of
    this is an error message which shows up if the script is canceled with CTRL-C.
    
    This patch removes the exception handlers as the error message isn't worth the
    additional complexity.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    ef00117 View commit details
    Browse the repository at this point in the history
  6. (PE-15435) Replace quit function with a simple exit

    The quit function from the utilities library removes a workdir and finalizes
    log files. The support script doesn't write to a logfile and uses its own DROP
    directory instead of the workdir.
    
    This patch replaces the quit at the end of the script with a simple `exit 0`.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    46895f7 View commit details
    Browse the repository at this point in the history
  7. (PE-15435) Import detect_platform function from pe_repo

    This patch imports the platform detection code from
    puppetlabs/puppetlabs-pe_repo@0cbc9af as a function called detect_platform.
    This code was originally extracted from the utlities library for use in pe_repo
    and sets the PLATFORM_NAME global variable commonly used by the support script.
    
    The new detect_platform function replaces prepare_platform from the
    utilities library.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    d441eca View commit details
    Browse the repository at this point in the history
  8. (PE-15435) Add PLATFORM_EGREP to detect_platform

    This patch adds the PLATFORM_EGREP variable to detect_platform. This variable
    is used by quite a few support script checks.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    dd92bcd View commit details
    Browse the repository at this point in the history
  9. (PE-15435) Add PLATFORM_HOSTNAME to detect_platform

    This patch imports logic for setting the PLATFORM_HOSTNAME and
    PLATFORM_HOSTNAME_SHORT variables from prepare_platform in the utilities
    library.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    e3fd279 View commit details
    Browse the repository at this point in the history
  10. (PE-15435) Add PLATFORM_PACKAGING to detect_platform

    This patch imports logic for setting the PLATFORM_PACKAGING variable from
    prepare_platform in the utilities library.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    24aef16 View commit details
    Browse the repository at this point in the history
  11. (PE-15435) Replace prepare_user with a uid check

    The prepare_user function from the utilities library ensures that the script is
    running as root. This function has been replaced with a direct check at the
    beginning of the main section of the script.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    1605d22 View commit details
    Browse the repository at this point in the history
  12. (PE-15435) Copy is_package_installed from utilities

    This patch adds the is_package_installed function from the utilities library
    which is used to detect various PE components.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    967e380 View commit details
    Browse the repository at this point in the history
  13. (PE-15435) Remove unused logic from run_diagnostic

    The run_diagnostic function contained logic to handle the IS_DEBUG environment
    variable and send output to a logfile. The support script has been hardcoded to
    set IS_DEBUG for many releases and has never properly handled logfiles.
    
    This commit removes the logic for IS_DEBUG and logfiles from the run_diagnostic
    function and removes the IS_DEBUG hardcoded value from the main script section.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    39b7bd0 View commit details
    Browse the repository at this point in the history
  14. (PE-15435) Copy is_noop from utilities

    The is_noop function tests the IS_NOOP environment variable and can be used to
    disable run_diagnostic calls while still printing the commands that would be
    executed.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    d1626f2 View commit details
    Browse the repository at this point in the history
  15. (PE-15435) Remove puppet_bin_dir function

    This patch relaces all calls to puppet_bin_dir with the global PUPPET_BIN_DIR
    variable.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    b002be5 View commit details
    Browse the repository at this point in the history
  16. (PE-15435) Copy get_ini_field from utilities

    This patch adds the get_ini_field function from the utilites library. This
    function is used to extract PuppetDB configuration.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    56ffb60 View commit details
    Browse the repository at this point in the history
  17. (PE-15435) Remove utilities library

    This commit removes the utilities library that was copied from the installer
    directory of enterprise-dist. The support script is now self-contained.
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    b1873ab View commit details
    Browse the repository at this point in the history
  18. Merge pull request #3 from Sharpie/pe-15435-remove-utilities

    (PE1-5435) Remove installer dependencies
    Sharpie committed May 23, 2016
    Configuration menu
    Copy the full SHA
    bac1876 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2016

  1. (maint) Remove old nodes_listing diagnostic

    This patch removes the nodes_listing diagnostic which queried the Rails
    dashboard for a .csv file containing node info. Starting with PE 3.7, this
    check has consistently failed and it is no longer relevant since the Rails
    dashboard was removed in PE 2015.2.0.
    Sharpie committed May 25, 2016
    Configuration menu
    Copy the full SHA
    be10622 View commit details
    Browse the repository at this point in the history
  2. (maint) Skip template databases

    This patch modifies the get_all_database_names function to omit databases that
    start with "template". The psql utility usually can't connect to these
    databases and there is no data stored in them so it just causes a command
    failure.
    Sharpie committed May 25, 2016
    Configuration menu
    Copy the full SHA
    e1bc45c View commit details
    Browse the repository at this point in the history

Commits on May 27, 2016

  1. (maint) Declare excludes before use

    This patch ensures the local variable excludes in the gather_enterprise_files
    function is declared before use. No change in functionality is caused by this
    change, but it does allow the script to be run under `set -u`, which flags use
    of undeclared variables as errors, for testing purposes.
    Sharpie committed May 27, 2016
    Configuration menu
    Copy the full SHA
    7361f66 View commit details
    Browse the repository at this point in the history
  2. (maint) Add default value for FILESYNC variable

    This patch sets the default value for the FILESYNC variable to 'n'. This
    variable controls whether or not filesync data will be captured by the script.
    Sharpie committed May 27, 2016
    Configuration menu
    Copy the full SHA
    7388989 View commit details
    Browse the repository at this point in the history
  3. (maint) Turn command checks into conditionals

    This patch re-factors some execution checks of the form:
    
        check && command
    
    To:
    
        if check; then
          command
        fi
    
    There is no change in behavior, but this re-factoring makes testing easier as
    legitimately failing checks no longer trip `set -eo pipefail`.
    Sharpie committed May 27, 2016
    Configuration menu
    Copy the full SHA
    dd10eb2 View commit details
    Browse the repository at this point in the history
  4. (maint) Skip r10k diagnostics if no config file

    This patch skips the r10k diagnostic check if /etc/puppetlabs/r10k/r10k.yaml is
    missing as r10k will just fail with an error message.
    Sharpie committed May 27, 2016
    Configuration menu
    Copy the full SHA
    8cb26e3 View commit details
    Browse the repository at this point in the history
  5. (maint) Skip activemq lsof check if no lsof

    This patch skips the activemq lsof check if lsof isn't installed.
    Sharpie committed May 27, 2016
    Configuration menu
    Copy the full SHA
    1f4f5a2 View commit details
    Browse the repository at this point in the history
  6. (maint) Increase timeout on console status check

    The console can take longer than 5 seconds to compute an answer to the service
    status check. This patch increases the timeout for the curl command to 60
    seconds from 5 seconds and adds a 5 second connection timeout.
    Sharpie committed May 27, 2016
    Configuration menu
    Copy the full SHA
    cf8e5df View commit details
    Browse the repository at this point in the history

Commits on May 28, 2016

  1. (maint) Move timeout function

    This patch moves the timeout function from the section of the script that
    contains diagnostic checks to the section which contains generic utility
    functions.
    Sharpie committed May 28, 2016
    Configuration menu
    Copy the full SHA
    68083ad View commit details
    Browse the repository at this point in the history

Commits on May 29, 2016

  1. (PE-15945) Only gather whitelisted config files

    Prior to this patch, the gather_enterprise_files function used a tar pipe to
    copy /etc/puppetlabs into the support script output directory with a blacklist
    of exclusions.  The problem with this approach is that sensitive material, such
    as SSL keys, can easily escape the blacklist due to lack of maintenance or
    users creating backup copies under /etc/puppetlabs.
    
    This patch re-factors the gather_enterprise_files function to run a plain copy
    on a whitelist of configuration files.
    Sharpie committed May 29, 2016
    Configuration menu
    Copy the full SHA
    cb647e9 View commit details
    Browse the repository at this point in the history
  2. (PE-6731) Redact passwords from PE configuration

    This patch adds a post-processing step to gather_enterprise_files which loops
    through the files collected looking for XML attributes and keys in JSON, YAML,
    HOCON, and INI files, which end with "password" and redacts the values.
    Sharpie committed May 29, 2016
    Configuration menu
    Copy the full SHA
    b22f1b8 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2016

  1. Add a version number to the support script

    This patch adds a SCRIPT_VERSION global to the support script that can be used
    to identify which version of the script has been executed based on log files
    and generated output.
    Sharpie committed May 30, 2016
    Configuration menu
    Copy the full SHA
    b55d0d9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d5238b View commit details
    Browse the repository at this point in the history
  3. Ensure TIMESTAMP is in UTC

    This patch adds the '-u' flag to the date command which generates the TIMESTAMP
    variable. This causes the timestamp to be expressed in UTC which is easier to
    reason about.
    Sharpie committed May 30, 2016
    Configuration menu
    Copy the full SHA
    3677c3c View commit details
    Browse the repository at this point in the history
  4. Add hostname to archive filename

    This patch adds the hostname, PLATFORM_HOSTNAME_SHORT, to the filename of the
    archive created by the support script. This addition helps differentiate
    support scripts gathered across several nodes in a PE installation.
    Sharpie committed May 30, 2016
    Configuration menu
    Copy the full SHA
    1ec4293 View commit details
    Browse the repository at this point in the history
  5. Add metadata to support script output

    This patch adds a write_metadata function which creates a metadata.json file in
    the root of the support script archive. Currently, this metadata file only
    stores the version of the script that produced the archive.
    Sharpie committed May 30, 2016
    Configuration menu
    Copy the full SHA
    36a6bea View commit details
    Browse the repository at this point in the history
  6. (maint) Copy agent state to enterprise/state

    In the 2015.2.0 update, the archive location for the agent state directory was
    changed to enterprise/puppetserver_state leaving enterprise/state empty. This
    patch removes puppetserver_state and resumes using enterprise/state as the
    output is from the agent and doesn't have any connection with Puppet Server.
    Sharpie committed May 30, 2016
    Configuration menu
    Copy the full SHA
    788bd8b View commit details
    Browse the repository at this point in the history

Commits on May 31, 2016

  1. Configuration menu
    Copy the full SHA
    0a2e21b View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2016

  1. Ensure PLATFORM_HOSTNAME_SHORT uses one segment

    This patch filters PLATFORM_HOSTNAME_SHORT through `cut -d. -f1` before
    flagging it as read-only to ensure that value represents the short hostname.
    Sharpie committed Jun 1, 2016
    Configuration menu
    Copy the full SHA
    edfba99 View commit details
    Browse the repository at this point in the history
  2. Update metadata.json for v1.0.0

    This patch updates the metadata.json file for the 1.0.0 release by setting the
    version number, requirements, dependencies and supported operating systems.
    Sharpie committed Jun 1, 2016
    Configuration menu
    Copy the full SHA
    4e1632a View commit details
    Browse the repository at this point in the history