Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Add goose to the PATH and log to stdout#5693

Merged
ocket8888 merged 6 commits intoapache:masterfrom
zrhoffman:popen.communicate
Mar 31, 2021
Merged

Add goose to the PATH and log to stdout#5693
ocket8888 merged 6 commits intoapache:masterfrom
zrhoffman:popen.communicate

Conversation

@zrhoffman
Copy link
Member

@zrhoffman zrhoffman commented Mar 30, 2021

What does this PR (Pull Request) do?

    • This PR fixes an issue sometimes encountered when running the Postinstall script under Python 2:
DEBUG:root:psql exec failed; stderr: <open file '<fdopen>', mode 'rU' at 0x7fb7a8e3af60>
        stdout: <open file '<fdopen>', mode 'rU' at 0x7fb7a8e3aed0>
ERROR:root:Failed to set up database: failed to execute database query
  • Adds /opt/traffic_ops/app/bin to the PATH by sourcing /etc/profile.d/traffic_ops.sh.

  • Makes the Python implementation of Postinstall log to stdout, not stderr, because that is what the Perl version does

Which Traffic Control components are affected by this PR?

  • Traffic Ops Postinstall script

What is the best way to verify this PR?

  • Run the Postinstall unit tests
  • Ensure CDN in a Box runs successfully

If this is a bug fix, what versions of Traffic Control are affected?

The following criteria are ALL met by this PR

  • This PR includes tests
  • Bugfix, no documentation necessary
  • An update to CHANGELOG.md is not necessary
  • This PR includes any and all required license headers
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@zrhoffman zrhoffman added Traffic Ops related to Traffic Ops install related to the installation process labels Mar 30, 2021
@zrhoffman zrhoffman changed the title Use Popen.communicate() to get process output Add goose to the PATH and use Popen.communicate() to get process output Mar 31, 2021
@zrhoffman zrhoffman changed the title Add goose to the PATH and use Popen.communicate() to get process output Add goose to the PATH and log to stdout Mar 31, 2021
Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests still pass, showing that logging to stdout - for an interactive program, for some reason - is working.

@ocket8888 ocket8888 merged commit c928be0 into apache:master Mar 31, 2021
@zrhoffman zrhoffman deleted the popen.communicate branch March 31, 2021 16:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

install related to the installation process Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants