-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 1798365: gluster: fix how lvm wrapper is passed to heketi templates #12096
Bug 1798365: gluster: fix how lvm wrapper is passed to heketi templates #12096
Conversation
Hi @phlogistonjohn. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@raghavendra-talur @nixpanic @jarrpa @Daniel-Pivonka PTAL. Unfortuatnely, #12072 did not fix everything and non-containerized (aka independent mode) deploys were (always) going to break. I undid some of the templating inside the template and moved it back into the roles such that it will always "know" about the HEKETI_LVM_WRAPPER variable but independent mode deploys will just set it to an empty string (which heketi treats exactly the same as unset). This also has the nice side effect of making the upgrade documentation simpler. |
/assign @raghavendra-talur /ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have comments about default value of the HEKETI_LVM_WRAPPER in the heketi yaml. Other than that the changes look good to me.
@@ -135,9 +133,7 @@ parameters: | |||
displayName: GlusterFS cluster name | |||
description: A unique name to identify this heketi service, useful for running multiple heketi instances | |||
value: glusterfs | |||
{% if glusterfs_is_native | bool %} | |||
- name: HEKETI_LVMWRAPPER | |||
- name: HEKETI_LVM_WRAPPER | |||
displayName: Wrapper for executing LVM commands | |||
description: Heketi can use a wrapper to execute LVM commands, i.e. run commands in the host namespace instead of in the Gluster container. | |||
value: "/usr/sbin/exec-on-host" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we leave the value empty instead of this default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, @phlogistonjohn explained this to me in a call. HEKETI_LVM_WRAPPER will default to value we want it to be in latest 3.11 OCS in Converged mode. For other setups, it can be tweaked if necessary.
@@ -147,9 +145,7 @@ parameters: | |||
displayName: GlusterFS cluster name | |||
description: A unique name to identify this heketi service, useful for running multiple heketi instances | |||
value: glusterfs | |||
{% if glusterfs_is_native | bool %} | |||
- name: HEKETI_LVMWRAPPER | |||
- name: HEKETI_LVM_WRAPPER | |||
displayName: Wrapper for executing LVM commands | |||
description: Heketi can use a wrapper to execute LVM commands, i.e. run commands in the host namespace instead of in the Gluster container. | |||
value: "/usr/sbin/exec-on-host" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we leave the value empty instead of this default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, @phlogistonjohn explained this to me in a call. HEKETI_LVM_WRAPPER will default to value we want it to be in latest 3.11 OCS in Converged mode. For other setups, it can be tweaked if necessary.
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On discussing a little more, we realized it would be better to move the heketi yaml from templates dir back to files dir as we don't have any jinja templating in them.
This will make the documentation changes lot simpler.
Holding off the approval for the same.
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM no obvious issues i can see as long as you tested for converged and non converged mode and everything work we should be good to go
On Thu, Feb 06, 2020 at 01:31:26PM -0800, John Mulligan wrote:
@raghavendra-talur @nixpanic @jarrpa @Daniel-Pivonka PTAL.
Unfortuatnely, #12072 did not fix everything and non-containerized
(aka independent mode) deploys were (always) going to break. I undid
some of the templating inside the template and moved it back into the
roles such that it will always "know" about the HEKETI_LVM_WRAPPER
variable but independent mode deploys will just set it to an empty
string (which heketi treats exactly the same as unset). This also has
the nice side effect of making the upgrade documentation simpler.
Indeed, that is a nice approach. That also means
roles/openshift_storage_glusterfs/templates/deploy-heketi-template.yml.j2
can be renamed back to
roles/openshift_storage_glusterfs/files/deploy-heketi-template.yml again
(as mentioned in an other comment).
|
This change fixes two issues: 1. The environment variable 'HEKETI_LVMWRAPPER' was incorrect as heketi does not make use of a variable by this name. Heketi does make use of 'HEKETI_LVM_WRAPPER'. So we update the vars in openshift-ansible to match and be consistent. 2. Conditionally including the template vars block is incorrect and causes 'oc process' to fail when glusterfs_is_native var is false, the state known as independent mode. Instead we always set and pass the variable, but we pass an empty string to 'oc process' when glusterfs_is_native is false. Signed-off-by: John Mulligan <jmulligan@redhat.com>
9eda10d
to
18b472a
Compare
@raghavendra-talur @nixpanic @Daniel-Pivonka new version pushed, returns to using copy as opposed to template for ocp templates and renames files back to the 'files' dir w/o j2 extension. |
/test unit |
/retest |
1 similar comment
/retest |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
11 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/test unit |
/retest Please review the full test history for this PR and help us cut down flakes. |
6 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@phlogistonjohn: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/hold |
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Daniel-Pivonka, nixpanic, phlogistonjohn, raghavendra-talur, sdodson 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 |
@sdodson: Overrode contexts on behalf of sdodson: ci/prow/unit In response to this:
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. |
@phlogistonjohn: All pull requests linked via external trackers have merged. Bugzilla bug 1798365 has been moved to the MODIFIED state. In response to this:
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. |
This change fixes two issues:
does not make use of a variable by this name. Heketi does make use of
'HEKETI_LVM_WRAPPER'. So we update the vars in openshift-ansible to
match and be consistent.
causes 'oc process' to fail when glusterfs_is_native var is false,
the state known as independent mode. Instead we always set and pass
the variable, but we pass an empty string to 'oc process' when
glusterfs_is_native is false.
Signed-off-by: John Mulligan jmulligan@redhat.com