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

rgw: add DAOS SAL implementation #45888

Closed
wants to merge 1 commit into from
Closed

Conversation

zalsader
Copy link
Contributor

@zalsader zalsader commented Apr 13, 2022

Add DAOS backend RGW SAL (Storage Abstraction Layer) implementation.

To build with DAOS backend, use -DWITH_RADOSGW_DAOS=YES cmake option. daos-devel rpm should be installed beforehand.

To connect to DAOS pool, add the following configuration parameters to ceph.conf:

    [client]
            ...
            rgw backend store = daos
            daos pool = tank

A pool could be created using the following command:

    dmg pool create --size=<size> <pool_name>

To install daos-devel do:

    sudo wget -O /etc/yum.repos.d/daos-packages.repo https://packages.daos.io/v2.0/CentOS8/packages/x86_64/daos_packages.repo
    sudo rpm --import https://packages.daos.io/RPM-GPG-KEY
    sudo yum install -y epel-release daos-server daos-client daos-devel

Note: this is an initial stage of the implementation, so some things still may not work perfectly.

Design and additional documentation could be found here.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@zalsader zalsader marked this pull request as ready for review April 13, 2022 03:38
@zalsader zalsader requested a review from a team as a code owner April 13, 2022 03:38
Comment on lines +4252 to +4275
std::string rgw_store = "rados";
const auto& config_store = g_conf().get_val<std::string>("rgw_backend_store");
#ifdef WITH_RADOSGW_DBSTORE
if (config_store == "dbstore") {
rgw_store = "dbstore";
}
#endif

#ifdef WITH_RADOSGW_MOTR
if (config_store == "motr") {
rgw_store = "motr";
}
#endif

#ifdef WITH_RADOSGW_DAOS
if (config_store == "daos") {
rgw_store = "daos";
}
#endif

lsubdout(cct, rgw, 1) << "RGW CONF BACKEND STORE = " << config_store << dendl;
lsubdout(cct, rgw, 1) << "RGW BACKEND STORE = " << rgw_store << dendl;

if (raw_storage_op) {
store = StoreManager::get_raw_storage(dpp(), g_ceph_context, "rados");
store = StoreManager::get_raw_storage(dpp(), g_ceph_context, rgw_store);
} else {
store = StoreManager::get_storage(dpp(), g_ceph_context, "rados", false, false, false,
store = StoreManager::get_storage(dpp(), g_ceph_context, rgw_store, false, false, false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allows radosgw-admin to create, update and delete users. Another PR (#45247 ) includes a similar change. We are working together to make sure that radosgw-admin works well with daos and motr.

Copy link
Contributor

Choose a reason for hiding this comment

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

This bit is going to be part of #45987 so it can be dropped from this PR.

@cbodley
Copy link
Contributor

cbodley commented Apr 20, 2022

jenkins test make check

@dang
Copy link
Contributor

dang commented Apr 20, 2022

jenkins test api


// XXX: Combine multiple streams into one as motr does
uint64_t data_size = data.length();
ret = obj.write(dpp, std::move(data), offset);
Copy link
Contributor

Choose a reason for hiding this comment

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

How are the concurrent writes handled? In case of Rados (& also dbstore), a unique object-ID is created for each object data write to prevent any overwrite & in AtomicWriter::complete() that object-ID is stored in the object metadata to refer to in object::read()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We did not handle this before, I will sketch something up to handle this. Adding a TODO for now

Copy link
Contributor

@dang dang left a comment

Choose a reason for hiding this comment

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

#45623 merged, so this now needs changes for the zonegroup API

To build with DAOS backend, use -DWITH_RADOSGW_DAOS=YES cmake
option. `daos-devel` rpm should be installed beforehand.

To connect to DAOS pool, add the following configuration
parameters to ceph.conf:
```
    [client]
            ...
            rgw backend store = daos
            daos pool = tank
```

A pool could be created using the following command:
```
    dmg pool create --size=<size> <pool_name>
```

To install `daos-devel` do:
```
    sudo wget -O /etc/yum.repos.d/daos-packages.repo https://packages.daos.io/v2.0/CentOS8/packages/x86_64/daos_packages.repo
    sudo rpm --import https://packages.daos.io/RPM-GPG-KEY
    sudo yum install -y epel-release daos-server daos-client daos-devel
```

Co-authored-by: Walter Warniaha <walter.warniaha@seagate.com>

Signed-off-by: Zuhair AlSader <zuhair.alsader@seagate.com>
@zalsader
Copy link
Contributor Author

@dang @soumyakoduri The PR has been rebased on master and the required changes were made, please have a look, thank you!

@zalsader
Copy link
Contributor Author

make check passed before because the option to build DAOS (WITH_RADOSGW_DAOS=ON) was not passed to the make check script. It is failing now because it cannot find DAOS on ubuntu, I am working with the DAOS team to get an ubuntu release for this.

Copy link
Contributor

@dang dang 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 otherwise.

Comment on lines +4252 to +4275
std::string rgw_store = "rados";
const auto& config_store = g_conf().get_val<std::string>("rgw_backend_store");
#ifdef WITH_RADOSGW_DBSTORE
if (config_store == "dbstore") {
rgw_store = "dbstore";
}
#endif

#ifdef WITH_RADOSGW_MOTR
if (config_store == "motr") {
rgw_store = "motr";
}
#endif

#ifdef WITH_RADOSGW_DAOS
if (config_store == "daos") {
rgw_store = "daos";
}
#endif

lsubdout(cct, rgw, 1) << "RGW CONF BACKEND STORE = " << config_store << dendl;
lsubdout(cct, rgw, 1) << "RGW BACKEND STORE = " << rgw_store << dendl;

if (raw_storage_op) {
store = StoreManager::get_raw_storage(dpp(), g_ceph_context, "rados");
store = StoreManager::get_raw_storage(dpp(), g_ceph_context, rgw_store);
} else {
store = StoreManager::get_storage(dpp(), g_ceph_context, "rados", false, false, false,
store = StoreManager::get_storage(dpp(), g_ceph_context, rgw_store, false, false, false,
Copy link
Contributor

Choose a reason for hiding this comment

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

This bit is going to be part of #45987 so it can be dropped from this PR.

@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@nizamial09 nizamial09 removed this from In progress in Dashboard May 9, 2022
@djgalloway djgalloway changed the base branch from master to main May 25, 2022 20:00
@idryomov idryomov removed the rbd label May 26, 2022
@zalsader
Copy link
Contributor Author

Closing in favor of a new PR that incorporates libds3

@zalsader zalsader closed this Aug 17, 2022
@zalsader zalsader deleted the add-daos branch August 19, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants