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

Bug 1907309: Add new StorageVersionMigration resourceapply #1091

Merged
merged 1 commit into from Jun 7, 2021
Merged

Bug 1907309: Add new StorageVersionMigration resourceapply #1091

merged 1 commit into from Jun 7, 2021

Conversation

ihcsim
Copy link
Contributor

@ihcsim ihcsim commented Jun 2, 2021

This PR adds a new resourceapplyand resourceread for the migration.k8s.io
group. These new functions will be used by the StaticResourceController in the
kube-apiserver controller to manage APF resources storage version migration. (
See openshift/cluster-kube-apiserver-operator#1139.)

Test steps:

  • Create a 4.7.12 OCP cluster
  • Build the etcdhelper CLI per instructions here
  • Copy the etcdhelper binary to the etcdctl container of one of the etcd pods:
oc cp etcdhelper openshift-etcd/etcd-isim-dev-xgfgk-master-0.c.openshift-gce-devel.internal:/opt -c etcdctl
  • Use etcdhelper to confirm the initial v1alpha1 version of the APF resources:
$ oc -n openshift-etcd exec etcd-isim-dev-xgfgk-master-0.c.openshift-gce-devel.internal -c etcdctl \
-- /opt/etcdhelper \
-key=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-isim-dev-xgfgk-master-0.c.openshift-gce-devel.internal.key \
-cert=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-isim-dev-xgfgk-master-0.c.openshift-gce-devel.internal.crt \
-cacert=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt get /kubernetes.io/flowschemas/catch-all --prefix
flowcontrol.apiserver.k8s.io/v1alpha1, Kind=FlowSchema
{
  "kind": "FlowSchema",
  "apiVersion": "flowcontrol.apiserver.k8s.io/v1alpha1",
  "metadata": {
    "name": "catch-all",
    "uid": "494678a7-0ca6-486e-9f47-ebfe5868ee8f",
    "generation": 1,
    "creationTimestamp": "2021-06-02T20:54:54Z",
    # ...
  • Upgrade the cluster to 4.8.0-fc5
  • Build and deploy custom kube-apiserver operator image to the upgraded cluster
  • Confirm that the operator picks up the new manifest:
$ oc -n openshift-kube-apiserver-operator logs kube-apiserver-operator-64f8bb6d4d-lh6fd | grep -i storageversionmigration
I0603 19:40:49.027872       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-apiserver-operator", Name:"kube-apiserver-operator", UID:"b906bc41-c9e4-4cf8-a06b-b906e5b25086", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'StorageVersionMigrationCreated' Created StorageVersionMigration.migration.k8s.io/flowcontrol-flowschema-storage-version-migration because it was missing
  • Confirm that the storage version migrator successfully migrated the version:
$ oc -n openshift-kube-storage-version-migrator logs migrator-68b46b456d-c6psq | grep -i flowschema
I0603 19:40:49.094922       1 kubemigrator.go:110] flowcontrol-flowschema-storage-version-migration: migration running
I0603 19:40:49.536115       1 kubemigrator.go:127] flowcontrol-flowschema-storage-version-migration: migration succeeded
  • etcdhelper should show that the objects are now in the beta version:
$ oc -n openshift-etcd exec etcd-isim-dev-xgfgk-master-0.c.openshift-gce-devel.internal -c etcdctl \
-- /opt/etcdhelper \
-key=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-isim-dev-xgfgk-master-0.c.openshift-gce-devel.internal.key \
-cert=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-isim-dev-xgfgk-master-0.c.openshift-gce-devel.internal.crt \
-cacert=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt get /kubernetes.io/flowschemas/catch-all --prefix
flowcontrol.apiserver.k8s.io/v1beta1, Kind=FlowSchema
{                                                                                                                                                 
  "kind": "FlowSchema",                                                                                                                           
  "apiVersion": "flowcontrol.apiserver.k8s.io/v1beta1",                                                                                           
  "metadata": {                                                                                                                                   
    "name": "catch-all",                                                                                                                          
    "uid": "494678a7-0ca6-486e-9f47-ebfe5868ee8f",                                                                                                
    "generation": 1,                                                                                                                              
    "creationTimestamp": "2021-06-02T20:54:54Z",     

@openshift-ci openshift-ci bot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Jun 2, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 2, 2021

@ihcsim: This pull request references Bugzilla bug 1907309, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @wangke19

In response to this:

Bug 1907309: Add new StorageVersionMigration resourceapply

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.

@openshift-ci openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jun 2, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 2, 2021

@ihcsim: An error was encountered querying GitHub for users with public email (kewang@redhat.com) for bug 1907309 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. non-200 OK status code: 403 Forbidden body: "{\n \"documentation_url\": \"https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#abuse-rate-limits\",\n \"message\": \"You have triggered an abuse detection mechanism. Please wait a few minutes before you try again.\"\n}\n"

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1907309: Add new StorageVersionMigration resourceapply

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.

@ihcsim
Copy link
Contributor Author

ihcsim commented Jun 2, 2021

/assign @deads2k

@@ -52,7 +52,7 @@ require (
k8s.io/klog/v2 v2.8.0
k8s.io/kube-aggregator v0.21.1
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
sigs.k8s.io/kube-storage-version-migrator v0.0.3
sigs.k8s.io/kube-storage-version-migrator v0.0.4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bumped to import sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/fake in testing.

@deads2k
Copy link
Contributor

deads2k commented Jun 2, 2021

I expected to see a resourceread too. Is that not needed for somereason?

@ihcsim
Copy link
Contributor Author

ihcsim commented Jun 2, 2021

@deads2k resourceread added in 697a3fd e33a4c9.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2021

@ihcsim: This pull request references Bugzilla bug 1907309, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @wangke19

In response to this:

Bug 1907309: Add new StorageVersionMigration resourceapply

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.

@ihcsim
Copy link
Contributor Author

ihcsim commented Jun 3, 2021

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2021

@ihcsim: This pull request references Bugzilla bug 1907309, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @wangke19

In response to this:

Bug 1907309: Add new StorageVersionMigration resourceapply

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.

1 similar comment
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2021

@ihcsim: This pull request references Bugzilla bug 1907309, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @wangke19

In response to this:

Bug 1907309: Add new StorageVersionMigration resourceapply

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.

Signed-off-by: Ivan Sim <isim@redhat.com>
@deads2k
Copy link
Contributor

deads2k commented Jun 3, 2021

/lgtm
/approve
/hold

holding for proof.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Jun 3, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, ihcsim

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 Jun 3, 2021
@deads2k
Copy link
Contributor

deads2k commented Jun 7, 2021

proof appeared to work
/hold cancel

@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 Jun 7, 2021
@openshift-merge-robot openshift-merge-robot merged commit abe9fea into openshift:master Jun 7, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 7, 2021

@ihcsim: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 1907309 has not been moved to the MODIFIED state.

In response to this:

Bug 1907309: Add new StorageVersionMigration resourceapply

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.

@ihcsim ihcsim deleted the storage-version-resource-apply branch June 7, 2021 16:04
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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. 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