-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow deletion to continue if RHSM update fails
This commit enhances the `DeleteCommand` by allowing the deletion to continue whenever there's an error on RHSM update to mark the image as invisible. It also improves the logging to inform the RHSM operation to make the AMI invisible is about to start and shows the error when it occurs. Refers to SPSTRAT-454
- Loading branch information
Showing
8 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
[ INFO] Loading items from pub:https://fakepub.com?task-id=12345 | ||
[ DEBUG] Marking AMI ami-rhcos1 as invisible on RHSM for the provider ACN. | ||
[ DEBUG] Listing all images from rhsm, https://rhsm.com/v1/internal/cloud_access_providers/amazon/amis | ||
[ DEBUG] Searching for product sample_product_HOURLY for provider ACN in rhsm | ||
[ DEBUG] Fetching product from https://rhsm.com/v1/internal/cloud_access_providers/amazon/provider_image_groups | ||
[ DEBUG] 5 Products(AWS provider) in rhsm: RHEL_HA(awstest), SAP(awstest), rhcos(ACN), sample_product(fake), sample_product_HOURLY(ACN) | ||
[ INFO] Attempting to update the existing image ami-rhcos1 in rhsm | ||
[ ERROR] Failed updating image ami-rhcos1 | ||
# Raised: 400 Client Error: None for url: https://rhsm.com/v1/internal/cloud_access_providers/amazon/amis | ||
[ WARNING] Failed to mark ami-rhcos1 invisible on RHSM: 400 Client Error: None for url: https://rhsm.com/v1/internal/cloud_access_providers/amazon/amis | ||
[ INFO] Deleting ami-rhcos1 in account aws-china-storage | ||
[ INFO] Delete finished for ami-rhcos1 in account aws-china-storage | ||
[ DEBUG] Marking AMI ami-aws1 as invisible on RHSM for the provider AmiProduct. | ||
[ DEBUG] Searching for product sample_product for provider AmiProduct in rhsm | ||
[ INFO] sample_product not found in RHSM | ||
[ INFO] Deleting ami-aws1 in account aws-na | ||
[ INFO] Delete finished for ami-aws1 in account aws-na | ||
[ INFO] Collecting results | ||
[ INFO] Delete completed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters