Skip to content

Conversation

@pierreprinetti
Copy link
Member

@pierreprinetti pierreprinetti commented Jul 20, 2021

Prior to this change, if machine-controller gets reprovisioned in the
middle of running InstanceCreate, stale volumes might be left on the
cluster.

With this change, before creating a new root volume for an instance,
InstanceCreate deletes any volumes with the same name.

@openshift-ci openshift-ci bot requested review from Fedosin and iamemilio July 20, 2021 12:05
@openshift-ci openshift-ci bot added the bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. label Jul 20, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 20, 2021

@pierreprinetti: This pull request references Bugzilla bug 1983612, which is valid. The bug has been moved to the POST state. 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.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @eurijon

In response to this:

Bug 1983612: Make InstanceCreate idempotent

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 Jul 20, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 20, 2021

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: eurijon.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@pierreprinetti: This pull request references Bugzilla bug 1983612, which is valid. The bug has been moved to the POST state. 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.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @eurijon

In response to this:

Bug 1983612: Make InstanceCreate idempotent

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.

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
Copy link

openshift-ci bot commented Jul 20, 2021

@pierreprinetti: This pull request references Bugzilla bug 1983612, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.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 @eurijon

In response to this:

Bug 1983612: Make InstanceCreate idempotent

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
Copy link

openshift-ci bot commented Jul 20, 2021

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: eurijon.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@pierreprinetti: This pull request references Bugzilla bug 1983612, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.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 @eurijon

In response to this:

Bug 1983612: Make InstanceCreate idempotent

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.

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.

@pierreprinetti
Copy link
Member Author

pierreprinetti commented Jul 20, 2021

This patch can be seen as a completion to #188.
However, they address slightly different issues and can be merged independently.

IDs := make([]string, 0, len(all))
for _, s := range all {
if s.Name == name {
IDs = append(IDs, s.ID)
Copy link
Member

Choose a reason for hiding this comment

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

really nice.

@EmilienM
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2021
@pierreprinetti
Copy link
Member Author

The discussion I'd like to have in this PR (and the reason why I didn't include this fix in #188 ), is whether it is OK to blindly delete volumes by name. WDYT?

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2021
@pierreprinetti
Copy link
Member Author

Changed the IDsFromName utils function to match the corresponding new gophercloud/utils function exactly

Prior to this change, if machine-controller gets reprovisioned in the
middle of running InstanceCreate, stale volumes might be left on the
cluster.

With this change, before creating a new root volume for an instance,
InstanceCreate deletes any volumes with the same name.
@EmilienM
Copy link
Member

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 21, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EmilienM

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 Jul 21, 2021
@openshift-merge-robot openshift-merge-robot merged commit 0ff90e6 into openshift:master Jul 21, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 21, 2021

@pierreprinetti: All pull requests linked via external trackers have merged:

Bugzilla bug 1983612 has been moved to the MODIFIED state.

In response to this:

Bug 1983612: Make InstanceCreate idempotent

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.

@pierreprinetti pierreprinetti deleted the bz1983612 branch July 21, 2021 14:54
pierreprinetti pushed a commit to shiftstack/cluster-api-provider-openstack that referenced this pull request Apr 22, 2024
* move rbac from hard code to generate

use control-gen tool to
generate rbac/rbac_role*.yaml files instead of hard code them

Fixes openshift#155

* make crd file generated automatically

use
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd
to create instead of using hard code
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-low Referenced Bugzilla bug's severity is low 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.

3 participants