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

OPCT-5: support upgrade execution mode #33

Merged

Conversation

mtulio
Copy link
Contributor

@mtulio mtulio commented Nov 10, 2022

https://issues.redhat.com/browse/SPLAT-651

Support upgrade conformance.

  • Introduces new flags to control whether the execution needs to run the upgrade cluster or not:
    • --mode=upgrade
    • --upgrade-to-image=<release_digest> ($(oc adm release info 4.Y+1.Z -o jsonpath={.image})
  • Create config map with plugin variables (the sonobuoy native feature wipes all existing from podSpec which is undesired)
  • add a new plugin instance of openshift-tests to run upgrades: 05-openshift-cluster-upgrade

Blocked by:

Blocked by Plugin release:

Checklist:

Tests checklist:

  • upgrade 4.12-> 4.13

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 10, 2022
@mtulio mtulio changed the title feat/upgrade: introduce to --mode to run upgrade tests SPLAT-651 - feat/upgrade: introduce to --mode to run upgrade tests Nov 11, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2022
@openshift-ci openshift-ci bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 6, 2023
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 6, 2023
mtulio added a commit to mtulio/provider-certification-tool that referenced this pull request Jan 9, 2023
mtulio added a commit to mtulio/provider-certification-tool that referenced this pull request Jan 9, 2023
mtulio added a commit to mtulio/provider-certification-tool that referenced this pull request Jan 9, 2023
mtulio added a commit to mtulio/provider-certification-tool that referenced this pull request Jan 9, 2023
@mtulio
Copy link
Contributor Author

mtulio commented Jan 10, 2023

Test results for upgrade 4.9->4.10, 4.10->4.11, 4.11->4.12.

Mode details / test matrix

Cluster upgrade finished in all tests. Sonobuoy got stuck on 4.10->4.11 - know issue OPCT-7

>> Results for test=/home/mtulio/opct/results/opct-49to410
Plugin: 05-openshift-cluster-upgrade
Status: failed
Total: 37
Passed: 36
Failed: 1
Skipped: 0
--
Plugin: 10-openshift-kube-conformance
Status: failed
Total: 428
Passed: 427
Failed: 1
Skipped: 0
--
Plugin: 20-openshift-conformance-validated
Status: failed
Total: 3149
Passed: 1217
Failed: 23
Skipped: 1909
--
Plugin: 99-openshift-artifacts-collector
Status: passed
Total: 3
Passed: 3
Failed: 0
Skipped: 0
--
Run Details:
API Server version: v1.23.12+8a6bfe4
Node health: 7/7 (100%)

>> Results for test=opct-410to411
Plugin: 20-openshift-conformance-validated
Status: failed
Total: 1
Passed: 0
Failed: 1
Skipped: 0
--
Plugin: 99-openshift-artifacts-collector
Status: failed
Total: 1
Passed: 0
Failed: 1
Skipped: 0
--
Plugin: 05-openshift-cluster-upgrade
Status: failed
Total: 37
Passed: 36
Failed: 1
Skipped: 0
--
Plugin: 10-openshift-kube-conformance
Status: failed
Total: 1
Passed: 0
Failed: 1
Skipped: 0
--
Run Details:
API Server version: v1.24.6+5658434
Node health: 7/7 (100%)
Pods health: 212/212 (100%)

>> Results for test=opct-411to412
Plugin: 05-openshift-cluster-upgrade
Status: failed
Total: 38
Passed: 37
Failed: 1
Skipped: 0
--
Plugin: 10-openshift-kube-conformance
Status: failed
Total: 662
Passed: 657
Failed: 5
Skipped: 0
--
Plugin: 20-openshift-conformance-validated
Status: failed
Total: 3804
Passed: 1713
Failed: 41
Skipped: 2050
--
Plugin: 99-openshift-artifacts-collector
Status: passed
Total: 3
Passed: 3
Failed: 0
Skipped: 0
--
Run Details:
API Server version: v1.25.4+77bec7a
Node health: 7/7 (100%)
Pods health: 219/220 (99%)

@mtulio mtulio changed the title SPLAT-651 - feat/upgrade: introduce to --mode to run upgrade tests OPCT-5 - feat/upgrade: introduce to --mode to run upgrade tests Jan 10, 2023
@mtulio
Copy link
Contributor Author

mtulio commented Jan 10, 2023

Preview of total time installing, running upgrade 4.11->4.12 with OPCT, and destroying the cluster: 4:24:12

  • Install cluster: 0:24:27
  • Run (upgrade + conformance): 3:40:54
  • Destroy cluster: 0:07:01
  • Kube conformance failed ratio: 0.45%
  • OCP Conformance failed ratio: 0.84%
CID=411to412
INSTALL_VERSION=4.11.19
UPGRADE_VERSION=4.12.0-rc.6
CLUSTER=opct-${CID}
WORKPATH=${PWD}/.opct-${CID}
UPGRADE_IMG="$(oc adm release info ${UPGRADE_VERSION} -o jsonpath={.image})"
$ podman run \
>     --env-file ${PWD}/.opct.env \
>     -v ${WORKPATH}/:/root/.ansible/okd-installer:Z \
>     -v ${HOME}/.ssh:/root/.ssh:Z \
>     -v ${HOME}/.openshift/pull-secret-latest.json:/pull-secret.json \
>     -v ${WORKPATH}-openshift-provider-cert:/openshift-provider-cert:Z \
>     --rm opct-runner:latest \
>         ansible-playbook opct-runner-all-aws.yaml \
>         -e cluster_name=$CLUSTER \
>         -e cluster_version=${INSTALL_VERSION} \
>         -e run_mode=upgrade \
>         -e opct_run_mode="--mode=upgrade" \
>         -e opct_run_args="--upgrade-to-image=\"${UPGRADE_IMG}\""

(...)
TASK [OKD Installer | Create all | Ending Summary] *****************************
ok: [localhost] => {
    "msg": [
        "start=[2023-01-10 05:45:08] end=[2023-01-10 06:09:35]",
        "total=[0:24:27]",
        "export KUBECONFIG=/root/.ansible/okd-installer/clusters/opct-411to412/auth/kubeconfig"
    ]
}
(...)
TASK [OPCT | Run Tool | Execution summary] *************************************
ok: [localhost] => {
    "msg": [
        "Job attempts=[]",
        "Job time delta=3:40:11.195498 start=2023-01-10 06:21:10.855608 end=2023-01-10 06:21:10.855608",
        "Job attempts=221",
        "Execution time: 3:40:54"
    ]
}
(...)
TASK [OKD Installer | Destroy | Timer end] *************************************
ok: [localhost] => {
    "msg": [
        "start=[2023-01-10 10:02:04] end=[2023-01-10 10:09:05]",
        "total=[0:07:01]"
    ]
}
(...)
TASK [OPCT | Runner All AWS | Ending Summary] **********************************
ok: [localhost] => {
    "msg": [
        "Execution time: 4:24:12"
    ]
}

PLAY RECAP *********************************************************************
localhost                  : ok=826  changed=101  unreachable=0    failed=0    skipped=233  rescued=0    ignored=2

$ ${WORKPATH}-openshift-provider-cert results ${WORKPATH}/clusters/$CLUSTER/opct/*.tar.gz |egrep ^'(Plugin:|Run)' -A 5
Plugin: 05-openshift-cluster-upgrade
Status: failed
Total: 38
Passed: 37
Failed: 1
Skipped: 0
--
Plugin: 10-openshift-kube-conformance
Status: failed
Total: 660
Passed: 657
Failed: 3
Skipped: 0
--
Plugin: 20-openshift-conformance-validated
Status: failed
Total: 3795
Passed: 1713
Failed: 32
Skipped: 2050
--
Plugin: 99-openshift-artifacts-collector
Status: passed
Total: 3
Passed: 3
Failed: 0
Skipped: 0
--
Run Details:
API Server version: v1.25.4+77bec7a
Node health: 7/7 (100%)
Pods health: 229/229 (100%)

openshift-merge-robot pushed a commit that referenced this pull request Jan 11, 2023
* fix/scc-upgrade: SPLAT874 - creating custom RBAC resources

* fixes/rbac: create custom SCC according tests #33

* chore/nit: expand GroupVersion, and improve err handler
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 18, 2023
@mtulio mtulio changed the title OPCT-5 - feat/upgrade: introduce to --mode to run upgrade tests OPCT-5 - feat/upgrade: introduce mode flag to run upgrade tests Jan 18, 2023
@mtulio mtulio force-pushed the feat-plugin-upgrade branch 3 times, most recently from 4fb8cd2 to e558290 Compare January 24, 2023 18:37
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2023
@mtulio mtulio changed the title OPCT-5 - feat/upgrade: introduce mode flag to run upgrade tests OPCT-5 - feat: support upgrade execution mode Jan 25, 2023
@mtulio mtulio marked this pull request as ready for review January 25, 2023 20:43
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 25, 2023
@mtulio
Copy link
Contributor Author

mtulio commented Jan 25, 2023

@rvanderp3 this PR is ready for review. Ptal?
/assign @rvanderp3

@rvanderp3
Copy link
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jan 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rvanderp3

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2023
@rvanderp3
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2023
@mtulio
Copy link
Contributor Author

mtulio commented Jan 26, 2023

Tested upgrades from 4.12 to 4.13 successfully (plugins v0.3.0-alpha0) :

$ $CLI_BIN_PATH version
OpenShift Provider Certification Tool: 0.0.0+40f5965
Sonobuoy Version: v0.56.10,

$ jq . .opct-4120/clusters/opct-4120-2023012601/opct/results/resources/ns/openshift-provider-certification/core_v1_pods.json  |grep 'quay.io/ocp-cert/openshift-tests-provider-cert:v' |uniq -c
     16             "image": "quay.io/ocp-cert/openshift-tests-provider-cert:v0.3.0-alpha0",

$ jq -r '.items[].status.history | map({"startTime": .startedTime , "completeTime": .completionTime, "version": .version}) ' .opct-4120/clusters/opct-4120-2023012601/opct/results/resources/cluster/config.openshift.io_v1_clusterversions.json 
[
  {
    "startTime": "2023-01-25T20:53:52Z",
    "completeTime": "2023-01-25T21:58:57Z",
    "version": "4.13.0-ec.2"
  },
  {
    "startTime": "2023-01-25T17:46:00Z",
    "completeTime": "2023-01-25T18:16:30Z",
    "version": "4.12.0"
  }
]

 $ ./openshift-provider-cert results .opct-4120/clusters/opct-4120-2023012601/opct/202301252051_sonobuoy_574e2b07-ed25-4e75-8a48-f910027afb04.tar.gz |grep ^Plugin -A 5
Plugin: 05-openshift-cluster-upgrade
Status: failed
Total: 38
Passed: 37
Failed: 1
Skipped: 0
--
Plugin: 10-openshift-kube-conformance
Status: failed
Total: 704
Passed: 684
Failed: 20
Skipped: 0
--
Plugin: 20-openshift-conformance-validated
Status: failed
Total: 3753
Passed: 1655
Failed: 45
Skipped: 2053
--
Plugin: 99-openshift-artifacts-collector
Status: passed
Total: 3
Passed: 3
Failed: 0
Skipped: 0

openshift-merge-robot pushed a commit to redhat-openshift-ecosystem/provider-certification-plugins that referenced this pull request Jan 26, 2023
Add cluster-upgrade plugin to trigger the upgrade using
`openshift-tests` utility with option `run-upgrade`.

https://issues.redhat.com/browse/SPLAT-651

Blocked by PRs:

- [x]
#29
- [x]
#30
- [x]
#31

Blocking CLI:

-
redhat-openshift-ecosystem/provider-certification-tool#33
@mtulio
Copy link
Contributor Author

mtulio commented Jan 26, 2023

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2023
@mtulio mtulio changed the title OPCT-5 - feat: support upgrade execution mode OPCT-5: support upgrade execution mode Jan 26, 2023
@openshift-merge-robot openshift-merge-robot merged commit e46c55c into redhat-openshift-ecosystem:main Jan 26, 2023
@mtulio mtulio deleted the feat-plugin-upgrade branch January 26, 2023 14:42
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants