OCPBUGS-77355: fix wavelength zone name regex#10338
OCPBUGS-77355: fix wavelength zone name regex#10338openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
Conversation
|
@tthvo: This pull request references Jira Issue OCPBUGS-77355, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/cc @yunjiang29 |
|
/jira refresh |
|
@tthvo: This pull request references Jira Issue OCPBUGS-77355, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Relative test: |
|
@tthvo I suggest to add unit test for this PR, wdyt? https://github.com/openshift/installer/compare/main...liweinan:installer:OCPBUGS-77355-add-tests?expand=1 |
|
btw I'm testing with this install-config and report my test result later: additionalTrustBundlePolicy: Proxyonly
apiVersion: v1
baseDomain: qe.devcluster.openshift.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform:
aws:
zones:
- us-east-1a
- us-east-1b
- us-east-1c
replicas: 3
# Edge pool with NEW FORMAT Wavelength Zone (OCPBUGS-77355 fix target)
- architecture: amd64
hyperthreading: Enabled
name: edge
platform:
aws:
zones:
- us-east-1-foe-wlz-1a
replicas: 0
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform:
aws:
zones:
- us-east-1a
- us-east-1b
- us-east-1c
replicas: 3
metadata:
name: weli-test-new-wlz
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 10.0.0.0/16
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:
aws:
region: us-east-1
publish: External
... |
|
It seems my own account has the weli@192 ~/works/oc-swarm/installer/bin (OCPBUGS-77355-add-tests)
❯ aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::301721915996:user/weli --action-names ec2:DeleteCarrierGateway --resource-arns 'arn:aws:ec2:us-east-1:*:carrier-gateway/*' --query 'EvaluationResults[0].EvalDecision' --output text
allowed
weli@192 ~/works/oc-swarm/installer/bin (OCPBUGS-77355-add-tests)
❯ aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::301721915996:user/weli --action-names ec2:CreateCarrierGateway --resource-arns 'arn:aws:ec2:us-east-1:*:carrier-gateway/*' --query 'EvaluationResults[0].EvalDecision' --output text
allowedEven if I use the older version of the installer, the installation with the above configuration can still pass. I need to create a test account first, without the {
"Sid": "DenyCarrierGatewayPermissions",
"Effect": "Deny",
"Action": [
"ec2:CreateCarrierGateway",
"ec2:DeleteCarrierGateway",
"ec2:DescribeCarrierGateways"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:RequestedRegion": "us-east-1"
}
}
}@tthvo wdyt? |
|
I created an IAM user without the export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_DEFAULT_REGION=us-east-1And did an installation using the config as shown above, and here is the result: bash-5.3$ ./openshift-install create cluster
INFO ipFamily is not specified in install-config; defaulting to "IPv4"
WARNING Release Image Architecture not detected. Release Image Architecture is unknown
INFO Credentials loaded from the AWS config using "EnvConfigCredentials" provider
INFO Credentials loaded from default AWS environment variables
INFO Successfully populated MCS CA cert information: root-ca 2036-02-24T16:15:26Z 2026-02-26T16:15:26Z
INFO Successfully populated MCS TLS cert information: root-ca 2036-02-24T16:15:26Z 2026-02-26T16:15:26Z
INFO Consuming Install Config from target directory
WARNING Action not allowed with tested creds action=ec2:AllocateAddress
WARNING Action not allowed with tested creds action=ec2:AssociateAddress
WARNING Action not allowed with tested creds action=ec2:AssociateDhcpOptions
WARNING Action not allowed with tested creds action=ec2:AssociateRouteTable
WARNING Action not allowed with tested creds action=ec2:AttachInternetGateway
WARNING Action not allowed with tested creds action=ec2:AttachNetworkInterface
WARNING Action not allowed with tested creds action=ec2:AuthorizeSecurityGroupEgress
WARNING Action not allowed with tested creds action=ec2:AuthorizeSecurityGroupIngress
WARNING Action not allowed with tested creds action=ec2:CopyImage
WARNING Action not allowed with tested creds action=ec2:CreateCarrierGateway
WARNING Action not allowed with tested creds action=ec2:CreateDhcpOptions
WARNING Action not allowed with tested creds action=ec2:CreateInternetGateway
WARNING Action not allowed with tested creds action=ec2:CreateNatGateway
WARNING Action not allowed with tested creds action=ec2:CreateNetworkInterface
WARNING Action not allowed with tested creds action=ec2:CreateRoute
WARNING Action not allowed with tested creds action=ec2:CreateRouteTable
WARNING Action not allowed with tested creds action=ec2:CreateSecurityGroup
WARNING Action not allowed with tested creds action=ec2:CreateSubnet
WARNING Action not allowed with tested creds action=ec2:CreateTags
WARNING Action not allowed with tested creds action=ec2:CreateVolume
WARNING Action not allowed with tested creds action=ec2:CreateVpc
WARNING Action not allowed with tested creds action=ec2:CreateVpcEndpoint
WARNING Action not allowed with tested creds action=ec2:DeleteCarrierGateway
WARNING Action not allowed with tested creds action=ec2:DeleteDhcpOptions
WARNING Action not allowed with tested creds action=ec2:DeleteInternetGateway
WARNING Action not allowed with tested creds action=ec2:DeleteNatGateway
WARNING Action not allowed with tested creds action=ec2:DeleteNetworkInterface
WARNING Action not allowed with tested creds action=ec2:DeletePlacementGroup
WARNING Action not allowed with tested creds action=ec2:DeleteRoute
WARNING Action not allowed with tested creds action=ec2:DeleteRouteTable
WARNING Action not allowed with tested creds action=ec2:DeleteSecurityGroup
WARNING Action not allowed with tested creds action=ec2:DeleteSnapshot
WARNING Action not allowed with tested creds action=ec2:DeleteSubnet
WARNING Action not allowed with tested creds action=ec2:DeleteTags
WARNING Action not allowed with tested creds action=ec2:DeleteVolume
WARNING Action not allowed with tested creds action=ec2:DeleteVpc
WARNING Action not allowed with tested creds action=ec2:DeleteVpcEndpoints
WARNING Action not allowed with tested creds action=ec2:DeregisterImage
WARNING Action not allowed with tested creds action=ec2:DescribeCarrierGateways
WARNING Action not allowed with tested creds action=ec2:DescribeDhcpOptions
WARNING Action not allowed with tested creds action=ec2:DescribeInstanceAttribute
WARNING Action not allowed with tested creds action=ec2:DescribeInstanceCreditSpecifications
WARNING Action not allowed with tested creds action=ec2:DescribeKeyPairs
WARNING Action not allowed with tested creds action=ec2:DescribeNetworkAcls
WARNING Action not allowed with tested creds action=ec2:DescribePrefixLists
WARNING Action not allowed with tested creds action=ec2:DescribeVpcAttribute
WARNING Action not allowed with tested creds action=ec2:DescribeVpcClassicLink
WARNING Action not allowed with tested creds action=ec2:DescribeVpcClassicLinkDnsSupport
WARNING Action not allowed with tested creds action=ec2:DescribeVpcEndpoints
WARNING Action not allowed with tested creds action=ec2:DetachInternetGateway
WARNING Action not allowed with tested creds action=ec2:DisassociateRouteTable
WARNING Action not allowed with tested creds action=ec2:GetConsoleOutput
WARNING Action not allowed with tested creds action=ec2:GetEbsDefaultKmsKeyId
WARNING Action not allowed with tested creds action=ec2:ModifyInstanceAttribute
WARNING Action not allowed with tested creds action=ec2:ModifyNetworkInterfaceAttribute
WARNING Action not allowed with tested creds action=ec2:ModifySubnetAttribute
WARNING Action not allowed with tested creds action=ec2:ModifyVpcAttribute
WARNING Action not allowed with tested creds action=ec2:ReleaseAddress
WARNING Action not allowed with tested creds action=ec2:ReplaceRoute
WARNING Action not allowed with tested creds action=ec2:ReplaceRouteTableAssociation
WARNING Action not allowed with tested creds action=ec2:RevokeSecurityGroupEgress
WARNING Action not allowed with tested creds action=ec2:RevokeSecurityGroupIngress
WARNING Action not allowed with tested creds action=ec2:RunInstances
WARNING Action not allowed with tested creds action=ec2:TerminateInstances
WARNING Action not allowed with tested creds action=elasticloadbalancing:ApplySecurityGroupsToLoadBalancer
WARNING Action not allowed with tested creds action=elasticloadbalancing:AttachLoadBalancerToSubnets
WARNING Action not allowed with tested creds action=elasticloadbalancing:ConfigureHealthCheck
WARNING Action not allowed with tested creds action=elasticloadbalancing:CreateLoadBalancerListeners
WARNING Action not allowed with tested creds action=elasticloadbalancing:DeregisterInstancesFromLoadBalancer
WARNING Action not allowed with tested creds action=elasticloadbalancing:DescribeInstanceHealth
WARNING Action not allowed with tested creds action=elasticloadbalancing:DescribeLoadBalancerAttributes
WARNING Action not allowed with tested creds action=elasticloadbalancing:DescribeTags
WARNING Action not allowed with tested creds action=elasticloadbalancing:DescribeTargetGroupAttributes
WARNING Action not allowed with tested creds action=elasticloadbalancing:DescribeTargetHealth
WARNING Action not allowed with tested creds action=elasticloadbalancing:ModifyTargetGroupAttributes
WARNING Action not allowed with tested creds action=elasticloadbalancing:RegisterInstancesWithLoadBalancer
WARNING Action not allowed with tested creds action=elasticloadbalancing:SetLoadBalancerPoliciesOfListener
WARNING Action not allowed with tested creds action=iam:AddRoleToInstanceProfile
WARNING Action not allowed with tested creds action=iam:CreateInstanceProfile
WARNING Action not allowed with tested creds action=iam:CreateRole
WARNING Action not allowed with tested creds action=iam:DeleteAccessKey
WARNING Action not allowed with tested creds action=iam:DeleteInstanceProfile
WARNING Action not allowed with tested creds action=iam:DeleteRole
WARNING Action not allowed with tested creds action=iam:DeleteRolePolicy
WARNING Action not allowed with tested creds action=iam:DeleteUser
WARNING Action not allowed with tested creds action=iam:GetInstanceProfile
WARNING Action not allowed with tested creds action=iam:GetRolePolicy
WARNING Action not allowed with tested creds action=iam:ListAttachedRolePolicies
WARNING Action not allowed with tested creds action=iam:ListInstanceProfiles
WARNING Action not allowed with tested creds action=iam:ListInstanceProfilesForRole
WARNING Action not allowed with tested creds action=iam:ListRolePolicies
WARNING Action not allowed with tested creds action=iam:ListUserPolicies
WARNING Action not allowed with tested creds action=iam:ListUsers
WARNING Action not allowed with tested creds action=iam:PassRole
WARNING Action not allowed with tested creds action=iam:PutRolePolicy
WARNING Action not allowed with tested creds action=iam:RemoveRoleFromInstanceProfile
WARNING Action not allowed with tested creds action=iam:TagInstanceProfile
WARNING Action not allowed with tested creds action=iam:TagRole
WARNING Action not allowed with tested creds action=route53:ListHostedZonesByName
WARNING Action not allowed with tested creds action=route53:UpdateHostedZoneComment
WARNING Action not allowed with tested creds action=s3:CreateBucket
WARNING Action not allowed with tested creds action=s3:DeleteBucket
WARNING Action not allowed with tested creds action=s3:DeleteObject
WARNING Action not allowed with tested creds action=s3:GetAccelerateConfiguration
WARNING Action not allowed with tested creds action=s3:GetBucketAcl
WARNING Action not allowed with tested creds action=s3:GetBucketCors
WARNING Action not allowed with tested creds action=s3:GetBucketLogging
WARNING Action not allowed with tested creds action=s3:GetBucketObjectLockConfiguration
WARNING Action not allowed with tested creds action=s3:GetBucketPolicy
WARNING Action not allowed with tested creds action=s3:GetBucketRequestPayment
WARNING Action not allowed with tested creds action=s3:GetBucketTagging
WARNING Action not allowed with tested creds action=s3:GetBucketVersioning
WARNING Action not allowed with tested creds action=s3:GetBucketWebsite
WARNING Action not allowed with tested creds action=s3:GetEncryptionConfiguration
WARNING Action not allowed with tested creds action=s3:GetLifecycleConfiguration
WARNING Action not allowed with tested creds action=s3:GetObject
WARNING Action not allowed with tested creds action=s3:GetObjectAcl
WARNING Action not allowed with tested creds action=s3:GetObjectTagging
WARNING Action not allowed with tested creds action=s3:GetObjectVersion
WARNING Action not allowed with tested creds action=s3:GetReplicationConfiguration
WARNING Action not allowed with tested creds action=s3:ListBucketVersions
WARNING Action not allowed with tested creds action=s3:PutBucketAcl
WARNING Action not allowed with tested creds action=s3:PutBucketPolicy
WARNING Action not allowed with tested creds action=s3:PutBucketTagging
WARNING Action not allowed with tested creds action=s3:PutEncryptionConfiguration
WARNING Action not allowed with tested creds action=s3:PutObject
WARNING Action not allowed with tested creds action=s3:PutObjectAcl
WARNING Action not allowed with tested creds action=s3:PutObjectTagging
WARNING Action not allowed with tested creds action=tag:GetResources
WARNING Tested creds not able to perform all requested actions
FATAL failed to fetch Cluster: failed to fetch dependency of "Cluster": failed to generate asset "Platform Permissions Check": validate AWS credentials: current credentials insufficient for performing cluster installationFrom the above log output, I can see the permissions are checked: WARNING Action not allowed with tested creds action=ec2:CreateCarrierGateway
WARNING Action not allowed with tested creds action=ec2:DeleteCarrierGateway
WARNING Action not allowed with tested creds action=ec2:DescribeCarrierGatewaysSo I'll mark this PR as verified. (test user and relative policy + key deleted after testing.) |
|
/verified by liweinan |
|
@liweinan: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
The correct regex should check for segment "-wlz", which is common for all "known" wavelength zones. One example where the old regex "wl\d\-.*$" would fail is us-east-1-foe-wlz-1a.
Yes @liweinan, this is a great idea. Let me put in your commit here.
Thanks for the testing! Though, I think the goal is that the minimal permission policy created by the installer should allows CarrierGateway management. I believe the flow would be:
That's all. I can add the unit tests you suggested, and it should also serve as a verification evidence :D |
Add comprehensive test coverage for OCPBUGS-77355 fix that updates the Wavelength Zone detection regex from 'wl\d\-.*$' to '-wlz.*$'. Test cases added: - Test traditional format WL zones (us-west-2-wl1-sea-wlz-1) - Test new format WL zones (us-east-1-foe-wlz-1a) - PRIMARY FIX - Test mixed traditional and new format zones - Test only new format zones The new regex correctly identifies all Wavelength Zone formats that contain the '-wlz' segment, including the new format zones that were previously not recognized by the old 'wl\d\-' pattern.
|
/test golint |
|
/test e2e-aws-ovn-edge-zones |
|
@tthvo Thanks for providing the simplified testing method and adding the unit test! I'll verify it again soon today :D |
OCPBUGS-77355 Verification Report: Permissions Policy GenerationExecutive SummaryTest Date: 2026-02-27 Key FindingsActual Test ResultsNew Version (commit df25352) - With PR #10338 Fix: $ jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' \
/tmp/test-new-permissions-policy/aws-permissions-policy-creds.json
{
"Sid": "PermissionCreateCarrierGateway",
"Effect": "Allow",
"Action": [
"ec2:DescribeCarrierGateways",
"ec2:CreateCarrierGateway",
"ec2:DeleteCarrierGateway"
],
"Resource": ["*"]
}
$ jq '.Statement | length' /tmp/test-new-permissions-policy/aws-permissions-policy-creds.json
12✅ Result: Carrier Gateway permissions present in generated policy Old Version (4.21.0-ec.1) - Without Fix: $ jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' \
/tmp/test-old-permissions-policy/aws-permissions-policy-creds.json
(no output - statement does not exist)
$ jq '.Statement | length' /tmp/test-old-permissions-policy/aws-permissions-policy-creds.json
11❌ Result: Carrier Gateway permissions missing from generated policy (see Test Procedure for full Sid list) Impact
Difference: New version adds 1 additional permission statement ( Test ObjectiveVerify that the OpenShift installer correctly:
Bug: OCPBUGS-77355 Test EnvironmentInstaller VersionsNew Version (with fix): Old Version (without fix): Test ConfigurationInstall Config: Key configuration excerpt: compute:
- name: edge
platform:
aws:
zones:
- us-east-1-foe-wlz-1a # New WLZ format
replicas: 0
platform:
aws:
region: us-east-1Zone Format: Test ProcedureStep 1: Test New Version (With Fix)1.1 Prepare Test Directorymkdir -p /tmp/test-new-permissions-policy
cp install-config-new-wlz-format.yaml /tmp/test-new-permissions-policy/install-config.yamlOutput: 1.2 Generate Permissions Policy./openshift-install create permissions-policy --dir /tmp/test-new-permissions-policyOutput: Execution Time: ~5 seconds 1.3 Verify Generated Filesls -la /tmp/test-new-permissions-policy/Output: Key File: 1.4 Check for Carrier Gateway PermissionsNote: Verification commands: grep -q "ec2:CreateCarrierGateway" /tmp/test-new-permissions-policy/aws-permissions-policy-creds.json && \
echo "✅ CreateCarrierGateway permission found" || \
echo "❌ CreateCarrierGateway permission missing"
grep -q "ec2:DeleteCarrierGateway" /tmp/test-new-permissions-policy/aws-permissions-policy-creds.json && \
echo "✅ DeleteCarrierGateway permission found" || \
echo "❌ DeleteCarrierGateway permission missing"
grep -q "ec2:DescribeCarrierGateways" /tmp/test-new-permissions-policy/aws-permissions-policy-creds.json && \
echo "✅ DescribeCarrierGateways permission found" || \
echo "❌ DescribeCarrierGateways permission missing"Output: 1.5 Extract Carrier Gateway Permission Group (Recommended)Using jq for clear, formatted output: jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' \
/tmp/test-new-permissions-policy/aws-permissions-policy-creds.jsonOutput: {
"Sid": "PermissionCreateCarrierGateway",
"Effect": "Allow",
"Action": [
"ec2:DescribeCarrierGateways",
"ec2:CreateCarrierGateway",
"ec2:DeleteCarrierGateway"
],
"Resource": [
"*"
]
}✅ Result: New version successfully includes Carrier Gateway permissions Step 2: Test Old Version (Without Fix)2.1 Prepare Test Directorymkdir -p /tmp/test-old-permissions-policy
cp install-config-new-wlz-format.yaml /tmp/test-old-permissions-policy/install-config.yamlOutput: 2.2 Generate Permissions Policy~/works/oc-swarm/openshift-versions/4.21.0-ec.1/openshift-install create permissions-policy \
--dir /tmp/test-old-permissions-policyOutput: Execution Time: ~5 seconds 2.3 Check for Carrier Gateway PermissionsUsing grep with echo (shows clear result): grep -q "ec2:CreateCarrierGateway" /tmp/test-old-permissions-policy/aws-permissions-policy-creds.json && \
echo "✅ CreateCarrierGateway permission found" || \
echo "❌ CreateCarrierGateway permission missing"
grep -q "ec2:DeleteCarrierGateway" /tmp/test-old-permissions-policy/aws-permissions-policy-creds.json && \
echo "✅ DeleteCarrierGateway permission found" || \
echo "❌ DeleteCarrierGateway permission missing"
grep -q "ec2:DescribeCarrierGateways" /tmp/test-old-permissions-policy/aws-permissions-policy-creds.json && \
echo "✅ DescribeCarrierGateways permission found" || \
echo "❌ DescribeCarrierGateways permission missing"Output: 2.4 Attempt to Extract Carrier Gateway Permission GroupUsing jq to search for the permission group: jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' \
/tmp/test-old-permissions-policy/aws-permissions-policy-creds.jsonOutput: Analyze policy structure: # Count total permission statements
jq '.Statement | length' /tmp/test-old-permissions-policy/aws-permissions-policy-creds.json
# List all statement Sids
jq '.Statement[].Sid' /tmp/test-old-permissions-policy/aws-permissions-policy-creds.jsonOutput: Note: "PermissionCreateCarrierGateway" is missing from the old version ❌ ❌ Result: Old version does NOT include Carrier Gateway permissions Step 3: Compare Policy Statement Countsecho "NEW version total statements: $(jq '.Statement | length' /tmp/test-new-permissions-policy/aws-permissions-policy-creds.json)"
echo "OLD version total statements: $(jq '.Statement | length' /tmp/test-old-permissions-policy/aws-permissions-policy-creds.json)"Output: Verification LogicRegex Pattern AnalysisOld Regex Pattern (before PR #10338): isWLZoneRegex := regexp.Compile(`wl\d\-.*`)Test Against:
New Regex Pattern (with PR #10338): isWLZoneRegex := regexp.Compile(`wl\d\-.*|-wlz`)Test Against:
Permission Generation FlowExpected Permissions for Wavelength ZonesWhen Wavelength Zones are detected, the installer must include:
Why these are needed: Wavelength Zones require Carrier Gateways (not Internet Gateways) for public internet connectivity. Without these permissions, cluster installation will fail when ClusterAPI attempts to create networking infrastructure. What This Test Validates✅ Core Fix Validation
✅ Backward CompatibilityThe fix maintains compatibility with:
✅ User Experience Impact
Test ScopeThis test validates: Policy generation correctness (regex pattern → CAGW permissions included) For additional validation, see complementary test methods:
Test Evidence FilesAll test artifacts are preserved for review: Generated Policy FilesNew Version: Old Version: Test ConfigurationInstall Config: Verification CommandsTo reproduce or verify the results: # Verify new version includes CAGW permissions
jq '.Statement[] | select(.Action[]? | contains("CreateCarrierGateway"))' \
/tmp/test-new-permissions-policy/aws-permissions-policy-creds.json
# Verify old version lacks CAGW permissions (should output nothing)
jq '.Statement[] | select(.Action[]? | contains("CreateCarrierGateway"))' \
/tmp/test-old-permissions-policy/aws-permissions-policy-creds.json
# Compare statement counts
echo "New: $(jq '.Statement | length' /tmp/test-new-permissions-policy/aws-permissions-policy-creds.json)"
echo "Old: $(jq '.Statement | length' /tmp/test-old-permissions-policy/aws-permissions-policy-creds.json)"ConclusionTest Result: ✅ PASSEDPR #10338 successfully fixes OCPBUGS-77355 by:
Verification Evidence
RecommendationThis PR is ready for merge based on:
Related Documentation
Verification Date: 2026-02-27 Appendix: Technical DetailsCode Changes in PR #10338File: Before: isWLZoneRegex := regexp.Compile(`wl\d\-.*`)After: isWLZoneRegex := regexp.Compile(`wl\d\-.*|-wlz`)Impact: This single-line change enables the installer to recognize both traditional ( Appendix: Understanding grep -q BehaviorWhy "No Output" Means SuccessWhen running the test manually, users may be confused by $ grep -q "ec2:CreateCarrierGateway" /tmp/test-new-permissions-policy/aws-permissions-policy-creds.json
$
(returns to prompt with no output)This is CORRECT behavior! ✅ How grep -q WorksThe
Checking the ResultMethod 1: Use && and || operators grep -q "ec2:CreateCarrierGateway" file.json && \
echo "✅ Found" || \
echo "❌ Not found"Method 2: Check exit code grep -q "ec2:CreateCarrierGateway" file.json
echo $? # 0 = found, 1 = not foundMethod 3: Use jq (recommended - most clear) jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' file.json
# If permission exists, shows formatted JSON
# If permission missing, shows nothingCommon Mistake❌ Assuming no output means failure $ grep -q "something" file.json
$
# User thinks: "No output, must have failed!"
# Reality: No output with exit code 0 = SUCCESS✅ Correct interpretation $ grep -q "something" file.json
$ echo $?
0
# Exit code 0 = match found ✅ReproducibilityThis test can be reproduced on any system with: Requirements:
Time Required: ~2 minutes AWS Resources Created: None Cost: $0 This makes it ideal for CI automation and repeated verification. For the CI test job to be created later, I plan to use the restricted IAM user approach combined with the actual cluster installation, which can validate real-world installation scenarios. |
|
/verified by liweinan |
|
@liweinan: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@liweinan The job ci/prow/e2e-aws-ovn-edge-zones should already do that. That's why it failed in the first place :D We should be good in this front. |
|
@tthvo Cool! |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: patrickdillon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-4.21 |
|
@tthvo: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest-required |
|
@tthvo: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/retest-required |
d79e2ae
into
openshift:main
|
@tthvo: Jira Issue Verification Checks: Jira Issue OCPBUGS-77355 Jira Issue OCPBUGS-77355 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@tthvo: new pull request created: #10343 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
The correct regex should check for segment
-wlz, which is common for all "known" wavelength zones.One example where the old regex
wl\d\-.*$would fail isus-east-1-foe-wlz-1a. See failed job.References
https://docs.aws.amazon.com/wavelength/latest/developerguide/available-wavelength-zones.html