Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-33534: Improve logs-cortx-cloud.sh error handling. #367

Merged

Conversation

walterlopatka
Copy link
Contributor

@walterlopatka walterlopatka commented Aug 31, 2022

Description

Improved error handling in logs-cotrx-cloud.sh:

  • On kubectl failures, exit function early (and avoid additional, unhelpful error messages)
  • Avoid "kubectl cp" with leading slash (/) on target, which causes an annoying "tar" error.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds new functionality)
  • Breaking change (bug fix or new feature that breaks existing functionality)
  • Third-party dependency update
  • Documentation additions or improvements
  • Code quality improvements to existing code or test additions/updates

Applicable issues

  • This change fixes an issue: CORTX-33534

CORTX image version requirements

N/A

How was this tested?

Local test:

  • Verify no regression
  • Test with pods evacuated from one node to see response to kubectl errors

Checklist

  • The change is tested and works locally.
  • New or changed settings in the solution YAML are documented clearly in the README.md file.
  • All commits are signed off and are in agreement with the CORTX Community DCO and CLA policy.

If this change requires newer CORTX or third party image versions:

  • The image fields in solution.example.yaml have been updated to use the required versions.
  • The appVersion field of the Helm chart has been updated to use the new CORTX version.

If this change addresses a CORTX Jira issue:

  • The title of the PR starts with the issue ID (e.g. CORTX-XXXXX:)

 * On kubectl failures, exit function early (and avoid
    additional, unhelpful error messages)
 * Avoid "kubectl cp" with leading slash (/) on target, which
    causes an annoying "tar" error.

Signed-off-by: Walter Lopatka <[email protected]>
@cla-bot cla-bot bot added the cla-signed label Aug 31, 2022
@@ -110,14 +110,14 @@ function tarPodLogs()
done

# Get support bundle. Use first container.
local path="/var/cortx/support_bundle"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed leading slash so that later "kubectl cp" does not copy from a path with leading "/". The slash is added in the few places where needed.

@walterlopatka walterlopatka marked this pull request as ready for review August 31, 2022 21:18
@walterlopatka walterlopatka requested a review from a team as a code owner August 31, 2022 21:18
@osowski osowski merged commit 6de2cec into Seagate:integration Aug 31, 2022
@walterlopatka walterlopatka deleted the CORTX-33534_logs-error-handling branch August 31, 2022 21:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants