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

nfs: fix nfs grace period when multus is enabled #11110

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

BlaineEXE
Copy link
Member

@BlaineEXE BlaineEXE commented Oct 5, 2022

Run the ganesha-rados-grace command in a remote pod when multus networking is enabled.

Signed-off-by: parth-gr paarora@redhat.com
Signed-off-by: Blaine Gardner blaine.gardner@redhat.com

Description of your changes:

Which issue is resolved by this Pull Request:
Resolves #11039

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide).
  • Skip Tests for Docs: If this is only a documentation change, add the label skip-ci on the PR.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@mergify
Copy link

mergify bot commented Oct 5, 2022

This pull request has merge conflicts that must be resolved before it can be merged. @BlaineEXE please rebase it. https://rook.io/docs/rook/latest/Contributing/development-flow/#updating-your-fork

Run the ganesha-rados-grace command in a remote pod when multus
networking is enabled.

Signed-off-by: parth-gr <paarora@redhat.com>
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
Copy link
Member

@parth-gr parth-gr left a comment

Choose a reason for hiding this comment

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

Looks good to me I see NFS pod are in healthy state in the CI,
Just some doubts

@@ -179,7 +205,7 @@ func (c *CephToolCommand) run() ([]byte, error) {

// NewRBDCommand does not use the --out-file option so we only check for remote execution here
// Still forcing the check for the command if the behavior changes in the future
if command == RBDTool || command == RadosTool {
if command == RBDTool || command == RadosTool || command == GaneshaRadosGraceTool {
if c.RemoteExecution {
output, stderr, err = c.context.RemoteExecutor.ExecCommandInContainerWithFullOutputWithTimeout(c.clusterInfo.Context, ProxyAppLabel, CommandProxyInitContainerName, c.clusterInfo.Namespace, append([]string{command}, args...)...)
Copy link
Member

Choose a reason for hiding this comment

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

The problem was because the cmd was not called by the remote executor?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct.


return r.context.Executor.ExecuteCommandWithEnv(env, cmd, args...)
cmd := cephclient.NewGaneshaRadosGraceCommand(r.context, r.clusterInfo, args)
_, err := cmd.RunWithTimeout(exec.CephCommandsTimeout)
Copy link
Member

Choose a reason for hiding this comment

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

I see a lot of cmds running by context.Executor why this needs special attention??

@@ -167,7 +193,7 @@ func (c *CephToolCommand) run() ([]byte, error) {
} else {
// the `rbd` tool doesn't use special flag for plain format
switch c.tool {
case RBDTool, RadosTool:
case RBDTool, RadosTool, GaneshaRadosGraceTool:
Copy link
Member

Choose a reason for hiding this comment

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

Is run called by GaneshaRadosGraceTool cmd??

Copy link
Member Author

Choose a reason for hiding this comment

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

In the new design, NewGaneshaRadosGrace() creates a command that, when run, goes through this path. The old command didn't.

@BlaineEXE BlaineEXE merged commit 9d649ca into rook:master Oct 6, 2022
@BlaineEXE BlaineEXE deleted the fix-nfs-multus branch October 6, 2022 17:24
mergify bot added a commit that referenced this pull request Oct 6, 2022
nfs: fix nfs grace period when multus is enabled (backport #11110)
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.

NFS pod in CLBO when multus in enable
2 participants