Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 E2E Upgrade test: Add more BMO versions to upgrade from #1523

Merged

Conversation

mquhuy
Copy link
Member

@mquhuy mquhuy commented Jan 19, 2024

This PR adds more BMO config versions to the E2E upgrade tests, so that we can test from either of release-0.3, release-0.4 and release-0.5 to main (with both ironic and fixture config).
It also changes the default "from" version from release-0.4 to release-0.5.

e.g. To run upgrade test from release-0.3 to main with ironic config:

export GINKGO_FOCUS="upgrade"
export UPGRADE_BMO_KUSTOMIZATION_FROM=config/overlays/e2e-release-0.3
./hack/ci-e2e.sh

Edit: The upgrade-from version can now be seen from the test output:

 STEP: Installing BMO from ../../config/overlays/e2e-release-0.5 on the upgrade cluster

And from the logs

test/e2e/_artifacts/logs/baremetal-operator-system-upgrade/
├── bmo-e2e
│   └── baremetal-operator-controller-manager
│       ├── baremetal-operator-controller-manager-696c96dbdc-ng2qh
│       │   ├── kube-rbac-proxy-log-metadata.json
│       │   ├── kube-rbac-proxy.log
│       │   ├── manager-log-metadata.json
│       │   └── manager.log
│       └── baremetal-operator-controller-manager-7dd8b7c4b4-9mlhg
│           ├── kube-rbac-proxy-log-metadata.json
│           ├── kube-rbac-proxy.log
│           ├── manager-log-metadata.json
│           └── manager.log
├── bmo-e2e-release-0.5
│   └── baremetal-operator-controller-manager
│       ├── baremetal-operator-controller-manager-696c96dbdc-ng2qh
│       │   ├── kube-rbac-proxy-log-metadata.json
│       │   ├── kube-rbac-proxy.log
│       │   ├── manager-log-metadata.json
│       │   └── manager.log
│       └── baremetal-operator-controller-manager-7dd8b7c4b4-9mlhg
│           ├── kube-rbac-proxy-log-metadata.json
│           ├── kube-rbac-proxy.log
│           ├── manager-log-metadata.json
│           └── manager.log
└── ironic
    └── ironic-754996654b-ftkxq
        ├── ironic-httpd-log-metadata.json
        ├── ironic-httpd.log
        ├── ironic-inspector-log-metadata.json
        ├── ironic-inspector.log
        ├── ironic-log-metadata.json
        ├── ironic-log-watch-log-metadata.json
        ├── ironic-log-watch.log
        └── ironic.log

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 19, 2024
@mquhuy
Copy link
Member Author

mquhuy commented Jan 19, 2024

/metal3-bmo-e2e-test

@mquhuy
Copy link
Member Author

mquhuy commented Jan 19, 2024

/metal3-bmo-e2e-optional-test

Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

This looks good already, but I have one request: would it be possible to make it visible in the logs what version we test?
Maybe just printing the exact overlay that is used? We could also print the image tag or something like that.

@mquhuy mquhuy force-pushed the mquhuy/add-e2e-upgrade-versions branch from 4f3d2fb to 16e4c8d Compare January 23, 2024 07:57
@mquhuy mquhuy force-pushed the mquhuy/add-e2e-upgrade-versions branch 2 times, most recently from b426eec to cd03d66 Compare January 31, 2024 11:48
@mquhuy
Copy link
Member Author

mquhuy commented Jan 31, 2024

This looks good already, but I have one request: would it be possible to make it visible in the logs what version we test? Maybe just printing the exact overlay that is used? We could also print the image tag or something like that.

Thanks Lennart. Sorry it took a bit long, I almost forgot about it.
I've updated the PR with reference to the version in logs. Details in PR description. Please let me know if something else is still missing xD

@mquhuy
Copy link
Member Author

mquhuy commented Jan 31, 2024

/test metal3-bmo-e2e-optional-test

@metal3-io-bot
Copy link
Contributor

@mquhuy: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test generate
  • /test gofmt
  • /test golint
  • /test gomod
  • /test gosec
  • /test manifestlint
  • /test markdownlint
  • /test metal3-bmo-e2e-test-pull
  • /test shellcheck
  • /test unit

The following commands are available to trigger optional jobs:

  • /test metal3-bmo-e2e-test-optional-pull

Use /test all to run the following jobs that were automatically triggered:

  • generate
  • gofmt
  • golint
  • gomod
  • gosec
  • manifestlint
  • shellcheck
  • unit

In response to this:

/test metal3-bmo-e2e-optional-test

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/test-infra repository.

@mquhuy
Copy link
Member Author

mquhuy commented Jan 31, 2024

/test metal3-bmo-e2e-test-optional-pull

Comment on lines 237 to 241
bmoKustomization := e2eConfig.GetVariable("UPGRADE_BMO_KUSTOMIZATION_FROM")
// Get the index of the last "release" word, which typically indicates the start of the BMO version name
lastReleaseWordIndex := strings.LastIndex(bmoKustomization, "release")
BmoFromVer := bmoKustomization[lastReleaseWordIndex:]
By(fmt.Sprintf("Installing BMO with version: %s on the upgrade cluster", BmoFromVer))
Copy link
Member

Choose a reason for hiding this comment

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

This basically adds a requirement on the kustomization folder name. I would rather have something simpler that doesn't care what you name them. Perhaps just print the path?

Suggested change
bmoKustomization := e2eConfig.GetVariable("UPGRADE_BMO_KUSTOMIZATION_FROM")
// Get the index of the last "release" word, which typically indicates the start of the BMO version name
lastReleaseWordIndex := strings.LastIndex(bmoKustomization, "release")
BmoFromVer := bmoKustomization[lastReleaseWordIndex:]
By(fmt.Sprintf("Installing BMO with version: %s on the upgrade cluster", BmoFromVer))
bmoKustomization := e2eConfig.GetVariable("UPGRADE_BMO_KUSTOMIZATION_FROM")
By(fmt.Sprintf("Installing BMO from %s on the upgrade cluster", bmoKustomization))

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm. Okay. How about using the Base path instead? Having a full path in the log is fine, but I also want to have a nice way to notice it in the artifacts.

Copy link
Member

Choose a reason for hiding this comment

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

Oh I didn't notice it was used for the artifacts. Thanks for pointing it out!
I think the base path sounds good for artifacts, in the log I would say the more we include the better :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. I'll update it real quick

@mquhuy mquhuy force-pushed the mquhuy/add-e2e-upgrade-versions branch 2 times, most recently from 14b9aad to f2aed3e Compare February 5, 2024 12:21
Signed-off-by: Huy Mai <huy.mai@est.tech>
@mquhuy mquhuy force-pushed the mquhuy/add-e2e-upgrade-versions branch from f2aed3e to 4c94b2b Compare February 5, 2024 14:28
@tuminoid
Copy link
Member

tuminoid commented Feb 6, 2024

/test metal3-bmo-e2e-test-pull
/test-centos-e2e-integration-main

@lentzi90
Copy link
Member

lentzi90 commented Feb 6, 2024

/test metal3-bmo-e2e-test-optional-pull

Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks for this!
I think that it would be nice eventually to refactor it so that we can run the upgrade test for all different versions, one after the other. But let's do that in a follow up.
The reason I think it would be nice is to reduce the number of jobs so it is easier to keep track of them and also to understand what we test.

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2024
@mquhuy
Copy link
Member Author

mquhuy commented Feb 7, 2024

/lgtm Thanks for this! I think that it would be nice eventually to refactor it so that we can run the upgrade test for all different versions, one after the other. But let's do that in a follow up. The reason I think it would be nice is to reduce the number of jobs so it is easier to keep track of them and also to understand what we test.

Thank you. Yes, I was thinking about that idea the other day. Having a separate job for every upgrade test is too much to handle, but the "problem" with running them in sequence is that to run any upgrade test (including ironic upgrade), the cluster should be cleaned up to its initial state (no ironic nor bmo), so we need to test if cleaning up a cluster is reliable (i.e. if the cluster is really "clean" afterwards). I guess it needs more investigating, and I might start doing it together with the ironic upgrade test.

@mquhuy
Copy link
Member Author

mquhuy commented Feb 7, 2024

/cc @kashifest

@mquhuy
Copy link
Member Author

mquhuy commented Feb 8, 2024

/cc @tuminoid @Rozzii

Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

Does the inspector config here work with the #1544 ?

CACHEURL=http://192.168.222.199/images
IRONIC_FAST_TRACK=true
IRONIC_KERNEL_PARAMS=console=ttyS0
IRONIC_INSPECTOR_VLAN_INTERFACES=all
Copy link
Member

Choose a reason for hiding this comment

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

Will this consume ironic-image from main? If so, you need to set USE_IRONIC_INSPECTOR=true.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we use the same ironic image for all jobs currently and that is the latest. Please add it @mquhuy

Copy link
Member

Choose a reason for hiding this comment

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

Wait a second, this is for BMO. In #1544 you did not touch those, do we need to?

Does BMO need to have the variable or is it only relevant for Ironic?

Copy link
Member

Choose a reason for hiding this comment

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

BMO requires Inspector before 0.5.0. Does it answer your question?

CACHEURL=http://192.168.222.199/images
IRONIC_FAST_TRACK=true
IRONIC_KERNEL_PARAMS=console=ttyS0
IRONIC_INSPECTOR_VLAN_INTERFACES=all
Copy link
Member

Choose a reason for hiding this comment

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

same re INSPECTOR

@mquhuy
Copy link
Member Author

mquhuy commented Feb 8, 2024

@tuminoid I cannot say for sure, but if inspector removal doesn't work with these kustomization, then it will fail on e2e as well. I think we can merge this PR, and fix everything later when/if it fails.
@dtantsur Thanks. May I ask does it mean BMO cannot work without ironic inspector, or it means the ironic image from main needs to adapt?

@kashifest
Copy link
Member

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kashifest

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2024
@metal3-io-bot metal3-io-bot merged commit 52b3c0c into metal3-io:main Feb 12, 2024
21 checks passed
@metal3-io-bot metal3-io-bot deleted the mquhuy/add-e2e-upgrade-versions branch February 12, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants