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

Support to configure multiple configs in single go for daemon API #364

Open
hemanthnakkina opened this issue Jun 11, 2024 · 2 comments
Open
Labels

Comments

@hemanthnakkina
Copy link
Contributor

Enhancement

Trying to access microceph daemon API using a python client similar to [1]

Currently multiple configs cannot be updated in single API call and have to run PUT /1.0/configs API call multiple times one for each config [2] which results in restart of corresponding service for each API call.

This is an enhacement request to export API call to accept multiple configs in a single go.
The use case for this is to configure all keystone related configs for radosgw.
Currently there are atleast 12 configs to set this integration which restarts radosgw 12 times.

[1] https://github.com/canonical/charm-microceph/pull/83/files#diff-29c083e8f4fd7ea8a9d6d5d47ec84ca0423cca647a63f51678edb615e7c5fe1b
[2] https://github.com/canonical/microceph/blob/main/microceph/api/configs.go#L59

What version of MicroCeph are you using ?

reef/stable

What are the steps to reproduce this issue ?

  1. Deploy microceph
  2. Enable rgw service
  3. Use the following python script to connect to microceph daemon API https://pastebin.canonical.com/p/NhTzvqP52P/
@hemanthnakkina
Copy link
Contributor Author

hemanthnakkina commented Jun 12, 2024

Note: setting configs one after another without any sleep in between results in RGW service inactive.
This is observed both via daemon API and microceph client

Jun 12 05:17:51 sunbeam1 microceph.rgw[610270]: global_init: unable to open config file from search list /var/snap/microceph/x1/conf/radosgw.conf
Jun 12 05:17:51 sunbeam1 systemd[1]: snap.microceph.rgw.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 05:17:51 sunbeam1 systemd[1]: snap.microceph.rgw.service: Failed with result 'exit-code'.
Jun 12 05:17:51 sunbeam1 systemd[1]: snap.microceph.rgw.service: Consumed 1.011s CPU time.
Jun 12 05:17:51 sunbeam1 systemd[1]: snap.microceph.rgw.service: Scheduled restart job, restart counter is at 1.
Jun 12 05:17:51 sunbeam1 systemd[1]: Stopped Service for snap application microceph.rgw.
Jun 12 05:17:51 sunbeam1 systemd[1]: snap.microceph.rgw.service: Consumed 1.011s CPU time.
Jun 12 05:17:51 sunbeam1 systemd[1]: Started Service for snap application microceph.rgw.
Jun 12 05:17:51 sunbeam1 microceph.rgw[611184]: global_init: unable to open config file from search list /var/snap/microceph/x1/conf/radosgw.conf
Jun 12 05:17:51 sunbeam1 systemd[1]: snap.microceph.rgw.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 05:17:51 sunbeam1 systemd[1]: snap.microceph.rgw.service: Failed with result 'exit-code'.
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Scheduled restart job, restart counter is at 2.
Jun 12 05:17:52 sunbeam1 systemd[1]: Stopped Service for snap application microceph.rgw.
Jun 12 05:17:52 sunbeam1 systemd[1]: Started Service for snap application microceph.rgw.
Jun 12 05:17:52 sunbeam1 microceph.rgw[611388]: global_init: unable to open config file from search list /var/snap/microceph/x1/conf/radosgw.conf
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Failed with result 'exit-code'.
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Scheduled restart job, restart counter is at 3.
Jun 12 05:17:52 sunbeam1 systemd[1]: Stopped Service for snap application microceph.rgw.
Jun 12 05:17:52 sunbeam1 systemd[1]: Started Service for snap application microceph.rgw.
Jun 12 05:17:52 sunbeam1 microceph.rgw[611423]: global_init: unable to open config file from search list /var/snap/microceph/x1/conf/radosgw.conf
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Failed with result 'exit-code'.
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Scheduled restart job, restart counter is at 4.
Jun 12 05:17:52 sunbeam1 systemd[1]: Stopped Service for snap application microceph.rgw.
Jun 12 05:17:52 sunbeam1 systemd[1]: Started Service for snap application microceph.rgw.
Jun 12 05:17:52 sunbeam1 microceph.rgw[611499]: global_init: unable to open config file from search list /var/snap/microceph/x1/conf/radosgw.conf
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Failed with result 'exit-code'.
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Scheduled restart job, restart counter is at 5.
Jun 12 05:17:52 sunbeam1 systemd[1]: Stopped Service for snap application microceph.rgw.
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Start request repeated too quickly.
Jun 12 05:17:52 sunbeam1 systemd[1]: snap.microceph.rgw.service: Failed with result 'exit-code'.

@UtkarshBhatthere UtkarshBhatthere added the enhancement New feature or request label Jun 14, 2024
@UtkarshBhatthere
Copy link
Contributor

This would be a good ideal goal, however, the cluster configurations are all organised in a single group (there is no logical grouping implemented). The problem is, allowing multiple configs on a flat level may result in a situation where ALL the services are restarted on the host (due to different configs). Thus, I would implement this with additional logical grouping of configs that couldbe executed together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants