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
pool: initialize only rbd application pools #10963
Conversation
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.
Ack from the RBD perspective
pkg/operator/ceph/pool/controller.go
Outdated
return errors.Wrapf(err, "failed to initialize pool %q. %s", p.Name, string(output)) | ||
if appName == poolApplicationNameRBD { | ||
// initialize only rbd pools. | ||
logger.Infof("initializing pool %q", p.Name) |
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.
logger.Infof("initializing pool %q", p.Name) | |
logger.Infof("initializing pool %q for RBD use", p.Name) |
pkg/operator/ceph/pool/controller.go
Outdated
if err != nil { | ||
return errors.Wrapf(err, "failed to initialize pool %q. %s", p.Name, string(output)) | ||
} | ||
logger.Infof("successfully initialized pool %q", p.Name) |
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.
logger.Infof("successfully initialized pool %q", p.Name) | |
logger.Infof("successfully initialized pool %q for RBD use", p.Name) |
pkg/operator/ceph/pool/controller.go
Outdated
if err != nil { | ||
return errors.Wrapf(err, "failed to initialize pool %q. %s", p.Name, string(output)) | ||
if appName == poolApplicationNameRBD { | ||
// initialize only rbd pools. |
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.
// initialize only rbd pools. |
pkg/operator/ceph/pool/controller.go
Outdated
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run() | ||
if err != nil { | ||
return errors.Wrapf(err, "failed to initialize pool %q. %s", p.Name, string(output)) | ||
if appName == poolApplicationNameRBD { |
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.
Why this function is even called if it only needs to be run for poolApplicationNameRBD
Whatever the failure is, I doubt that because |
bfdcf0a
to
1115bba
Compare
Thanks, made requested changes 👍 |
pkg/operator/ceph/pool/controller.go
Outdated
logger.Infof("initializing pool %q", p.Name) | ||
args := []string{"pool", "init", p.Name} | ||
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run() | ||
if err != nil { | ||
return errors.Wrapf(err, "failed to initialize pool %q. %s", p.Name, string(output)) | ||
if appName == poolApplicationNameRBD { | ||
logger.Infof("initializing pool %q for RBD use", p.Name) | ||
args := []string{"pool", "init", p.Name} | ||
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run() | ||
if err != nil { | ||
return errors.Wrapf(err, "failed to initialize pool %q for RBD use. %s", p.Name, string(output)) | ||
} | ||
logger.Infof("successfully initialized pool %q for RBD use", p.Name) | ||
} | ||
logger.Infof("successfully initialized pool %q", p.Name) |
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.
logger.Infof("initializing pool %q", p.Name) | |
args := []string{"pool", "init", p.Name} | |
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run() | |
if err != nil { | |
return errors.Wrapf(err, "failed to initialize pool %q. %s", p.Name, string(output)) | |
if appName == poolApplicationNameRBD { | |
logger.Infof("initializing pool %q for RBD use", p.Name) | |
args := []string{"pool", "init", p.Name} | |
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run() | |
if err != nil { | |
return errors.Wrapf(err, "failed to initialize pool %q for RBD use. %s", p.Name, string(output)) | |
} | |
logger.Infof("successfully initialized pool %q for RBD use", p.Name) | |
} | |
logger.Infof("successfully initialized pool %q", p.Name) | |
if appName != poolApplicationNameRBD{ | |
return nil | |
} | |
// create the pool | |
logger.Infof("creating pool %q in namespace %q", p.Name, clusterInfo.Namespace) | |
if err := cephclient.CreatePool(context, clusterInfo, clusterSpec, *p, appName); err != nil { | |
return errors.Wrapf(err, "failed to create pool %q", p.Name) | |
} | |
logger.Infof("initializing pool %q", p.Name) | |
args := []string{"pool", "init", p.Name} | |
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run() | |
if err != nil { | |
return errors.Wrapf(err, "failed to initialize pool %q. %s", p.Name, string(output)) | |
} | |
logger.Infof("successfully initialized pool %q", p.Name) | |
return nil |
`rbd pool init` cmd initializes pool for rbd images. This commit makes modification to init only rbd application pools, since it is not required by other pools like ".nfs",".mgr" & "mgr_devicehealth". Signed-off-by: Rakshith R <rar@redhat.com>
1115bba
to
c02f319
Compare
Just to be clear, no behavior change is expected with this PR, except that the operator avoids a no-op call for non-rbd pools, right? |
Yes, |
pool: initialize only rbd application pools (backport #10963)
if appName != poolApplicationNameRBD { | ||
return nil | ||
} |
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.
Is this the right behavior? Should we instead return a request to requeue the reconcile in 5-15 seconds or something instead so we are sure to configure the pool once it is initialized? @travisn ?
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.
For non-rbd pools, the pool configuration is done at this point. For these pools there is no need to run rbd pool init
, so we can just return.
rbd pool init
cmd initializes pool for rbd images. This commit makes modification to init onlyrbd application pools, since it is not required
by other pools like ".nfs",".mgr" & "mgr_devicehealth".
Signed-off-by: Rakshith R rar@redhat.com
refer: #8923 (comment)
This maybe the reason cephnfs with multus is failing too.
@parth-gr ^
@idryomov can you please take a look too.
Checklist:
skip-ci
on the PR.