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

DFBUGS-840: Propagate VR conditions .Message #394

Open
wants to merge 1 commit into
base: release-4.17
Choose a base branch
from

Conversation

nirs
Copy link

@nirs nirs commented Nov 11, 2024

When a VR condition is not met, we set the protected PVC condition
message using the error message returned from isVRConditionMet(). When
using csi-addons > 0.10.0, we use now the message from the condition
instead of the default message.

Since the Validated condition is not reported by older version of
csi-addons, and we must wait until the Validated condition status is
known when VRG is deleted, isVRConditionMet() returns now also the state
of the condition, which can be:

  • missing: condition not found
  • stale: observed generation does not match object generation
  • unknown: the special "Unknown" value
  • known: status is True or False

When we validate the Validate condition we have these cases:

  • Condition is missing: continue to next condition.

  • Condition is met: continue to the next condition.

  • Condition not met and its status is False. This VR will never
    complete and it is safe to delete since replication will never start.
    If VRG is deleted, we return true since the VR reached the designed
    state. Otherwise we return false. In this case we updated the
    protected pvc condition with the message from the VR condition.

  • Condition is not met and is stale or unnown: we need to check again
    later. There is no point to check the completed condition since a VR
    cannot complete without validation.In this case we updated the
    protected pvc condition with the message generated by
    isVRConditionMet() for stale or unknown conditions.

Example protected pvc DataReady condition with propagated message when
VR validation failed:

conditions:
  - lastTransitionTime: "2024-11-06T15:33:06Z"
    message: 'failed to meet prerequisite: rpc error: code = FailedPrecondition
      desc = system is not in a state required for the operation''s execution:
      failed to enable mirroring on image "replicapool/csi-vol-fe2ca7f8-713c-4c51-bf52-0d4b2c11d329":
      parent image "replicapool/csi-snap-e2114105-b451-469b-ad97-eb3cbe2af54e"
      is not enabled for mirroring'
    observedGeneration: 1
    reason: Error
    status: "False"
    type: DataReady

Backport notes:

JIRA: https://issues.redhat.com/browse/DFBUGS-840

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 11, 2024

@nirs: This pull request references RHSTOR-6642 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "odf-4.18" version, but no target version was set.

In response to this:

When a VR condition is not met, we set the protected PVC condition
message using the error message returned from isVRConditionMet(). When
using csi-addons > 0.10.0, we use now the message from the condition
instead of the default message.

Since the Validated condition is not reported by older version of
csi-addons, and we must wait until the Validated condition status is
known when VRG is deleted, isVRConditionMet() returns now also the state
of the condition, which can be:

  • missing: condition not found
  • stale: observed generation does not match object generation
  • unknown: the special "Unknown" value
  • known: status is True or False

When we validate the Validate condition we have these cases:

  • Condition is missing: continue to next condition.

  • Condition is met: continue to the next condition.

  • Condition not met and its status is False. This VR will never
    complete and it is safe to delete since replication will never start.
    If VRG is deleted, we return true since the VR reached the designed
    state. Otherwise we return false. In this case we updated the
    protected pvc condition with the message from the VR condition.

  • Condition is not met and is stale or unnown: we need to check again
    later. There is no point to check the completed condition since a VR
    cannot complete without validation.In this case we updated the
    protected pvc condition with the message generated by
    isVRConditionMet() for stale or unknown conditions.

Example protected pvc DataReady condition with propagated message when
VR validation failed:

conditions:
- lastTransitionTime: "2024-11-06T15:33:06Z"
message: 'failed to meet prerequisite: rpc error: code = FailedPrecondition
desc = system is not in a state required for the operation''s execution:
failed to enable mirroring on image "replicapool/csi-vol-fe2ca7f8-713c-4c51-bf52-0d4b2c11d329":
parent image "replicapool/csi-snap-e2114105-b451-469b-ad97-eb3cbe2af54e"
is not enabled for mirroring'
observedGeneration: 1
reason: Error
status: "False"
type: DataReady

Backport notes:

JIRA: https://issues.redhat.com/browse/RHSTOR-6642

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 openshift-eng/jira-lifecycle-plugin repository.

@nirs nirs changed the base branch from main to release-4.17 November 11, 2024 18:03
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 11, 2024

@nirs: This pull request references RHSTOR-6642 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "odf-4.17" version, but no target version was set.

In response to this:

When a VR condition is not met, we set the protected PVC condition
message using the error message returned from isVRConditionMet(). When
using csi-addons > 0.10.0, we use now the message from the condition
instead of the default message.

Since the Validated condition is not reported by older version of
csi-addons, and we must wait until the Validated condition status is
known when VRG is deleted, isVRConditionMet() returns now also the state
of the condition, which can be:

  • missing: condition not found
  • stale: observed generation does not match object generation
  • unknown: the special "Unknown" value
  • known: status is True or False

When we validate the Validate condition we have these cases:

  • Condition is missing: continue to next condition.

  • Condition is met: continue to the next condition.

  • Condition not met and its status is False. This VR will never
    complete and it is safe to delete since replication will never start.
    If VRG is deleted, we return true since the VR reached the designed
    state. Otherwise we return false. In this case we updated the
    protected pvc condition with the message from the VR condition.

  • Condition is not met and is stale or unnown: we need to check again
    later. There is no point to check the completed condition since a VR
    cannot complete without validation.In this case we updated the
    protected pvc condition with the message generated by
    isVRConditionMet() for stale or unknown conditions.

Example protected pvc DataReady condition with propagated message when
VR validation failed:

conditions:
- lastTransitionTime: "2024-11-06T15:33:06Z"
message: 'failed to meet prerequisite: rpc error: code = FailedPrecondition
desc = system is not in a state required for the operation''s execution:
failed to enable mirroring on image "replicapool/csi-vol-fe2ca7f8-713c-4c51-bf52-0d4b2c11d329":
parent image "replicapool/csi-snap-e2114105-b451-469b-ad97-eb3cbe2af54e"
is not enabled for mirroring'
observedGeneration: 1
reason: Error
status: "False"
type: DataReady

Backport notes:

JIRA: https://issues.redhat.com/browse/RHSTOR-6642

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 11, 2024

@nirs: This pull request references RHSTOR-6642 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "odf-4.17" version, but no target version was set.

In response to this:

When a VR condition is not met, we set the protected PVC condition
message using the error message returned from isVRConditionMet(). When
using csi-addons > 0.10.0, we use now the message from the condition
instead of the default message.

Since the Validated condition is not reported by older version of
csi-addons, and we must wait until the Validated condition status is
known when VRG is deleted, isVRConditionMet() returns now also the state
of the condition, which can be:

  • missing: condition not found
  • stale: observed generation does not match object generation
  • unknown: the special "Unknown" value
  • known: status is True or False

When we validate the Validate condition we have these cases:

  • Condition is missing: continue to next condition.

  • Condition is met: continue to the next condition.

  • Condition not met and its status is False. This VR will never
    complete and it is safe to delete since replication will never start.
    If VRG is deleted, we return true since the VR reached the designed
    state. Otherwise we return false. In this case we updated the
    protected pvc condition with the message from the VR condition.

  • Condition is not met and is stale or unnown: we need to check again
    later. There is no point to check the completed condition since a VR
    cannot complete without validation.In this case we updated the
    protected pvc condition with the message generated by
    isVRConditionMet() for stale or unknown conditions.

Example protected pvc DataReady condition with propagated message when
VR validation failed:

conditions:
- lastTransitionTime: "2024-11-06T15:33:06Z"
message: 'failed to meet prerequisite: rpc error: code = FailedPrecondition
desc = system is not in a state required for the operation''s execution:
failed to enable mirroring on image "replicapool/csi-vol-fe2ca7f8-713c-4c51-bf52-0d4b2c11d329":
parent image "replicapool/csi-snap-e2114105-b451-469b-ad97-eb3cbe2af54e"
is not enabled for mirroring'
observedGeneration: 1
reason: Error
status: "False"
type: DataReady

Backport notes:

JIRA: https://issues.redhat.com/browse/RHSTOR-6642

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 openshift-eng/jira-lifecycle-plugin repository.

@nirs
Copy link
Author

nirs commented Nov 12, 2024

Need to replace the RHSTOR issue with DFBUGS item.

@nirs nirs changed the title RHSTOR-6642: Propagate VR conditions .Message DFBUGS-840: Propagate VR conditions .Message Nov 12, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 12, 2024

@nirs: This pull request references [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840), which is invalid:

  • expected the bug to target the "odf-4.17" version, but no target version was set
  • expected [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840) to depend on a bug targeting a version in odf-4.18, odf-4.17.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

When a VR condition is not met, we set the protected PVC condition
message using the error message returned from isVRConditionMet(). When
using csi-addons > 0.10.0, we use now the message from the condition
instead of the default message.

Since the Validated condition is not reported by older version of
csi-addons, and we must wait until the Validated condition status is
known when VRG is deleted, isVRConditionMet() returns now also the state
of the condition, which can be:

  • missing: condition not found
  • stale: observed generation does not match object generation
  • unknown: the special "Unknown" value
  • known: status is True or False

When we validate the Validate condition we have these cases:

  • Condition is missing: continue to next condition.

  • Condition is met: continue to the next condition.

  • Condition not met and its status is False. This VR will never
    complete and it is safe to delete since replication will never start.
    If VRG is deleted, we return true since the VR reached the designed
    state. Otherwise we return false. In this case we updated the
    protected pvc condition with the message from the VR condition.

  • Condition is not met and is stale or unnown: we need to check again
    later. There is no point to check the completed condition since a VR
    cannot complete without validation.In this case we updated the
    protected pvc condition with the message generated by
    isVRConditionMet() for stale or unknown conditions.

Example protected pvc DataReady condition with propagated message when
VR validation failed:

conditions:
- lastTransitionTime: "2024-11-06T15:33:06Z"
message: 'failed to meet prerequisite: rpc error: code = FailedPrecondition
desc = system is not in a state required for the operation''s execution:
failed to enable mirroring on image "replicapool/csi-vol-fe2ca7f8-713c-4c51-bf52-0d4b2c11d329":
parent image "replicapool/csi-snap-e2114105-b451-469b-ad97-eb3cbe2af54e"
is not enabled for mirroring'
observedGeneration: 1
reason: Error
status: "False"
type: DataReady

Backport notes:

JIRA: https://issues.redhat.com/browse/RHSTOR-6642

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 12, 2024

@nirs: This pull request references [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840), which is invalid:

  • expected the bug to target the "odf-4.17" version, but no target version was set
  • expected [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840) to depend on a bug targeting a version in odf-4.18, odf-4.17.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

When a VR condition is not met, we set the protected PVC condition
message using the error message returned from isVRConditionMet(). When
using csi-addons > 0.10.0, we use now the message from the condition
instead of the default message.

Since the Validated condition is not reported by older version of
csi-addons, and we must wait until the Validated condition status is
known when VRG is deleted, isVRConditionMet() returns now also the state
of the condition, which can be:

  • missing: condition not found
  • stale: observed generation does not match object generation
  • unknown: the special "Unknown" value
  • known: status is True or False

When we validate the Validate condition we have these cases:

  • Condition is missing: continue to next condition.

  • Condition is met: continue to the next condition.

  • Condition not met and its status is False. This VR will never
    complete and it is safe to delete since replication will never start.
    If VRG is deleted, we return true since the VR reached the designed
    state. Otherwise we return false. In this case we updated the
    protected pvc condition with the message from the VR condition.

  • Condition is not met and is stale or unnown: we need to check again
    later. There is no point to check the completed condition since a VR
    cannot complete without validation.In this case we updated the
    protected pvc condition with the message generated by
    isVRConditionMet() for stale or unknown conditions.

Example protected pvc DataReady condition with propagated message when
VR validation failed:

conditions:
- lastTransitionTime: "2024-11-06T15:33:06Z"
message: 'failed to meet prerequisite: rpc error: code = FailedPrecondition
desc = system is not in a state required for the operation''s execution:
failed to enable mirroring on image "replicapool/csi-vol-fe2ca7f8-713c-4c51-bf52-0d4b2c11d329":
parent image "replicapool/csi-snap-e2114105-b451-469b-ad97-eb3cbe2af54e"
is not enabled for mirroring'
observedGeneration: 1
reason: Error
status: "False"
type: DataReady

Backport notes:

JIRA: https://issues.redhat.com/browse/DFBUGS-840

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 openshift-eng/jira-lifecycle-plugin repository.

@nirs
Copy link
Author

nirs commented Nov 12, 2024

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 12, 2024

@nirs: This pull request references [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840), which is invalid:

  • expected the bug to target the "odf-4.17" version, but no target version was set
  • expected [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840) to depend on a bug targeting a version in odf-4.18, odf-4.17.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@nirs
Copy link
Author

nirs commented Nov 12, 2024

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 12, 2024

@nirs: This pull request references [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840), which is invalid:

  • expected the bug to target the "odf-4.17" version, but no target version was set
  • expected [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840) to depend on a bug targeting a version in odf-4.18, odf-4.17.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@nirs
Copy link
Author

nirs commented Nov 21, 2024

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 21, 2024

@nirs: This pull request references [Jira Issue DFBUGS-840](https://issues.redhat.com//browse/DFBUGS-840), which is valid.

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

No GitHub users were found matching the public email listed for the QA contact in Jira (kramdoss@redhat.com), skipping review request.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

When a VR condition is not met, we set the protected PVC condition
message using the error message returned from isVRConditionMet(). When
using csi-addons > 0.10.0, we use now the message from the condition
instead of the default message.

Since the Validated condition is not reported by older version of
csi-addons, and we must wait until the Validated condition status is
known when VRG is deleted, isVRConditionMet() returns now also the state
of the condition, which can be:

- missing: condition not found
- stale: observed generation does not match object generation
- unknown: the special "Unknown" value
- known: status is True or False

When we validate the Validate condition we have these cases:

- Condition is missing: continue to next condition.

- Condition is met: continue to the next condition.

- Condition not met and its status is False. This VR will never
  complete and it is safe to delete since replication will never start.
  If VRG is deleted, we return true since the VR reached the designed
  state. Otherwise we return false. In this case we updated the
  protected pvc condition with the message from the VR condition.

- Condition is not met and is stale or unnown: we need to check again
  later. There is no point to check the completed condition since a VR
  cannot complete without validation.In this case we updated the
  protected pvc condition with the message generated by
  isVRConditionMet() for stale or unknown conditions.

Example protected pvc DataReady condition with propagated message when
VR validation failed:

    conditions:
      - lastTransitionTime: "2024-11-06T15:33:06Z"
        message: 'failed to meet prerequisite: rpc error: code = FailedPrecondition
          desc = system is not in a state required for the operation''s execution:
          failed to enable mirroring on image "replicapool/csi-vol-fe2ca7f8-713c-4c51-bf52-0d4b2c11d329":
          parent image "replicapool/csi-snap-e2114105-b451-469b-ad97-eb3cbe2af54e"
          is not enabled for mirroring'
        observedGeneration: 1
        reason: Error
        status: "False"
        type: DataReady

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
(cherry picked from commit 795fea2)
@nirs nirs force-pushed the release-4.17-vr-status branch from 8054e2e to 6993ca6 Compare December 8, 2024 22:18
Copy link

openshift-ci bot commented Dec 8, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nirs

The full list of commands accepted by this bot can be found 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

@nirs nirs marked this pull request as ready for review December 8, 2024 22:19
@nirs
Copy link
Author

nirs commented Dec 8, 2024

@ShyamsundarR @raghavendra-talur change should be ready for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants