An '--upgrade' option is added to the option list, which upgrades the user
permissions (caps) to match newer version. Will try to detect
'rgw-pool-prefix' or user can provide it through the argument.
Segregated the command line arguments into three groups, common, output and
upgrade
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
During the 1.3 cycle, we had implemented support for OBC external mode
through an Endpoint in the StorageClass parameter. In 1.4, this is not
the case anymore as we directly use the CephObjectStore external mode.
However, we must maintain backward compatibility with the cluster using
the Endpoint and not fail the upgrade.
Thus checking for a CephObjectStore is invalid and should not always be
assumed, now if we detect an Endpoint we return a simple context which
fixes the upgrade.
Signed-off-by: Sébastien Han <seb@redhat.com>
this commit handle golangci-lint linter errcheck.
`errcheck` - Errcheck is a program for checking for
unchecked errors in go programs. These unchecked errors
can be critical bugs in some cases
To see only staticcheck linter output
`golangci-lint run --disable-all -E errcheck`
Signed-off-by: subhamkrai <srai@redhat.com>
On LUKS2 format, the resize operation requires the KEK to be passed. To
maintain a single simple init container for resize, we now open the
encrypted block with "--disable-keyring" so that further operations
won't require the keyring.
Signed-off-by: Sébastien Han <seb@redhat.com>
Ganesha daemons don't need to acess ceph cluster with admin capabilities.
Instead new user with restricted caps can be used.
Signed-off-by: Varsha Rao <varao@redhat.com>
User unlink is performed just before deleting OBC resources.
Since user is internal to OBC and next to remove to delete user,
unlinking user is not necessary.
Fixes: 6300
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
We do not support providing both ROOK_EXTERNAL_USER_SECRET and
ROOK_EXTERNAL_ADMIN_SECRET. When both are provided in the mon secret,
the operator code will use the client.admin user for all its operations.
This will break some of the logic when creating OBC since if
client.admin is detected we assume the cluster is converged and thus
pass args like this:
```
--rgw-realm=external-store --rgw-zonegroup=external-store --rgw-zone=external-store
```
To the radosgw-admin command, which won't work since Rook has no idea
what the external realm/zonegroup/zone are, if any are configured.
This fix should be sufficient for now, but moving forward we should
probably enhance clusterInfo with an "isExternal" property to make
things easier. Also supporting external realm/zonegroup/zone would be
nice. This will probanly hit 1.5 once this code is promoted to stable.
See: https://github.com/rook/rook/issues/6342
Closes: https://github.com/rook/rook/issues/6329
Signed-off-by: Sébastien Han <seb@redhat.com>
OSD prepare jobs only need to be run if the OSD deployments on PVCs were
not already started. For efficiency, we now query them in a batch instead
of querying them one-by-one with a label selector, which proves to be very
slow in large clusters.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The OSD PVCs were being detected one by one with a label selector.
This proves to be slow in large clusters. Instead, we now make this
more efficient by querying for all existing PVCs and looking up their
existing in memory with a map.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
this commit reverts the changes done in
controller file as previous changes failing
in ci and those changes are related to linter
so we can supress them.
Signed-off-by: subhamkrai <srai@redhat.com>
This PR makes the changes in csi templates and
upgrade documentation required for updating
csi sidecar images.
Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
adding linter staticcheck in golangci-lint.
staticcheck - Staticcheck is a go vet on steroids,
applying a ton of static analysis checks
Signed-off-by: subhamkrai <srai@redhat.com>
this commit handle golangci-lint linter staticcheck error.
`staticcheck` - Staticcheck is a go vet on steroids,
applying a ton of static analysis checks.
To see only `staticcheck` linter output
`golangci-lint run --disable-all -E staticcheck`
Signed-off-by: subhamkrai <srai@redhat.com>
The pvc template name has either been require to be empty, or one of the
expected values such as data and metadata. Those who upgrade from 1.1
may find that if they changed it to something else, their upgrade will
fail when not one of these values. If there is only a single template,
always treat it as the data template.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
adding one more linter ineffassign in golangci-lint.
ineffassign - Detects when assignments to existing
variables are not used.
Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
this commit will enable one more linter ineffassign
in golangci-lint.
This linter throws an error when variable is assigned and never used.
`golangci-lint run --disable-all -E ineffassign` is used detects ineffassign
errors only.
Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
When the system has a low ow aio-max-nr setting, the osd prepare pod can
fail to complete. This value must be increased.
Adding a documentation section for it.
Closes: https://github.com/rook/rook/issues/6279
Signed-off-by: Sébastien Han <seb@redhat.com>