Skip to content

Conversation

@pawelpbm
Copy link
Contributor

  • Enabling collection of RHUI connection on RHEL with Google repositories

Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname email@example.com?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

- Enabling collection of RHUI connection details on RHEL with Google repositories

Signed-off-by: Pawel Szubert <pbm@google.com>
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo dnf install -y 'dnf*-command(copr)'
  • dnf copr enable packit/sosreport-sos-4182
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

# Collect zone.txt file from RHUI
curl_command = 'curl -v https://rhui.googlecloud.com/zone.txt'

rhui_package = self.exec_cmd('rpm -qa google-rhui-client-*')
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to run an extra command. You can use either self.policy.package_manager.pkg_by_name('google-rhui-client') (if that is the package name), or self.policy.package_manager.all_pkgs_by_name_regex(r'google-rhui-client') for a regexp search.

rhui_package = self.exec_cmd('rpm -qa google-rhui-client-*')
if (rhui_package['status'] == 0 and
'google-rhui-client' in rhui_package['output']):
self.collect_cmd_output(curl_command)
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth adding some timeout? Default is 600s and in case of some routing issues, you probably dont want to wait 10 minutes (while I assume the curl command should terminate within seconds).

Copy link
Contributor

@pmoravec pmoravec left a comment

Choose a reason for hiding this comment

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

See comments in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants