Open hemanthnakkina opened 3 weeks ago
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'.
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.
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 ?