MCO-1972: Add test OCP-88202: off-cluster and on-cluster layering implementation#6043
MCO-1972: Add test OCP-88202: off-cluster and on-cluster layering implementation#6043HarshwardhanPatil07 wants to merge 2 commits into
Conversation
Verify that both off-cluster layering (via osImageURL in MachineConfig) and on-cluster layering (via MachineOSConfig with containerFile) can coexist on the same MachineConfigPool, and that deleting the off-cluster MC leaves only the on-cluster layering content. Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@HarshwardhanPatil07: This pull request references MCO-1972 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. 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. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: HarshwardhanPatil07 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
|
@HarshwardhanPatil07: all tests passed! 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. |
Details
|
| testID = GetCurrentTestPolarionIDNumber() | ||
| mcpName = fmt.Sprintf("tc-%s-custom", testID) | ||
| osLayerMCName = fmt.Sprintf("tc-%s-os-layer", testID) | ||
| osImageURL = "quay.io/mcoqe/layering@sha256:3760b74a58b882494c5e99d7191647822a2dfea43983cb5882887325b99327a7" |
There was a problem hiding this comment.
We can't hard code the value of the image. The image needs to be built.
| ) | ||
|
|
||
| exutil.By("Create a custom MachineConfigPool") | ||
| customMcp, err := CreateCustomMCP(oc.AsAdmin(), mcpName, 1) |
There was a problem hiding this comment.
Do we need a custom pool? if so we need to skip the test case in SNO/Compact node.
If we a custom pool is not mandatory, then we can use the function to get the custom pool in case of HA cluster and the master pool in case of SNO/Compact
|
|
||
| exutil.By("Apply osImageURL MachineConfig to pool (off-cluster layering)") | ||
| osLayerMC := NewMachineConfig(oc.AsAdmin(), osLayerMCName, customMcp.GetName()) | ||
| osLayerMC.parameters = []string{"OS_IMAGE=" + osImageURL} |
There was a problem hiding this comment.
The image cannot be hardcoded
| logger.Infof("OK!\n") | ||
|
|
||
| exutil.By("Verify off-cluster layering is applied on the node") | ||
| o.Expect(node.GetCurrentBootOSImage()).To(o.ContainSubstring("quay.io/mcoqe/layering"), |
There was a problem hiding this comment.
You can equal the configured image, it should match the exact hash too.
| offClusterFile = "/etc/test-offlayering.test" | ||
| onClusterFile = "/etc/test-onlayering.test" |
There was a problem hiding this comment.
you can directly create here the remotefiles structs
| exutil.By("Delete the off-cluster MC and verify a new MachineOSBuild is triggered") | ||
| osLayerMC.DeleteWithWait() | ||
| logger.Infof("Off-cluster MachineConfig %s deleted", osLayerMCName) | ||
| logger.Infof("OK!\n") | ||
|
|
||
| exutil.By("Verify only on-cluster layering content remains after MC deletion") | ||
| offClusterRF = NewRemoteFile(node, offClusterFile) | ||
| o.Expect(offClusterRF.Exists()).To(o.BeFalse(), | ||
| "%s should be removed after off-cluster MC is deleted", offClusterFile) |
There was a problem hiding this comment.
We are not verifying that the new image is generated after we remove the offcluster layering image
| offClusterRF = NewRemoteFile(node, offClusterFile) | ||
| o.Expect(offClusterRF.Exists()).To(o.BeFalse(), | ||
| "%s should be removed after off-cluster MC is deleted", offClusterFile) | ||
| onClusterRF = NewRemoteFile(node, onClusterFile) | ||
| o.Expect(onClusterRF.Exists()).To(o.BeTrue(), | ||
| "%s should still exist after off-cluster MC is deleted", onClusterFile) |
There was a problem hiding this comment.
Have you executed the test?
Since we didn't wait for the new on cluster layering image to be created and deployed, these assertions should be failing.
There was a problem hiding this comment.
I executed the test here
#6043 (comment)
Verify that both off-cluster layering (via osImageURL in MachineConfig) and on-cluster layering (via MachineOSConfig with containerFile) can coexist on the same MachineConfigPool, and that deleting the off-cluster MC leaves only the on-cluster layering content.
- What I did
- How to verify it
- Description for the changelog