- 
                Notifications
    You must be signed in to change notification settings 
- Fork 193
(PA-7407) Add more detailed error information when upgrade fails #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| I am able to recreate the ScriptHalted error using this upgrade.pp (with an invalid dir given for  The output before my changes: The output after my changes:  | 
b817bab    to
    bb7e93a      
    Compare
  
    c64ada1    to
    eaf5a38      
    Compare
  
    Previously when puppet_agent fails to upgrade, only the error is given. This commit updates install_puppet.ps1 and puppet_agent_upgrade_error provider to collect & provide more information about the error. Specifically, the last 10 lines of output from the installer.log and any other error(s) that caused the failure are now included in the puppet_agent_upgrade_failure.log and are output by the puppet_agent_upgrade_error type and provider. Any lines with PUPPET_AGENT_ACCOUNT_PASSWORD are excluded from the output and failure.log.
eaf5a38    to
    b08b072      
    Compare
  
    | I modified installer.log (which maps to $logfile) to contain lines with PUPPET_AGENT_ACCOUNT_PASSWORD Without Select-String -NotMatch for last 10 lines of logfile With Select-String -NotMatch for last 10 lines of logfile Without Select-String -NotMatch for lines with Error or -- Error in logfile With Select-String -NotMatch for lines with Error or -- Error in logfile  | 
Previously when puppet_agent fails to upgrade, only the error is given. This commit updates install_puppet.ps1 and puppet_agent_upgrade_error provider to collect & provide more information about the error. Specifically, the last 10 lines of output from the installer.log and any other error(s) that caused the failure are now included in the puppet_agent_upgrade_failure.log and are output by the puppet_agent_upgrade_error type and provider. Any lines with
PUPPET_AGENT_ACCOUNT_PASSWORD are excluded from the output and failure.log.