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

Do not include tags when searching existing volumes in OpenStack #14923

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

zetaab
Copy link
Member

@zetaab zetaab commented Dec 31, 2022

fixes #14922

if we include tags when searching volumes, it basically means that we cannot modify tags at all.

After this PR the kops update cluster output is: (it will add tag k8s.io/role/control-plane: 1 to all volumes)

Will modify resources:
  Volume/espsti.etcd-events.sre-sandbox.k8s.local
        Tags                     {k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local, k8s.io/etcd/events: espsti/espsti,esptnl,helpa} -> {k8s.io/etcd/events: espsti/espsti,esptnl,helpa, k8s.io/role/control-plane: 1, k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local}

  Volume/espsti.etcd-main.sre-sandbox.k8s.local
        Tags                     {KubernetesCluster: sre-sandbox.k8s.local, k8s.io/etcd/main: espsti/espsti,esptnl,helpa, k8s.io/role/master: 1} -> {k8s.io/etcd/main: espsti/espsti,esptnl,helpa, k8s.io/role/control-plane: 1, k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local}

  Volume/esptnl.etcd-events.sre-sandbox.k8s.local
        Tags                     {KubernetesCluster: sre-sandbox.k8s.local, k8s.io/etcd/events: esptnl/espsti,esptnl,helpa, k8s.io/role/master: 1} -> {k8s.io/etcd/events: esptnl/espsti,esptnl,helpa, k8s.io/role/control-plane: 1, k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local}

  Volume/esptnl.etcd-main.sre-sandbox.k8s.local
        Tags                     {k8s.io/etcd/main: esptnl/espsti,esptnl,helpa, k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local} -> {k8s.io/etcd/main: esptnl/espsti,esptnl,helpa, k8s.io/role/control-plane: 1, k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local}

  Volume/helpa.etcd-events.sre-sandbox.k8s.local
        Tags                     {KubernetesCluster: sre-sandbox.k8s.local, k8s.io/etcd/events: helpa/espsti,esptnl,helpa, k8s.io/role/master: 1} -> {k8s.io/role/control-plane: 1, k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local, k8s.io/etcd/events: helpa/espsti,esptnl,helpa}

  Volume/helpa.etcd-main.sre-sandbox.k8s.local
        Tags                     {k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local, k8s.io/etcd/main: helpa/espsti,esptnl,helpa} -> {k8s.io/etcd/main: helpa/espsti,esptnl,helpa, k8s.io/role/control-plane: 1, k8s.io/role/master: 1, KubernetesCluster: sre-sandbox.k8s.local}

so instead of creating new volumes it will update existing volume tags. Volume tag update is handled already in https://github.com/kubernetes/kops/blob/master/upup/pkg/fi/cloudup/openstacktasks/volume.go#L151-L158 and I verified that this works like should.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 31, 2022
@k8s-ci-robot k8s-ci-robot added the area/provider/openstack Issues or PRs related to openstack provider label Dec 31, 2022
@zetaab zetaab added the kind/bug Categorizes issue or PR as related to a bug. label Dec 31, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2023
@hakman
Copy link
Member

hakman commented Jan 3, 2023

@zetaab Consider removing that tag altogether. It is pretty pointless.

@hakman hakman closed this Jan 3, 2023
@hakman hakman reopened this Jan 3, 2023
@hakman
Copy link
Member

hakman commented Jan 3, 2023

Seems docs generation failed. Not sure if possible to force it to re-run.

k8s-ci-robot added a commit that referenced this pull request Jan 3, 2023
…-upstream-release-1.26

Automated cherry pick of #14923: Do not include tags when searching existing volumes in
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2023
@zetaab
Copy link
Member Author

zetaab commented Jan 3, 2023

@hakman force pushed the commit again but you need add lgtm again

@hakman
Copy link
Member

hakman commented Jan 3, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2023
@k8s-ci-robot k8s-ci-robot merged commit 751c71b into kubernetes:master Jan 3, 2023
@zetaab zetaab deleted the fixtagupdate branch January 3, 2023 11:53
Shimiazoulai pushed a commit to spotinst/kubernetes-kops that referenced this pull request Jul 13, 2023
…-of-#14923-upstream-release-1.26

Automated cherry pick of kubernetes#14923: Do not include tags when searching existing volumes in
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. area/provider/openstack Issues or PRs related to openstack provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update cluster tries to create new volumes for etcd clusters in OpenStack
3 participants